name: CI & Agent Harness Check
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile && pnpm test
- uses: 0xmariowu/AgentLint@6cf433c4092ee10a3162c2f4ddd68ff13b5d4aff # v1
with:
fail-below: "75"
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: always()
with:
name: test-report
path: coverage/Action Pinning Diff Summary
Read AgentLint Rule S2 (Actions SHA Pinned)Built-In Verified Offline SHA Table (46 Popular Actions)
Frequently Asked Questions
Why should GitHub Actions be pinned to a 40-character commit SHA instead of @v4?
Git tags such as @v4 or branches like @main are mutable. If an upstream maintainer account or token is compromised (as in the 2025 tj-actions/changed-files incident), a force-pushed tag executes attacker code inside your CI runner with access to repository secrets. A full 40-hex commit SHA is immutable.
Does this tool upload my workflow file to a backend server?
No. Parsing and offline SHA pinning run 100% locally in your browser. If you click Resolve Live SHAs via GitHub API, your browser only queries GitHub's public REST API with owner/repo and tag name for unresolved actions.
Why are local ./ actions and docker:// references skipped?
Local workspace actions (./.github/actions/...) are already versioned inside the exact commit being checked out, and docker:// references require sha256 image digests rather than Git commit SHAs.