Repository navigation
ci: scan published Docker images for CVEs every week - #1545
Faraz32123 wants to merge 2 commits into
Conversation
A scheduled workflow resolves the latest published tags of overhangio/openedx (release and main) and overhangio/openedx-permissions on Docker Hub, scans them with Trivy, and uploads the reports to the repository's Security tab under one stable category per image stream. Unfixed findings are excluded: most of them are Ubuntu kernel-header CVEs that do not apply to containers, and no action is possible for the rest. SECURITY.md documents the triage policy for what remains. Part of overhangio#1543. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
10d580b to
6e9e032
Compare
It runs automatically every Monday once merged — results will show up under the repo's Security tab. It can also be triggered manually from the Actions tab if you want to see it sooner. |
Abdul-Muqadim-Arbisoft
left a comment
There was a problem hiding this comment.
Thanks @Faraz32123, the approach looks right to me, and ignore-unfixed is a better choice than a long .trivyignore. Two changes before merging:
- Pin
trivy-actionto a commit SHA. In March 2026 the trivy-action tags were force-pushed to malicious commits that stole CI secrets (Aqua's write-up), so a version tag isn't enough for this action. We already pincreate-github-app-tokenthis way, and Dependabot keeps SHA pins up to date:uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # v0.36.0
- Scan the
-indigoimages on the schedule too. Indigo is enabled by default, so most installs runoverhangio/openedx:<version>-indigo, which is the image from the original report. Right now it's only covered by a manual run. Something like:("trivy-openedx-indigo-release", latest("overhangio/openedx", r"\d+\.\d+\.\d+-indigo")), ("trivy-openedx-indigo-main", latest("overhangio/openedx", r"\d+\.\d+\.\d+-main-indigo")),
Minor, optional: without a version: input, trivy-action v0.36.0 installs Trivy v0.70.0, not the 0.76.2 mentioned in the description. Setting version: explicitly would make it clear which Trivy runs.
On "can we see it in action?": a run on the edly-io fork before merging (e.g. with a temporary push trigger on this branch) would show the results in the fork's Security tab.
- Pin trivy-action to the v0.36.0 commit SHA: its version tags were force-pushed to malicious commits in March 2026, so a tag is not enough for this action. Dependabot keeps SHA pins up to date. - Pin the Trivy version explicitly instead of relying on the default bundled with the action. - Scan the "-indigo" image streams on the schedule too: Indigo is enabled by default, so most installs run these images. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Part of #1543.
Adds a weekly scheduled workflow that scans the Docker images Tutor publishes, so newly disclosed CVEs in already-published images become visible without rebuilding anything:
overhangio/openedx(current release and-mainnightly) andoverhangio/openedx-permissions.CRITICAL,HIGH) and uploads SARIF to the repository's Security tab, under one stable category per image stream so each week's report replaces the previous one instead of piling up.workflow_dispatchaccepts an arbitrary image reference, for scanning e.g. an-indigovariant or an older tag by hand.One deliberate choice, slightly different from what I proposed on the issue: instead of a
.trivyignorelisting ~500 kernel-header CVEs (which would need constant maintenance), the scan runs withignore-unfixed: true. Thelinux-libc-devfindings have no released fix and don't apply to containers (which run on the host kernel), so they drop out automatically; everything with an available fix stays visible.Testing
openedx:22.0.4,openedx:23.0.0-mainandopenedx-permissions:22.0.4— exactly the intended targets (Claude tested this).ignore-unfixed, SARIF output) was run locally via the Trivy Docker image and produced valid SARIF.trivy-action@v0.36.0,upload-sarif@v4, Trivy 0.76.2).The first scheduled run is Monday 06:00 UTC; it can be triggered manually before that from the Actions tab once merged.
🤖 Generated with Claude Code