Conversation
Refactored workflow to include OWASP linting and Node.js setup.
This file contains linting rules for the OWASP API Security Top 10 2023, including excluded rules and modified severity levels.
Redirect spectral linting output to log files and upload them as artifacts.
Initial version of the OWASP API Security Top 10 2023 linting ruleset.
|
@rartych looks good, but why are so many rules excluded (off) by default - was that the outcome of earlier discussions? |
Yes I tried to review all the rules in camaraproject/Commonalities#539 and its sub-issues.
Of course the selection can be modified if needed. |
Thanks, I suspected that was the case - but good to confirm.
I believe that should be allowed. If they are rules for existing OWASP recommendations, they could be including in the |
|
Parking this for now. The rule selection and review work by @rartych and @Kevsy is valuable and will feed directly into the Validation Framework v1 ruleset. The reason for parking: pr_validation v0 cannot differentiate between Commonalities versions, so enabling OWASP rules that depend on r4.x schema constraints would produce false positives on repositories still on r3.4. The v1 design (ReleaseManagement#447) addresses this with version-aware ruleset selection (section 7.5). |
|
Converted to draft — see parking rationale. |
What type of PR is this?
What this PR does / why we need it:
This PR adds Spectral OWASP linting rules to be used in reusable linting workflows.
.spectral-owasp.yamlincludes OWASP rules selected in https://github.com/camaraproject/Commonalities/blob/main/documentation/Linting-rules.md.spectral-owasp-target.yamlmodifies severity ofapi4rules to target values.spectral-camara.yamlaggregates rulesests (already defined and OWASP) as Megalinter requires only one input parameter for ruleset filespectral-oas.yml- refactored workflow for manually launched Spectral linting (including OWASP target ruleset)pr_validation.yml- changed ruleset file to.spectral-camara.yamlWhich issue(s) this PR fixes:
Fixes #
Special notes for reviewers:
Changelog input
Additional documentation