Skip to content

ci: pin the runner image and the branch-ref actions - #92

Open
singlerider wants to merge 6 commits into
blacklanternsecurity:stablefrom
singlerider:chore/pin-actions-sha
Open

singlerider wants to merge 6 commits into
blacklanternsecurity:stablefrom
singlerider:chore/pin-actions-sha

Conversation

@singlerider

@singlerider singlerider commented Sep 28, 2026 •

Copy link
Copy Markdown

ubuntu-latest is a label GitHub moves. The image behind it changes on GitHub's schedule, and a pipeline nobody touched goes red on a Tuesday. This pins every job to ubuntu-24.04 so the runner moves when we move it.

It also pins the action refs that point at a branch (@stable, @latest) rather than a release. Each pin carries the version it resolves to, or the commit date where upstream publishes no tag for that branch. Version-tagged actions stay on their tags and Dependabot keeps bumping them.

Validation

actionlint clean on the changed workflows. No logic, matrix, or step changes: only the runs-on: value and the branch refs.

Part of https://github.com/blacklanternsecurity/bbot-enterprise/issues/149.

Folded in

@singlerider

Copy link
Copy Markdown
Author

CI state on this PR, none of it from this diff. git diff --name-only upstream/stable..HEAD is four workflow files and nothing else.

lint and test are pre-existing at 0ecc48e, the current stable HEAD. Reproduced against a clean git archive of upstream/stable with no workflow changes present:

  • ruff check reports the same Found 8 errors, including SIM102 at radixtarget/tree/ip.py:123
  • cargo clippy --all-targets --all-features -- -D warnings under Rust 1.97.1 reports the same for_kv_map error at src/node/base.rs:42

Under local Rust 1.96.1 clippy passes, so this only appears because the toolchain floats. pipx install ruff has no version and the toolchain input is stable with no rust-toolchain.toml, so both tools advance on their own and turn CI red without a commit. Same defect class as the uses: refs this PR pins, just in a run: step. The last green run on stable was 2026-03-31.

benchmark is a fork artifact. Resource not accessible by integration is the read-only GITHUB_TOKEN on a fork PR failing to post its comment. I do not have push access to this repo, so this had to come from a fork. It will not happen on a branch PR.

Happy to pin ruff and add a rust-toolchain.toml here, but that is a separate change from pinning uses:, so I left it out.

@singlerider singlerider changed the title ci: pin every action reference to a commit SHA ci: pin the runner image and the branch-ref actions Sep 28, 2026
ubuntu-latest is a label GitHub moves. The image changes under us and
a green pipeline turns red on a morning nobody touched the code.
Pinning to ubuntu-24.04 means the runner moves when we move it.

dtolnay/rust-toolchain was called at @stable, a branch, not a release.
It is pinned to a commit, dated in the trailing comment because that
repo publishes no release tag for it. Version-tagged actions are
untouched.
The lint job ran an unpinned `pipx install ruff`, which picked up 0.16.9
and failed on 8 pre-existing errors (import order, __slots__ sort,
SIM102, SIM201). The Rust job tracked `stable`, whose clippy now denies
for_kv_map in src/node/base.rs. Both blocked unrelated PRs such as blacklanternsecurity#92.

Pin ruff==0.16.9 in the workflow and dev group, pin Rust 1.97.1 with
clippy and rustfmt in rust-toolchain.toml and rust-tests.yml, and fix
the errors in source.
Fork PRs get a read-only GITHUB_TOKEN, so the comment step failed the
job after the benchmark itself passed.
@codecov-commenter

codecov-commenter commented Oct 3, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100%. Comparing base (0ecc48e) to head (22d8055).

Additional details and impacted files
@@          Coverage Diff          @@
##           stable    #92   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           3      3           
  Lines         604    605    +1     
=====================================
+ Hits          604    605    +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@singlerider

singlerider commented Oct 3, 2026 •

Copy link
Copy Markdown
Author

Green and mergeable, with #94 folded in. Part of blacklanternsecurity/bbot-enterprise#149.

@singlerider

Copy link
Copy Markdown
Author

@liquidsec needs a review and merge from someone with write access.

windows-latest and macos-latest were still floating in the wheel
matrix.
@singlerider

Copy link
Copy Markdown
Author

@liquidsec @shart123456 @en0f review requested. I can't add reviewers on this repo (read-only access).

Move all release work into a new tag-triggered publish.yml adapted
from blastdns: tag/version check against Cargo.toml and pyproject.toml,
reuse of the test workflows via workflow_call, maturin wheel matrix,
sdist, crates.io publish, PyPI upload via OIDC trusted publishing with
build provenance, and a GitHub release carrying an SPDX SBOM.

python-tests.yml and rust-tests.yml now only run tests. The maturin
publish, wheel, sdist, release and cargo publish jobs that ran on push
to stable are removed, so no branch push publishes or tags anything.
actions-rs/toolchain is replaced with actions-rust-lang/setup-rust-toolchain.
Every action is pinned to a commit SHA with a version comment, and
Linux runners use ubuntu-24.04.

Refs: bbot-enterprise#139, bbot-enterprise#155, bbot-enterprise#150
@singlerider singlerider self-assigned this Oct 14, 2026
@liquidsec

Copy link
Copy Markdown

i want to take the pinned actions but I can't take the publish changes as-is

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants