v3 Policy Spec Review #14
Replies: 2 comments 2 replies
-
Code Scanning - ToolsShould this allow for semantic versions? A user could say |
Beta Was this translation helpful? Give feedback.
-
What should really get modified into here is allowing for multiple code scanning types under a single block based off of the tools codescanning:
- default:
# Code Scanning is enabled
enabled: true
# anything above what is set
severity: error
- CodeQL/Veracode:
# Code Scanning is enabled
enabled: true
# If the tool results are mandatory to fail a set, by default any other tools are not mandatory
mandatory: true
# anything above what is set
severity: error
- Sonarqube:
# Code Scanning is enabled
enabled: true
# anything above what is set
severity: error While I'm not perfectly happy with what I've put as an example above with what your new tool breakdown is From there we should also make a repository based exclusion list, with all of the new required workflow endpoints someone could be using this a lot more widely and could need to manage these exclusions a bit more granular. While I don't want to pollute the actual policy file with per repo permissions, it might be correct to put an option for an external repository list octocat-org/repo1:
exclusions:
id:
- npm:jest
octocat-org/repo2:
exclusions:
advisories:
- HSA-446m-mv8f-q348 So while we could in the main policy file globally exclude a vuln, we could exclude a vuln per repo for particular situations that should not have been dismissed. Further we should consider an option for checking against dismissed findings within a short amount of time. dismissed-findings: 30
dimissed-findings-timeframe: 1 day So if someone dismissed 30 findings within say the last 1 day, it would fail as if there is a mass of dismissals mostly just trying to bypass security issues that would be a failure. On that same vein, we should also make it so we can disregard dismissals. Some tools are the master of truth on the findings for that tool controlled by another team. While we want everything to bubble up in GHAS we should consider making it so some code scanning tools bypassed items are just still counted against the findings without it being closed out by the tool itself. Finally we should add an "Maximum" within the remediation block. remediate:
errors:
timeframe: 7 # after 7 days, error
maximum: 5 # if we're still within 7 days and have 5 or more errors, error
warnings:
timeframe: 30 # after 30 days, error
all:
timeframe: 90 # after 90 days, error |
Beta Was this translation helpful? Give feedback.
-
Here is the current plan for the Policy as Code spec v3. This is a working Discussion and will be updated directly
Please add comments to anything that might interest you in adding support for.
https://github.com/GeekMasherOrg/security-v3
Top Level
Threat Models Block
The
uses
key in the thread models block will load in the correct policy files stored in the repository. An example:Code Scanning Block
Code Scanning blocks can be a single instance (directly below) or a list.
List of blocks:
Supply Chain Block
Secret Scanning Block
Work in progress
Remediation Block
Nothing changes in this block
Beta Was this translation helpful? Give feedback.
All reactions