fortify / fcli

fcli is a command-line utility for interacting with various Fortify products
https://fortify.github.io/fcli/
Other
31 stars 22 forks source link

Enforce Security Policy in a Pipeline from YAML #275

Closed kadraman closed 5 months ago

kadraman commented 1 year ago

Add the ability to define a security policy in a YAML that can be validated and passed/failed based a pipeline on the results of a scan and/or a release. The security policy would be stored in the repository alongside the code and could look something like the following:

scan_result_policy:
- name: SAST - limited critical/high
  description: maximum 2 critical, 5 high for SAST scan
  enabled: true
  rules:
  - type: scan_finding
    releases:
    - *
    scanners:
    - sast,
    vulnerabilities_allowed: 2
    severity_levels:
    - critical
    vulnerability_states:
    - newly_detected
  - type: scan_finding
    releases:
    - *
    scanners:
    - sast,
    vulnerabilities_allowed: 5
    severity_levels:
    - high
    vulnerability_states:
    - newly_detected 
- name: DAST- no critical vulnerabilities
  description: critical severity level only for DAST scans
  enabled: true
  rules:
  - type: scan_finding
    releases:
    - *
    scanners:
    - dast,
    vulnerabilities_allowed: 0
    severity_levels:
    - critical
    vulnerability_states:
    - newly_detected

There could be different fcli security-policy commands, e.g.

Different capabilities could include:

rsenden commented 5 months ago

Although taking a slightly different approach, support for checking security policies is now available through the fcli action framework.