Skip to content

feat: pin GitHub Actions to SHA hashes and add security linters#2016

Open
mpartipilo wants to merge 2 commits intomainfrom
security/pin-actions-and-linters
Open

feat: pin GitHub Actions to SHA hashes and add security linters#2016
mpartipilo wants to merge 2 commits intomainfrom
security/pin-actions-and-linters

Conversation

@mpartipilo
Copy link
Copy Markdown

Summary

  • Pin all external GitHub Actions to immutable commit SHAs (instead of mutable tags) across all workflow files to prevent supply chain attacks
  • Add tools/linter_actions_pinned.sh as a CI step in the lint-and-format job to enforce SHA pinning going forward
  • Add tools/linter_hidden_unicode.sh and a pull_request_target workflow 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.sh passes locally (all actions verified as SHA-pinned)
  • linter_hidden_unicode.sh --stdin correctly detects zero-width space (U+200B) in test input
  • linter_hidden_unicode.sh --stdin passes clean input without false positives
  • CI pipeline runs successfully with SHA-pinned actions

🤖 Generated with Claude Code

mpartipilo and others added 2 commits April 16, 2026 14:55
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>
@mpartipilo mpartipilo requested a review from a team as a code owner April 16, 2026 12:55
Copy link
Copy Markdown

@orca-security-eu orca-security-eu bot left a comment

Choose a reason for hiding this comment

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

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.92%. Comparing base (78fa5f7) to head (4ceb15b).
⚠️ Report is 6 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants