Repository navigation
Vulnerability scanning
Rocks are scanned for known vulnerabilities in two places.
| When | Where | Effect |
|---|---|---|
| On every push/PR | Test stage of the rock pipeline | A fixable HIGH or CRITICAL vulnerability fails the pipeline and blocks the upload. |
| Daily | Threat monitor workflow | Opens or updates a GitHub issue when the published images have vulnerabilities. |
.github/workflows/threats.yml runs every day at 01:00 UTC and can be started manually from the Actions tab.
It is controlled from .github/ci.yaml:
ghcr:
upload: true
cve-scan: truecve-scan requires upload: true, because the scan pulls the published image from GHCR:
ghcr.io/<owner>/<repository>/<rock-name>:<version>-<base>_edge
For each rock in .github/ci.yaml, the workflow:
- Pulls the published image from GHCR.
- Scans it for
HIGHandCRITICALvulnerabilities with an available fix. - Opens a GitHub issue titled
Vulnerabilities found for <name>:<tag>listing the vulnerability IDs, targets, severities and affected packages when vulnerabilities are found. If an issue with that title already exists, no new one is opened (duplicates are closed). - Closes an issue automatically once a scan comes back clean.
The scan runs against what is already published. To fix a reported vulnerability, rebuild the rock with updated packages (for example by pushing a change to main), so that a new image is published.
To accept a specific vulnerability such as a false positive or one with no practical impact, list its ID in a .trivyignore file in the rock's directory, next to its rockcraft.yaml:
main
├── rockcraft.yaml
├── .trivyignore
└── ...
# One vulnerability ID per line. Comments start with '#'.
CVE-2024-12345
See Trivy's documentation on .trivyignore for the full syntax.
Pro-enabled rocks are not uploaded to GHCR from public repositories, so the Threat monitor cannot scan them.