Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Known vulnerabilities and licences in the dependencies: cargo-deny for the three Rust workspaces (deny.toml beside
# each manifest: RustSec advisories, licences, sources), Trivy for every lockfile (Cargo, pnpm, Bundler, pip; dev
# dependencies included, fixable findings only, ignores in .trivyignore.yaml with an expiry). In deny.toml, an ignore or
# an allowed licence that no longer matches anything fails too; a Trivy ignore fails again when it expires.
#
# Its own workflow, not CI's: a new advisory can turn it red without any change here, and CI's result on main decides
# the CLI release (release.yml). Pull requests run it (a required check), and so does a daily run on main, whose
# failure reaches the coordinator like any other.
name: Audit

on:
pull_request:
push:
branches: [main]
schedule:
- cron: "41 4 * * *"
workflow_dispatch:

permissions:
contents: read

concurrency:
group: audit-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
audit:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
- uses: jdx/mise-action@924e7c586e33d7d4bae9c14e26c5d22e2beb6e78 # v5.3.0
with:
install_args: cargo-deny trivy
- name: cargo-deny
run: |
status=0
for manifest in Cargo.toml clients/gallery/rust/Cargo.toml clients/gallery/rust/examples/loco/Cargo.toml; do
echo "::group::$manifest"
cargo deny --manifest-path "$manifest" check -D advisory-not-detected -D license-not-encountered || status=1
echo "::endgroup::"
done
exit $status
- name: Trivy (lockfiles)
run: >-
trivy fs --scanners vuln --include-dev-deps --ignore-unfixed --exit-code 1
--ignorefile .trivyignore.yaml --skip-dirs target --skip-dirs '**/node_modules' .
# Trivy only knows lockfiles by their usual names: the Rails example's second bundle (the Sprockets one ci.yml
# tests) goes in under Gemfile.lock.
- name: Trivy (Rails example, Sprockets bundle)
run: |
dir=$RUNNER_TEMP/sprockets && mkdir -p "$dir"
cp clients/gallery/ruby/examples/rails/Gemfile.sprockets.lock "$dir/Gemfile.lock"
trivy fs --scanners vuln --ignore-unfixed --exit-code 1 --ignorefile .trivyignore.yaml "$dir"
10 changes: 10 additions & 0 deletions .trivyignore.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Trivy ignores, for CI's audit job (dependency lockfiles) and the image scan. Each entry says why it doesn't apply
# and expires within six months (expired_at), when it fails again and gets another look.
vulnerabilities:
- id: CVE-2026-25537
paths: ["Cargo.lock"]
statement: >-
jsonwebtoken 9.3.1 skips nbf/exp validation for a claim of the wrong JSON type. app/ only signs JWTs (the GitHub
App's, forge/github_app.rs) and never decodes or validates one with this crate. Reviewed 5 Dec 2026 (sc-9611);
the upgrade to 10.3+ is its own story.
expired_at: 2027-06-05
6 changes: 6 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ design is in `docs/design.md`; read it before changing the architecture, and upd
it). Ignore a zizmor finding only inline (`# zizmor: ignore[audit]`) with the reason beside it; allow a made-up
value in `.betterleaks.toml` only with a description of what it is. A real secret that reached a commit is revoked,
not allowlisted.
- **Dependencies are audited** by the Audit workflow (on pull requests and daily on main): cargo-deny for the Rust
workspaces (a `deny.toml` beside each manifest: advisories, licences, sources) and Trivy for every lockfile. Fix a
finding by upgrading. An ignore says why it doesn't apply: in `deny.toml` with a `reason`, in `.trivyignore.yaml`
with a `statement` and an `expired_at` at most six months out. A new dependency licence goes into `deny.toml`'s
allow list only after a look (no copyleft in the CLI or the images). In `deny.toml`, ignores and licences nothing
uses any more fail the job: remove them.
- **Hold the merge lock from the final rebase to the merge.** A PR must be up to date with `main` before it merges,
so a merge by one agent sends every other agent's PR back through CI. Take Fleetlayer's lock, one per repository,
around the last rebase, the CI run and the merge, in one script, and only for one PR at a time:
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading