Automatically pin mutable third-party GitHub Actions (@v4, @main) to full 40-character commit SHAs across your repositories and catch workflow supply-chain risks on every pull request — with zero LLM calls and zero source-code storage.
GitHub Organizations increasingly enforce SHA pinning policies to mitigate tag-hijacking supply-chain attacks in GitHub Actions. Manually converting @v4 tags into full 40-character commit SHAs across dozens of repositories — while keeping human-readable version comments — is tedious and error-prone.
/pinshield fix on a PR), PinShield resolves each tag/branch via GitHub's Git Refs API (dereferencing annotated tags) and opens one clean PR from branch pinshield/harden-workflows rewriting uses: actions/checkout@v4 into uses: actions/checkout@<40-char-sha> # v4 while preserving formatting and comments.pull_request_target checkouts, shell script injections, missing timeouts, and missing concurrency guards..github/workflows/*.yml and optional .pinshield.yml in memory on Cloudflare Workers. No application source code is ever downloaded, logged, or sent to any LLM.| Rule ID | Severity | What It Detects | Auto-Fix |
|---|---|---|---|
unpinned-action |
HIGH | Third-party actions and reusable workflows using mutable tags/branches instead of 40-char commit SHAs. | Yes (40-char SHA + # ref) |
pull-request-target-checkout |
HIGH | pull_request_target workflows checking out untrusted PR head refs/SHAs (PwnRequest RCE). |
PR Check Run |
script-injection |
HIGH | Untrusted GitHub contexts (github.event.pull_request.title, issue.body, head_ref, etc.) interpolated directly into run: shell scripts. |
PR Check Run |
broad-permissions |
HIGH | permissions: write-all or workflow top-level write grants on sensitive scopes. |
PR Check Run |
missing-permissions |
MEDIUM | Workflows omitting an explicit permissions: block. |
PR Check Run |
missing-timeout |
LOW | Runner jobs missing timeout-minutes: (GitHub defaults to 360 minutes). |
Yes (adds safe default) |
missing-concurrency |
LOW | pull_request workflows without concurrency.cancel-in-progress: true. |
PR Check Run |
.pinshield.yml)PinShield works with zero configuration. To customize behavior per repository, add .pinshield.yml to the root directory:
autoFixPr: true # Set false to run Check Runs only
addTimeoutMinutes: 30 # Set 0 to skip adding timeout-minutes in Auto-Fix PRs
failOnSeverity: high # high | medium | low | none
ignoreActions:
- "my-org/*" # Skip internal actions if desired
ignoreRules:
- missing-concurrency
ignorePaths:
- ".github/workflows/legacy-*.yml"
Checks: Read & Write — Post inline annotations on pull requests.Workflows: Read & Write & Contents: Read & Write — Read .github/workflows/*.yml and commit pinned SHAs to branch pinshield/harden-workflows.Pull Requests: Read & Write — Open or update the hardening PR.Metadata: Read-only — Required by GitHub Apps.Workflow YAML files are processed purely in-memory during webhook execution and discarded immediately. Only public action tag-to-SHA resolutions (e.g. actions/checkout@v4) and GitHub Marketplace plan status metadata are cached in Cloudflare KV. Upon subscription cancellation, account metadata is automatically purged within 30 days.
PinShield is free for all public and private repositories during the initial launch phase. For support, bug reports, or security inquiries, contact [email protected].