anchore-engine
anchore-engine copied to clipboard
Policy Check basis the count of the vulnerability
Is this a request for help?:
Is this a BUG REPORT or a FEATURE REQUEST? (choose one): FEATURE REQUEST
Is this a request for help?:
Is this a BUG REPORT or a FEATURE REQUEST? (choose one): FEATURE REQUEST/HELP
If this is a FEATURE REQUEST, please: There should be a feature to STOP a gate based on vulnerability count. For example, i want to fail the policy evaluation if any Critical/High vulnerability exist, but for Medium/Low, want to allow a vulnerability count of 10, post which would want to fail the policy evaluation:
{ "name": "DefaultPolicy", "version": "1_0", "comment": "Policy for basic checks", "id": "policy1", "rules": [ { "action": "STOP", "gate": "vulnerabilities", "id": "rule1", "params": [ { "name": "package_type", "value": "all" }, { "name": "severity_comparison", "value": ">=" }, { "name": "severity", "value": "high" } ], "trigger": "package" }, { "action": "STOP", "gate": "vulnerabilities", "id": "rule2", "params": [ { "name": "package_type", "value": "all" }, { "name": "severity_comparison", "value": "=" }, { "name": "severity", "value": "medium" } { "name": "count", "value": "10" } ], "trigger": "package" } ] }
Hello @swetan27, thank you for submitting this feature request. We will review this suggestion and take it into consideration. If you're up to the challenge, we are always open to community contributions and would be more than happy to review a pull request for this feature.