Repository navigation
Workflow pin comments
What it does. Fails when the # vX.Y.Z comment on a SHA-pinned uses: line does not name the commit the line is pinned to.
It is read-only, holds no secret beyond the job's own read-only token and checks nothing out but your repository.
Why it exists. A pin by commit is only reviewable when its version comment is true. zizmor's ref-version-mismatch audit
checks this, but only for callers that run zizmor. This is the same check as a job of its own. It is opt-in; nothing existing
changes.
- A
uses: owner/repo@<40 hex>line with no version comment (# vX.Y.Z,# v4). - A comment whose tag does not exist in
owner/repo. - A tag that resolves to a different commit than the pin. The message prints both.
- No workflow or action file at all: nothing checked is not a pass.
- A lookup that could not be completed (network error, timeout, rate limit, unreadable answer, or the budget of 200 lookups or
120 seconds used up) is reported
UNVERIFIEDand fails the job. Setunverified: warnto print those lines and pass; a real mismatch still fails.
Files scanned: .github/workflows/*.yml|yaml and .github/actions/**/action.yml|yaml. Local ./ and docker://
references, and references not pinned to a full commit, are left alone. Every problem is listed before the job fails.
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
jobs:
pin-comments:
uses: ChiefGyk3D/git-your-ship-together/.github/workflows/pin-comments.yml@<sha> # vX.Y.Z
permissions:
contents: readThe script is scripts/check_pin_comments.py, standard library only. GITHUB_TOKEN=... python3 -I scripts/check_pin_comments.py runs the same checks (the token is optional and sent only over https). The workflow carries a
byte-identical copy, because a reusable workflow cannot read files from its own repository; tests/test_pin_comments.py fails
if the copy differs.
Inputs (6), read from pin-comments.yml:
| Input | Type | Default | Meaning |
|---|---|---|---|
unverified |
string | fail |
What a lookup that could not be completed (network error, timeout, rate limit, unreadable answer) does - fail fails the job, warn prints it and passes. A tag that does not exist or points at another commit always fails. |
egress-policy |
string | block |
harden-runner egress policy - audit logs outbound connections, block allows only allowed-endpoints. |
egress-policy-secretless |
string | block |
Accepted and validated (exactly audit or block) for parity with the other workflows, but unused - this job holds the job token for its API lookups, so it follows egress-policy. |
allowed-endpoints |
string | api.github.com:443 github.com:443 |
harden-runner allow-list for block, space-separated host:port entries. The default is what the checkout needs; wildcards are not supported. |
extra-allowed-endpoints |
string | empty | Appended to allowed-endpoints, for hosts the check must reach beyond the GitHub API. Same format. |
timeout-minutes |
number | 10 |
Job timeout. |
It never writes anything, never sends its token anywhere but the GitHub API host, and never passes on a lookup it could not make
unless you ask for unverified: warn.
Generated from docs/wiki/ at commit f3af2fa0bae3. Do not edit this wiki: the next push to main replaces every page. Corrections go to docs/wiki/ by pull request.
GYST
- Home
- Why GYST exists
- Getting started
- Design rules
- Secrets: Doppler and OIDC
- Security scanning explained
- The baseline and the weekly audit
- Releases and supply chain
- Keeping a project board current
- Adopting GYST in your own project
- Glossary
- Roadmap
Learn and contribute
- Learning path
- Which workflow do I need?
- Repository map
- Egress control
- Troubleshooting
- Lessons learned
- Testing and the contract
- Contributing and developing
- Maintaining this wiki
- Verify main
- FAQ
CI
Security
Release
- container-release
- python-docker-release
- python-package-release
- artifact-release
- verify-published
- base-image-digest
Docs and project
- docs-pages
- wiki-publish
- project-sync
- threat-model
- lory-audit
- agent-scan
- token-drift
- node-typecheck
- pr-title-lint
- vendored-drift
- upstream-sync
- repin
- pin-comments
Tools