Skip to content

ci: pin actions - #113

Merged
robjtede merged 1 commit into
mainfrom
codex/ci-pin-actions
Jul 4, 2026
Merged

ci: pin actions#113
robjtede merged 1 commit into
mainfrom
codex/ci-pin-actions

Conversation

@robjtede

@robjtede robjtede commented Jul 4, 2026

Copy link
Copy Markdown
Member

Pins GitHub Actions workflow refs with pinact.

Summary by CodeRabbit

  • Chores
    • Updated automated workflows to use fixed, version-pinned action references.
    • This improves build and test consistency, reduces risk from upstream changes, and makes CI runs more predictable.

@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR pins third-party GitHub Actions used across ci.yml, coverage.yml, dependabot-reviewer.yml, and lint.yml workflows to specific commit SHAs instead of mutable tag references, with no changes to job structure, triggers, or commands.

Changes

GitHub Actions SHA Pinning

Layer / File(s) Summary
CI and coverage job action pinning
.github/workflows/ci.yml, .github/workflows/coverage.yml
Checkout, Determinate Nix, FlakeHub cache, Rust toolchain, cargo-nextest, Nix devshell, cargo-llvm-cov, and Codecov actions are switched from tag-based to SHA-pinned references.
Lint workflow job action pinning
.github/workflows/lint.yml
The fmt, clippy, docs, and audit jobs pin checkout, Rust toolchain setup, rustfmt, clippy-action, and cargo-deny action references to commit SHAs.
Dependabot reviewer action pinning
.github/workflows/dependabot-reviewer.yml
The dependabot/fetch-metadata step is switched from the v3.1.0 tag to a pinned commit SHA.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: pinning CI GitHub Actions references.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/ci-pin-actions

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@robjtede
robjtede enabled auto-merge July 4, 2026 19:02

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/ci.yml:
- Line 36: The CI workflow’s actions/checkout step is leaving persisted
credentials enabled even though the job only runs build/test commands. Update
the checkout configuration in the workflow to disable persisted checkout
credentials, using the existing actions/checkout reference in the CI job so the
default token is not written to .git/config.

In @.github/workflows/coverage.yml:
- Line 19: The checkout step in the coverage workflow leaves the GitHub token
available to later steps, which should be disabled for this job. Update the
actions/checkout usage in the workflow to turn off credential persistence so
repository code can run without exposing the checkout token. Use the checkout
step itself as the target for the fix.

In @.github/workflows/lint.yml:
- Line 22: The lint workflow checkout step is still persisting Git credentials
by default; update each actions/checkout step in the lint jobs to disable
credential persistence. Use the checkout step in the lint workflow as the target
and add persist-credentials set to false so these jobs only perform a local
clone without storing the token in git config.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7cfe0553-4e77-476f-abd8-83cc45861a55

📥 Commits

Reviewing files that changed from the base of the PR and between fa5a479 and 220094c.

📒 Files selected for processing (4)
  • .github/workflows/ci.yml
  • .github/workflows/coverage.yml
  • .github/workflows/dependabot-reviewer.yml
  • .github/workflows/lint.yml

Comment thread .github/workflows/ci.yml

steps:
- uses: actions/checkout@v7
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the workflow around the referenced line and locate any git-related steps.
git ls-files .github/workflows/ci.yml
echo "----"
cat -n .github/workflows/ci.yml | sed -n '1,220p'
echo "----"
rg -n "checkout|persist-credentials|git (push|fetch|submodule|tag|commit)|actions/checkout" .github/workflows/ci.yml

Repository: x52dev/contracts

Length of output: 2500


Disable persisted checkout credentials. This job only runs build/test commands, so the default token in .git/config is unnecessary and widens the impact of any compromised step.

Suggested change
       - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
+        with:
+          persist-credentials: false
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
🧰 Tools
🪛 zizmor (1.26.1)

[warning] 36-36: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml at line 36, The CI workflow’s actions/checkout step
is leaving persisted credentials enabled even though the job only runs
build/test commands. Update the checkout configuration in the workflow to
disable persisted checkout credentials, using the existing actions/checkout
reference in the CI job so the default token is not written to .git/config.

Source: Linters/SAST tools

name: Coverage
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Map the workflow file structure first
ast-grep outline .github/workflows/coverage.yml --view expanded || true

# Show the relevant workflow section with line numbers
cat -n .github/workflows/coverage.yml | sed -n '1,220p'

# Find later steps that execute repository code or use git credentials
rg -n "persist-credentials|checkout|run:|npm|yarn|pnpm|python|pytest|coverage|git " .github/workflows/coverage.yml

Repository: x52dev/contracts

Length of output: 2284


Disable checkout credential persistence.

This job runs repository code after checkout, so the checkout token is unnecessary and should not be left available to later steps.

🧰 Tools
🪛 zizmor (1.26.1)

[warning] 19-19: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/coverage.yml at line 19, The checkout step in the coverage
workflow leaves the GitHub token available to later steps, which should be
disabled for this job. Update the actions/checkout usage in the workflow to turn
off credential persistence so repository code can run without exposing the
checkout token. Use the checkout step itself as the target for the fix.

Source: Linters/SAST tools


steps:
- uses: actions/checkout@v7
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== lint workflow =="
cat -n .github/workflows/lint.yml | sed -n '1,220p'

echo
echo "== workflow permissions references =="
rg -n --hidden -S 'permissions:|persist-credentials|actions/checkout@' .github/workflows

Repository: x52dev/contracts

Length of output: 4036


Disable checkout credential persistence in the lint jobs.

actions/checkout still stores the token in git config by default. These jobs only need a local checkout, so set persist-credentials: false on each checkout step in this file.

🧰 Tools
🪛 zizmor (1.26.1)

[warning] 22-22: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/lint.yml at line 22, The lint workflow checkout step is
still persisting Git credentials by default; update each actions/checkout step
in the lint jobs to disable credential persistence. Use the checkout step in the
lint workflow as the target and add persist-credentials set to false so these
jobs only perform a local clone without storing the token in git config.

Source: Linters/SAST tools

@robjtede
robjtede disabled auto-merge July 4, 2026 19:06
@robjtede
robjtede enabled auto-merge July 4, 2026 19:06
@robjtede
robjtede disabled auto-merge July 4, 2026 19:06
@robjtede
robjtede merged commit e417f32 into main Jul 4, 2026
10 checks passed
@robjtede
robjtede deleted the codex/ci-pin-actions branch July 4, 2026 19:06
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