-
Notifications
You must be signed in to change notification settings - Fork 1
ci: add minimal compile gate for PRs and main #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| name: CI | ||
|
Check warning on line 1 in .github/workflows/ci.yml
|
||
|
|
||
| # Minimal compile gate for PRs and main. Until this existed, the release | ||
| # workflow was the repo's only build check, so uncompilable merges could land | ||
| # on main unnoticed — v1.6.8 alone shipped three separate "repair main" fixes. | ||
| # | ||
| # Deliberately just `cargo check`: fast enough to gate every PR, and it | ||
| # compiles the lib, bins, tests, and benches without running anything. | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: [main] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ci-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| check: | ||
| name: cargo check | ||
| runs-on: ubuntu-22.04 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
Check warning on line 28 in .github/workflows/ci.yml
|
||
|
|
||
| - name: Install Rust toolchain | ||
| uses: dtolnay/rust-toolchain@stable | ||
|
Check warning on line 31 in .github/workflows/ci.yml
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 External artefact pulled in without integrity pinning — Risk: 60/100 The CI workflow runs dtolnay/rust-toolchain from mutable tag stable rather than a 40-character commit SHA. A changed action could execute arbitrary code while installing the Rust toolchain and compromise the cargo check gate or build runner. 🛠 AI fix prompt (copy & paste into your coding agent)Flagged by Autter security & observability checks. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 Third-party action pinned by mutable tag — Risk: 55/100 The Rust toolchain action uses the mutable 🛠 AI fix prompt (copy & paste into your coding agent)Flagged by Autter security & observability checks. |
||
|
|
||
| - name: Cache cargo | ||
| uses: Swatinem/rust-cache@v2 | ||
|
Check warning on line 34 in .github/workflows/ci.yml
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 External artefact pulled in without integrity pinning — Risk: 60/100 The CI workflow runs Swatinem/rust-cache from mutable tag v2 rather than a 40-character commit SHA. A compromised or retagged cache action could execute code in CI and poison or expose Cargo build caches used by the compile gate. 🛠 AI fix prompt (copy & paste into your coding agent)Flagged by Autter security & observability checks. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 Third-party action pinned by mutable tag — Risk: 55/100 The Rust cache action uses the mutable 🛠 AI fix prompt (copy & paste into your coding agent)Flagged by Autter security & observability checks. |
||
|
|
||
| - name: Check (lib, bins, tests, benches) | ||
| run: cargo check --locked --all-targets | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟠 External artefact pulled in without integrity pinning — Risk: 60/100
The CI workflow runs actions/checkout from mutable tag v4 rather than a 40-character commit SHA. A retagged or compromised action could execute code in the PR and main compile-gate runners, exposing the repository contents and any runner credentials available to subsequent steps.
🛠 AI fix prompt (copy & paste into your coding agent)
Flagged by Autter security & observability checks.