doc/user/application_security/policies/vulnerability_management_policy.md
{{< details >}}
{{< /details >}}
{{< history >}}
vulnerability_management_policy_type. Enabled by default.vulnerability_management_policy_type_group. Enabled by default.vulnerability_management_policy_type and vulnerability_management_policy_type_group removed.{{< /history >}}
Use a vulnerability management policy to automatically resolve vulnerabilities that are no longer detected, automatically dismiss vulnerabilities that match specific criteria, or override vulnerability severity levels. This can help reduce the workload of triaging vulnerabilities.
When a scanner detects a vulnerability on the default branch, the scanner creates a vulnerability record with the status Needs triage. After the vulnerability has been remediated and the next security scan runs, the scan adds No longer detected to the record's activity log but the record's status does not change. You can change the status to Resolved either manually or by using a vulnerability management policy.
Vulnerability management policies ensure that rules are applied consistently. For example, you can create policies that:
A vulnerability management policy only affects vulnerabilities with the status Needs triage or Confirmed.
The vulnerability management policy is applied when a pipeline runs against the default branch or when vulnerabilities are detected by advisory scanning.
When policies use auto-resolve, for each vulnerability that is no longer detected by the same scanner and matches the policy's rules:
When policies use auto-dismiss, for each vulnerability that matches the policy's criteria:
Policies can identify vulnerabilities that match a set of criteria and override their severity:
To limit the pipeline load and duration, a maximum of 1,000 vulnerabilities per pipeline are processed for auto-resolve or auto-dismiss actions. The auto-resolve or auto-dismiss actions resume in subsequent pipelines, up to the maximum, until all matching vulnerabilities are processed.
{{< history >}}
auto_dismiss_vulnerability_policies. Enabled by default.auto_dismiss_vulnerability_policies removed.identifier_type and values criteria fields in GitLab 18.10 with a feature flag named security_policies_severity_customize. Enabled by default.{{< /history >}}
Auto-dismiss policies support the following criteria:
test/**/*.vendor/*.CVE-2023-*.With the security_policies_severity_customize feature flag enabled, identifier criteria also support:
cve, cwe, or owasp) to match against specific identifier formats.values array to match multiple identifiers with OR logic.You can combine multiple criteria using:
AND logic. To be dismissed, the vulnerability must match all of the criteria.OR logic. To be dismissed, the vulnerability can match any of the rules.The following dismissal reasons are supported:
{{< history >}}
security_policies_severity_customize. Enabled by default.{{< /history >}}
[!flag] The availability of this feature is controlled by a feature flag. For more information, see the history.
Policies that override the severity of vulnerabilities use the same criteria as auto-dismiss policies:
For identifier criteria, you can optionally specify an identifier type to match only specific identifier formats:
CVE-2021-44228 or patterns like CVE-2023-*.CWE-79 or patterns like CWE-*.A1 or A03:2021.The following severity operations are supported:
info, low, medium, high, or critical).Create a vulnerability management policy to automatically resolve or dismiss vulnerabilities matching specific criteria.
Prerequisites:
To create a vulnerability management policy:
After the vulnerability management policy has been created, the policy rules are applied to pipelines on the default branch.
Edit a vulnerability management policy to change its rules.
The vulnerability management policy has been updated. When a pipeline next runs against the default branch, the policy's rules are applied.
When a vulnerability management policy is created or edited, it's checked against the vulnerability management policy schema to confirm it's valid.