feat: pin GitHub Actions to SHA hashes and add security linters#2016
Open
mpartipilo wants to merge 2 commits intomainfrom
Open
feat: pin GitHub Actions to SHA hashes and add security linters#2016mpartipilo wants to merge 2 commits intomainfrom
mpartipilo wants to merge 2 commits intomainfrom
Conversation
Prevent supply chain attacks by replacing mutable tag references with immutable commit SHAs across all workflow files. Add CI linter to enforce SHA pinning and a PR security workflow to detect hidden Unicode characters (trojan-source prevention). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Pin all external GitHub Actions references to immutable commit SHAs and add the pinned actions linter step to the lint-and-format job. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2016 +/- ##
==========================================
- Coverage 87.95% 87.92% -0.03%
==========================================
Files 280 280
Lines 21664 21666 +2
==========================================
- Hits 19054 19050 -4
- Misses 2610 2616 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tools/linter_actions_pinned.shas a CI step in the lint-and-format job to enforce SHA pinning going forwardtools/linter_hidden_unicode.shand apull_request_targetworkflow to detect hidden/invisible Unicode characters in PR diffs (trojan-source prevention)Motivation
Mutable tags can be moved to point at malicious commits — this happened in practice with
tj-actions/changed-files(CVE-2025-30066). SHA pinning makes this impossible. The hidden Unicode linter guards against trojan-source attacks where invisible characters manipulate code rendering.Based on patterns from weaviate/weaviate#10907, weaviate/weaviate#10909, and weaviate/csharp-client#313.
Test plan
bash tools/linter_actions_pinned.shpasses locally (all actions verified as SHA-pinned)linter_hidden_unicode.sh --stdincorrectly detects zero-width space (U+200B) in test inputlinter_hidden_unicode.sh --stdinpasses clean input without false positives🤖 Generated with Claude Code