Repository navigation
ci: harden validation workflows - #113
carolinerg1 merged 2 commits into
Conversation
damaz91
left a comment
There was a problem hiding this comment.
LGTM — thank you for hardening these validation workflows, @FanouZeng-TT!
Verified that all five action references (actions/checkout@v5, super-linter/super-linter/slim@v8, actions/setup-python@v6, pre-commit/action@v3.0.1, and streetsidesoftware/cspell-action@v8) resolve to their exact target commit SHAs and match the pins used across the sibling UCP repositories, and that persist-credentials: false and least-privilege permissions pass zizmor cleanly.
|
Friendly ping on this one — it was approved on 2026-10-30 and has been mergeable since. For context, this is the last piece of the CI hardening series in this repo: the equivalent change already landed in Nothing is pending on my side; happy to rebase or adjust if anything has moved since the approval. |
|
Thank you @FanouZeng-TT for submitting this and for the nudge! One small non-blocking follow-up: .github/workflows/conventional-commits.yml (line 36) still references amannn/action-semantic-pull-request@v6 by tag. Would you mind pinning that one too in a quick follow-up so conformance is fully pinned. Thank you. |
79a0f40
into
Universal-Commerce-Protocol:main
Description
Four conformance workflows run third-party Actions by mutable tag, or inherit token permissions they do not need:
linter.yaml—actions/checkout@v5andsuper-linter/super-linter/slim@v8, with a checkout that keeps its credentials.pre-commit.yml—actions/checkout@v5,actions/setup-python@v6,pre-commit/action@v3.0.1, and no explicit workflowpermissions, so the job inherits the repository default token.spellcheck.yaml—actions/checkout@v5andstreetsidesoftware/cspell-action@v8, with a read-only checkout that keeps its credentials.pr-review-listener.yml— only echoes the review event's PR number, but inherits the repository's default token permissions.A mutable tag can be retargeted at any time, so a retagged or compromised upstream release would run here unreviewed. The read-only jobs never push, so their checkouts do not need persisted credentials, and a pure logging job needs no token at all.
Fix: harden these four workflows together: pin every referenced Action to its current tag's full commit SHA, add
permissions: contents: readto the pre-commit job, disable credential persistence on the read-only checkouts, and give the pure signal jobpermissions: {}.linter.yamlkeeps itspackages/statusespermissions andspellcheck.yamlkeeps its job-levelcontents/actionsreads, both unchanged; triggers and job commands are untouched.conformance-tests.ymlis already pinned and is excluded because open PR #107 modifies it.Category (Required)
Related Issues
N/A
Checklist
generate_models.shunderpython_sdk.Screenshots / Logs (if applicable)