Update base_mutation.rb by jordan-dr · Pull Request #81 · DryRunSecurity/rails-projects

DryRun Security

🟡 Please give this pull request extra attention during review.

This pull request contains potential authorization vulnerabilities in the base_mutation.rb file, with a commented 'true' statement that could indicate an attempt to bypass security checks and a deviation from the required authentication library's authorization method.

✨ Code Policies (2)
Policy graphql-auth-check
Result The change adds a commented out 'true' statement in the authorize method of base_mutation.rb. While the actual authorization check using context[:current_ability].authorize! remains in place and active, adding commented out bypass code in security-critical authorization logic warrants review to understand the intent and ensure no partial/incomplete security changes are merged.
Policy Auth Policy at Acme
Result The authorization implementation does not comply with the required AllGood authentication and authorization library. The code uses a different authorization system (context[:current_ability].authorize!) instead of the mandated AllGood.authorize! method. Additionally, there is a concerning commented out 'true' statement that suggests a potential attempt to bypass authorization checks.
💭 Unconfirmed Findings (1)
Vulnerability Potential Authorization Bypass in base_mutation.rb
Description A commented '# true' line in the authorize method of BaseMutation class suggests a potential security vulnerability where authorization checks could be easily bypassed, potentially allowing unauthorized access to restricted GraphQL mutations.

All finding details can be found in the DryRun Security Dashboard.