Skip to content

security: add permissions blocks, SHA-pin GitHub Actions - #12

Draft
srmcguirt wants to merge 1 commit into
mainfrom
claude/magna-security-2026-W46
Draft

srmcguirt wants to merge 1 commit into
mainfrom
claude/magna-security-2026-W46

Conversation

@srmcguirt

Copy link
Copy Markdown
Member

Summary

Mechanical fixes from the 2026-W46 weekly security sweep:

  • Add a top-level permissions: {contents: read} block to ci.yml and gqlmin-size.yml (neither had one).
  • Pin actions/checkout@v4 and Swatinem/rust-cache@v2 to their current release commit SHAs (v4.4.0, v2.9.3) in ci.yml.
  • Pin actions/checkout@v4 (v4.4.0) and dtolnay/rust-toolchain@nightly to its current HEAD SHA in gqlmin-size.yml — rust-toolchain uses branch names as channel selectors by design, so this is a floating-ref snapshot rather than a release pin; re-verify periodically.

All SHAs verified live against upstream (git ls-remote) in this session, not from memory. SECURITY.md already exists at repo root, so no change needed there. No logic/build-step changes, no dependency bumps, deny.toml/licensing untouched.

Test plan

  • cargo test/clippy/fmt/publish-dry-run jobs pass on this branch
  • gqlmin-size job still builds and passes the size gate
  • Confirm the pinned SHAs still resolve to the intended refs before merging


Generated by Claude Code

@changeset-bot

changeset-bot Bot commented Nov 9, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 351a723

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Copy Markdown
Member Author

CI is red on this PR (cargo clippy, cargo fmt), but both failures are pre-existing and unrelated to this change:

  • This PR's diff only touches .github/workflows/ci.yml and .github/workflows/gqlmin-size.yml (permissions blocks + Action SHA-pinning) — no .rs files were changed.
  • cargo clippy fails on crates/magna-core/src/planner.rs:144 (unnecessary closure / ok_or_else → ok_or) and crates/magna-core/src/executor.rs:151 (needless range loop), and cargo fmt reports unformatted diffs in crates/magna-types/src/step.rs — all pre-existing source-level issues, not introduced here.
  • The base branch itself is red the same way: the last 3 pushes to main (run Security sweep — 2026-W42 #10, security: add permissions blocks, SHA-pin GitHub Actions #12, #14, all dated 2026-08-01) all have conclusion: failure on this same CI workflow, and no push to main has landed since.

No fix exists yet to port in, and fixing unrelated clippy/fmt lint findings is out of scope for a security-only PR (SHA-pinning + permissions blocks). Flagging here rather than bundling an unrelated source fix into this diff — happy to open a separate PR for the lint fixes if that's wanted. Keeping this PR open/watched.


Generated by Claude Code

Copy link
Copy Markdown
Member Author

Daily PR shepherd (2026-11-09) — verdict: REQUEST CHANGES (posted as a comment — GitHub blocks a formal review submission since the authenticated account is also this PR's author).

This PR's diff touches .github/workflows/ci.yml and .github/workflows/gqlmin-size.yml (adding permissions: blocks and SHA-pinning actions/checkout, Swatinem/rust-cache, and a floating-HEAD pin for dtolnay/rust-toolchain@nightly, clearly flagged as such). Per this repo's own established precedent on sibling PRs #7 and #8, any .github/workflows/ change is out of scope for automated approval regardless of mechanical correctness — that verdict applies here too.

Separately, CI is currently red on this PR's head commit: cargo fmt and cargo clippy both fail. Based on the identical, already-diagnosed failure pattern on #7/#8 (pre-existing formatting drift in crates/magna-types and 3 pre-existing clippy lints in crates/magna-core — type_complexity in batch.rs:68, unnecessary_lazy_evaluations in planner.rs:144, needless_range_loop in executor.rs:151), these failures are drift on main predating this branch, not something this PR's two-file permissions/pin diff introduced. That doesn't change the scope verdict above, but it's not an additional blocker introduced by this PR either.

Not approving; leaving as draft (already draft).


Generated by Claude Code

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.

1 participant