Skip to content

fix(security): close three supply chain gaps#2

Merged
barkleesanders merged 1 commit into
mainfrom
fix/supply-chain-hardening
Apr 1, 2026
Merged

fix(security): close three supply chain gaps#2
barkleesanders merged 1 commit into
mainfrom
fix/supply-chain-hardening

Conversation

@barkleesanders
Copy link
Copy Markdown
Owner

Summary

  • SHA-pin pre-commit hooks: All 5 hooks in .pre-commit-config.yaml now use full commit SHAs instead of mutable tags (gitleaks, shellcheck-py, pre-commit-hooks, mirrors-typos, zizmor). Tags preserved as inline comments.
  • Add OpenSSF Scorecard badge: Added to README.md alongside existing CI/crates/AUR/Homebrew badges. The repo already runs scorecards.yml with publish_results: true.
  • Pin cross install: Release workflow create_release_assets.yml now installs cross at a specific commit (v0.2.5) instead of unpinned HEAD.

Test plan

  • CI passes (no functional code changes, only pinning + badge)
  • Verify pre-commit hooks still resolve correctly with SHA revs
  • Verify Scorecard badge renders on the PR diff preview

🤖 Generated with Claude Code

- SHA-pin all pre-commit hook revs (gitleaks, shellcheck-py,
  pre-commit-hooks, mirrors-typos, zizmor) to full commit SHAs
  with tag comments for auditability
- Add OpenSSF Scorecard badge to README alongside existing CI badges
- Pin `cross` install in release workflow to v0.2.5 commit SHA
  instead of unpinned HEAD

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the pre-commit configuration to pin dependencies using full commit SHAs and adds an OpenSSF Scorecard badge to the README. Feedback indicates that the version tags included in the comments for the pinned SHAs are incorrect or do not exist for several tools, including gitleaks, shellcheck-py, pre-commit-hooks, typos, and zizmor. These discrepancies should be corrected to ensure the documentation accurately reflects the pinned versions.

Comment thread .pre-commit-config.yaml
repos:
- repo: https://github.com/gitleaks/gitleaks
rev: v8.30.0
rev: 6eaad039603a4de39fddd1cf5f727391efe9974e # v8.30.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.

medium

The version tag v8.30.0 mentioned in the comment does not exist for gitleaks (the current latest is v8.23.3). Additionally, the provided SHA 6eaad039603a4de39fddd1cf5f727391efe9974e corresponds to version v8.21.2. This discrepancy between the SHA and the descriptive comment is misleading and should be corrected to reflect the actual version being pinned.

Comment thread .pre-commit-config.yaml

- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.11.0.1
rev: 745eface02aef23e168a8afb6b5737818efbea95 # v0.11.0.1
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The version tag v0.11.0.1 mentioned in the comment does not exist for shellcheck-py (the current latest is v0.10.0.1). The provided SHA 745eface02aef23e168a8afb6b5737818efbea95 corresponds to v0.10.0.1. Please update the comment to match the actual version.

Comment thread .pre-commit-config.yaml

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # v6.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.

medium

The version tag v6.0.0 mentioned in the comment does not exist for pre-commit-hooks (the current latest is v5.0.0). The provided SHA 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c corresponds to v4.6.0. This mismatch is misleading for future maintenance.

Comment thread .pre-commit-config.yaml

- repo: https://github.com/adhtruong/mirrors-typos
rev: v1.44.0
rev: cf074ce7ed10a99b0147ee84edc05a6b5732a122 # v1.44.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.

medium

The version tag v1.44.0 mentioned in the comment does not exist for typos (the current latest is v1.29.0). The provided SHA cf074ce7ed10a99b0147ee84edc05a6b5732a122 corresponds to v1.23.6. Please ensure the comment accurately reflects the pinned version.

Comment thread .pre-commit-config.yaml

- repo: https://github.com/zizmorcore/zizmor-pre-commit
rev: v1.16.3
rev: 86ee5ea442ee969842e00913c6b76c060a7aa8ef # v1.16.3
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The version tag v1.16.3 mentioned in the comment is incorrect for zizmor (the current latest is v1.1.1). The provided SHA 86ee5ea442ee969842e00913c6b76c060a7aa8ef corresponds to v0.1.1. This discrepancy should be resolved to maintain accurate metadata.

@barkleesanders barkleesanders merged commit 9b9e54e into main Apr 1, 2026
20 checks passed
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