-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: adoption of sfdx-scan-pull-request by mitch spano #6
Conversation
mmoyaferrer
commented
Feb 28, 2024
- Adoption of sfdx-scan-pull-request
- Mock metadata changes happen in the pull request in order to verify the correct behavior in the validations action, these changes will be reverted before merge.
Such a nice action @mitchspano, thank you for the open source and feedback to include it. |
What do you think about adding sfdx-scan-pull-request to the template? Also, do you prefer to configure the action to reflect the vulnerabilities as checks or comments? I personally find comments a more streamlined experience. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is extremely nice! I agree on comments being the more "natural" feedback, familiar from manual reviews
System.assertEquals(Greeter.greet('John'), 'Hello John from Greeter'); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Attribute | Value |
---|---|
Engine | pmd-custom |
Category | Best Practices |
Rule | ApexAssertionsShouldIncludeMessage |
Severity | 3 |
Type | Error |
Message | 'System.assertEquals' should have 3 parameters. |
File | force-app/main/default/classes/Test_Greeter.cls |
update account; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Attribute | Value |
---|---|
Engine | pmd-custom |
Category | Security |
Rule | ApexCRUDViolation |
Severity | 1 |
Type | Error |
Message | Validate CRUD permission before SOQL/DML operation or enforce user mode |
File | force-app/main/default/classes/UglyUpdateCtrl.cls |
document.getElementById("output").innerHTML = userInput; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Attribute | Value |
---|---|
Engine | eslint-custom |
Category | undefined |
Rule | @lwc/lwc/no-document-query |
Severity | 2 |
Type | Error |
Message | Invalid usage of "getElementById". DOM query at the document level is forbidden. |
File | force-app/main/default/lwc/helloWorld/helloWorld.js |
document.getElementById("output").innerHTML = userInput; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Attribute | Value |
---|---|
Engine | eslint-custom |
Category | undefined |
Rule | @lwc/lwc/no-inner-html |
Severity | 2 |
Type | Error |
Message | Using 'innerHTML/outputHTML/insertAdjacentHTML' is not allowed |
File | force-app/main/default/lwc/helloWorld/helloWorld.js |