Repository navigation
Conversation
Scan uv.lock, osprey_ui/pnpm-lock.yaml and osprey_coordinator/Cargo.lock with OSV-Scanner, and the published coordinator image with Trivy, for main and the latest release. Results go to code scanning only. Refs roostorg/community#119. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Every night, this checks the third-party software Osprey depends on against public databases of known security vulnerabilities. Maintainers then hear about a vulnerable dependency without waiting for someone to report it.
It checks two things, for both the current
mainand the latest release:ghcr.io/roostorg/osprey/osprey-coordinator. That includes the operating-system packages inside the image, which no lockfile lists.Only maintainers can see the results, in the repo's Security tab (GitHub code scanning). Nothing is posted publicly, because a report of an unfixed vulnerability can help an attacker. The workflow only reports: it doesn't fail builds or change code. It is part of the vulnerability-response process proposed in roostorg/community#119.
Details
The workflow is
.github/workflows/nightly-vulnerability-scan.yml. It runs daily at 06:47 UTC and onworkflow_dispatch.uv.lock,osprey_ui/pnpm-lock.yaml,osprey_coordinator/Cargo.lockon the triggering ref (main for the schedule)osv-mainosv-releaseghcr.io/roostorg/osprey/osprey-coordinator:maintrivy-osprey-coordinator-edgeghcr.io/roostorg/osprey/osprey-coordinator:<latest release>trivy-osprey-coordinator-releaseA small
resolvejob looks up the latest release withgh release viewand rejects anything that isn'tX.Y.Z.Where results go (privacy)
--quiet, and OSV prints only package counts. In the validation run below, the logs contain no CVE, GHSA, RUSTSEC or PYSEC IDs.Permissions
The top level is
permissions: {}.resolvegetscontents: read. The scan jobs getcontents: readandsecurity-events: write, which the SARIF upload needs. The images are public, so the jobs don't needpackages: read. Checkouts usepersist-credentials: false.New third-party dependencies (approved per AGENTS.md)
github/codeql-action/upload-sarifv4.39.19b3254085494b55a0f7c4c2b3d2d52cc712ce370google/osv-scannerrelease binaryosv-scanner_linux_amd64)160c6253e2922e9e0a6a9771c5c4c40a4b3c6090b34a3cdd5e80c96cc2e4218b, checked in-stepaquasecurity/trivyreleasetrivy_0.76.1_Linux-64bit.tar.gz)c7cbe3137fb8a48a17574bede3dd6beb16742d1e9772929940fc90082c39d9c0, checked in-stepThe workflow also downloads Trivy's vulnerability DB at runtime from
mirror.gcr.io/aquasec/trivy-db:2, falling back toghcr.io/aquasecurity/trivy-db:2.actions/checkoutis already used in this repo.Why the scanners are binaries rather than actions:
aquasecurity/trivy-actionandsetup-trivyhad their tags force-pushed to malicious commits in March 2026 (GHSA-69fq-xp46-6x23, CVE-2026-33634), together with a malicious Trivy v0.69.4. v0.76.1 is well after that incident. Trivy versions before it, including the 0.70.0 default of trivy-action, also have GHSA-mcj4-mphf-j9ff and GHSA-8rc5-4fr6-64pw.google/osv-scanner-actionis a Docker action. Itsaction.ymlrunsdocker://ghcr.io/google/osv-scanner-action:v2.7.0, a mutable tag, so pinning the action by SHA doesn't pin the code that runs.Both hashes were checked against the projects' published checksum files (
trivy_0.76.1_checksums.txt,osv-scanner_SHA256SUMS).The Trivy install and flags match the image-scanning/SBOM work for this repo (
--scanners vuln --pkg-types os,library, all severities, no--ignore-unfixed, same DB repositories). The Trivy categories are deliberately the same as the publish-time scan in #583 (trivy-osprey-coordinator-edge/-release). Trivy puts image alerts at the same location whether it scans a tag or a digest, so the nightly upload refreshes those alerts against a fresh DB instead of duplicating them. Keep the flags identical in both workflows, or the two uploads will churn the alerts. The coop nightly scans use the same tools, versions and design, scheduled at 06:17 UTC.Dependabot won't bump the two binaries, since they are hard-coded URLs and hashes rather than
uses:refs. Someone has to update the version and hash together by hand. Dependabot'sgithub-actionsecosystem does coverupload-sarif.Known gaps
osprey_coordinator/Cargo.lockis gitignored on main until ci(dependabot): Add Dependabot coverage for npm, cargo and Docker; track Cargo.lock #552 merges. The step warns and skips any lockfile that's missing, so Rust crates are covered on main once ci(dependabot): Add Dependabot coverage for npm, cargo and Docker; track Cargo.lock #552 lands, with no change here. Release tags up to and including 1.2.1 will never have a Cargo.lock. The coordinator image doesn't help either: its Rust findings come from crate sources left in/usr/local/cargo/registry, not from the coordinator's own dependency graph (it doesn't shipCargo.lockand the binary isn't built withcargo-auditable). ScanningCargo.lockwith OSV is the accurate view.FROM rust:1.91, so it ships a full Debian userland and toolchain. Each image scan produces roughly 13k results. Code scanning keeps the top 5,000 by severity, which covers every critical and high result, so part of the medium/low tail isn't shown. A slim runtime stage would fix this, but that's a production Dockerfile change and out of scope here.Stacked-PR CI (#578)
This workflow has only
scheduleandworkflow_dispatchtriggers, so #578's change topull_requestbase branches doesn't affect it either way. Scheduled runs always use the default branch.Testing
zizmor1.25.2 (online and--offline): no findings.actionlint1.7.12 with shellcheck: clean.pre-commiton the file: passes.mainand1.2.1coordinator images. Findings were shared privately with maintainers and are not in this PR.workflow_dispatchcan't start a workflow that isn't on the default branch yet. The branch instead carried a temporarypushtrigger, which was removed in the last commit. Run 40784059496: all five jobs passed, all four SARIF analyses were processed by code scanning, and the public log has no advisory IDs. Those branch-ref analyses can be deleted from code scanning after review.No CHANGELOG entry: this is CI plumbing.
Refs roostorg/community#119.
🤖 Generated with Claude Code