Skip to content

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

Open
mpartipilo wants to merge 1 commit intomainfrom
security/pin-actions-and-linters
Open

feat: pin GitHub Actions to SHA hashes and add security linters#563
mpartipilo wants to merge 1 commit intomainfrom
security/pin-actions-and-linters

Conversation

@mpartipilo
Copy link
Copy Markdown
Contributor

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 unit test 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

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>
@mpartipilo mpartipilo requested a review from a team as a code owner April 16, 2026 12:56
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

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