Commit 6c686d84 authored by Fiona Neill's avatar Fiona Neill

Merge branch 'russell/edit-security-report-topic' into 'master'

Improve security report validation topic

See merge request gitlab-org/gitlab!73029
parents 68807cb2 71e59870
...@@ -270,44 +270,39 @@ If you don't want scans running in your normal DevOps process you can use on-dem ...@@ -270,44 +270,39 @@ If you don't want scans running in your normal DevOps process you can use on-dem
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/321918) in GitLab 13.11. > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/321918) in GitLab 13.11.
> - Schema validation message [added](https://gitlab.com/gitlab-org/gitlab/-/issues/321730) in GitLab 14.0. > - Schema validation message [added](https://gitlab.com/gitlab-org/gitlab/-/issues/321730) in GitLab 14.0.
You can optionally enable validation of the security report artifacts based on the You can enforce validation of the security report artifacts before ingesting the vulnerabilities.
[report schemas](https://gitlab.com/gitlab-org/security-products/security-report-schemas/-/tree/master/dist). This prevents ingestion of broken vulnerability data into the database. GitLab validates the
If you enable validation, GitLab validates the report artifacts before ingesting the vulnerabilities. artifacts based on the [report schemas](https://gitlab.com/gitlab-org/security-products/security-report-schemas/-/tree/master/dist).
This prevents ingestion of broken vulnerability data into the database.
In GitLab 14.0 and later, the pipeline's **Security** tab lists any report artifacts In GitLab 14.0 and later, when artifact validation is enabled, the pipeline's **Security** tab lists
that failed validation. Security report validation must first be enabled. any report artifacts that failed validation.
### Enable security report validation ### Enable security report validation
To enable report artifacts validation, set the `VALIDATE_SCHEMA` environment variable to `"true"` for the jobs in the `.gitlab-ci.yml` file. To enable report artifacts validation, set the `VALIDATE_SCHEMA` environment variable to `"true"`
for the desired jobs in the `.gitlab-ci.yml` file.
For example, the configuration below enables validation for only the `sast` job: For example, to enable validation for only the `sast` job:
```yaml ```yaml
include: include:
- template: Security/Dependency-Scanning.gitlab-ci.yml - template: Security/Dependency-Scanning.gitlab-ci.yml
- template: Security/License-Scanning.gitlab-ci.yml - template: Security/License-Scanning.gitlab-ci.yml
- template: Security/SAST.gitlab-ci.yml - template: Security/SAST.gitlab-ci.yml
- template: Security/Secret-Detection.gitlab-ci.yml - template: Security/Secret-Detection.gitlab-ci.yml
stages:
stages: - security-scan
- security-scan dependency_scanning:
stage: security-scan
dependency_scanning: license_scanning:
stage: security-scan stage: security-scan
sast:
license_scanning: stage: security-scan
stage: security-scan variables:
VALIDATE_SCHEMA: "true"
sast: .secret-analyzer:
stage: security-scan stage: security-scan
variables: ```
VALIDATE_SCHEMA: "true"
.secret-analyzer:
stage: security-scan
```
## Interacting with findings and vulnerabilities ## Interacting with findings and vulnerabilities
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment