Repository navigation
ci: run the security audit, benchmark on demand, keep release secrets out of scripts - #449
Conversation
MaidSafe-Hermes
left a comment
There was a problem hiding this comment.
APPROVE — no blocking workflow defect found in the four changed files.
Both seats agree (two model families): 2/2 reviewed (sol-1 gpt-6.1-sol xhigh; glm-1 z-ai/glm-5.3), at head 13d4124.
Verified: security_audit.yml is schedule/workflow_dispatch only with contents: read; benchmark.yml is workflow_dispatch only; release.yml is workflow_dispatch only, gates publish on build, and passes tokens through quoted env variables; merge.yml preserves stable/nightly toolchain requirements and clippy. gh pr checks returned 15/15 SUCCESS.
Non-blocking: action references remain mutable tags rather than full commit-SHA pins. The dispatch-only release, benchmark, and scheduled audit paths did not run in PR CI. Release-plz 0.4.2 token compatibility and the other test claims are reported in the PR body, not independently rerun here. No merge performed.
The job was guarded by `repository_owner == 'maidsafe'`, so it has never run since the repo moved to WithAutonomi, and GitHub has since disabled the workflow for inactivity. It also used the deprecated actions-rs/audit-check. Run `cargo deny check advisories` instead: the same tool and deny.toml ignores as merge.yml's PR check, but daily, so new advisories show up between PRs. Add workflow_dispatch for manual runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
benchmark.yml ran on every pull_request and every push with no branch filter, so each push to a PR branch ran it twice. Nothing compares or stores the results, and merge.yml's `clippy --all-targets` already compiles the benches on every PR. Also drop the separate build step: its `if:` was a malformed expression and `cargo bench` builds anyway. Replace actions-rs/toolchain with dtolnay/rust-toolchain. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
release.yml pasted CRATES_IO_TOKEN and SELF_ENCRYPTION_PAT into the
publish script with ${{ }}. Pass them through the step's env instead:
release-plz publishes with CARGO_REGISTRY_TOKEN, so `cargo login` goes,
and the PAT reaches --git-token as "$GIT_TOKEN".
The publish job installed the toolchain twice; keep only
dtolnay/rust-toolchain. Replace the deprecated actions-rs/toolchain in
release.yml and merge.yml with dtolnay/rust-toolchain, and move
actions/checkout from v2 to v4 to match the rest of the repo.
Closes V2-1765
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
13d4124 to
8ddfd7f
Compare
Linear issue
Closes V2-1765
Summary
This PR fixes items 5, 7 and 8 of the 2026-10-27 faux-CI audit of this repo (V2-1747), workflow files only. Review it commit by commit:
ci: make the daily security audit actually runsecurity_audit.ymlwas guarded byif: github.repository_owner == 'maidsafe', so it has never run under WithAutonomi. GitHub now lists it asdisabled_inactivity.cargo deny check advisories, with the same tool and deny.toml ignores as merge.yml's PR check, every day. New advisories show up between PRs instead of on whoever opens the next one.actions-rs/audit-checkis gone, andworkflow_dispatchis added for manual runs.ci: run the benchmarks on demand onlybenchmark.ymlran on everypull_requestand everypushwith no branch filter, so it ran twice on each PR-branch push. Nothing compared or stored the results.workflow_dispatchonly. merge.yml'sclippy --all-targetsalready compiles the benches on every PR.if:was a malformed expression, andcargo benchbuilds anyway.ci: keep release secrets out of run scripts, drop actions-rsrelease.ymlused to pasteCRATES_IO_TOKENandSELF_ENCRYPTION_PATinto the publish script with${{ }}. Both now go through the step'senv:.CARGO_REGISTRY_TOKEN, so thecargo loginline goes. The PAT reaches--git-tokenas"$GIT_TOKEN".SELF_ENCRYPTION_PATstays, because tags pushed by the default token wouldn't trigger python-publish.yml.dtolnay/rust-toolchainis left.actions-rs/toolchainis replaced withdtolnay/rust-toolchainin release.yml and merge.yml (and in benchmark.yml, in commit 2).actions/checkoutgoes from v2 to v4, which the rest of the repo already uses.Runner cost: the benchmark no longer runs on PRs or pushes, which saves two Linux runs per PR-branch push.
Admin follow-up after merge: GitHub doesn't re-enable a workflow it disabled for inactivity, so the audit needs
gh workflow enable security_audit.yml -R WithAutonomi/self_encryption. To confirm it works, rungh workflow run security_audit.yml -R WithAutonomi/self_encryptiononce.Not changed:
python-publish.yml, tracked in V2-1763.cargo-bins/cargo-binstall@mainin release.yml is unpinned, on a job whose checkout holds the PAT. I'm noting it here, not changing it.Risk tier
Compatibility
.github/workflows/changes.Semver impact
Test evidence
Run on dev2 (Ubuntu 24.04) against this branch's tree (master 656f96a plus this diff).
cargo deny --all-features check advisories(the scheduled job's exact command line)advisories okRUSTFLAGS="-D warnings" cargo bench --no-runrelease-plz release --help(0.4.2, what release.yml installs)--tokenfalls back toCARGO_REGISTRY_TOKEN;--git-tokenreadsGIT_TOKENThe deny action word-splits its
commandinput (cargo-deny $*in its entrypoint), socommand: check advisoriesworks. Its README uses the same form.release.yml can't run from a PR, because dispatching it publishes. The next release will be its first real run. If the token wiring were wrong,
cargo publishwould fail before anything reached crates.io.New dependency
none
ADR
n/a
Mitigation / rollback
Revert the PR. Each commit touches different files and can be reverted alone.
🤖 Generated with Claude Code