Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
release:
uses: sxzz/workflows/.github/workflows/release.yml@v2.0.0
uses: sxzz/workflows/.github/workflows/release.yml@main
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚖️ Poor tradeoff

Pin the reusable workflow to a full commit SHA instead of the mutable @main ref.

Referencing @main means any commit pushed to sxzz/workflows — without a review in this repo — will be silently picked up on the next release tag push. Because this job runs with id-token: write (OIDC federation, e.g. npm publish) and contents: write, a broken or compromised commit on @main can corrupt a release or exfiltrate OIDC credentials.

The PR description notes that tag-based versions are deprecated, which is understood. However, a full commit SHA is the recommended mitigation: it locks to a specific, auditable state of the workflow without needing versioned tags.

🔒 Suggested fix: pin to a commit SHA
-    uses: sxzz/workflows/.github/workflows/release.yml@main
+    uses: sxzz/workflows/.github/workflows/release.yml@<FULL_COMMIT_SHA>

Replace <FULL_COMMIT_SHA> with the current HEAD SHA of sxzz/workflows@main. You can keep a comment beside it to track which "version" it corresponds to:

    # sxzz/workflows main @ 2026-05-06
    uses: sxzz/workflows/.github/workflows/release.yml@<FULL_COMMIT_SHA>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release.yml at line 10, In .github/workflows/release.yml
change the reusable workflow reference that currently uses
"sxzz/workflows/.github/workflows/release.yml@main" to pin to a specific full
commit SHA (replace `@main` with @<FULL_COMMIT_SHA>), and optionally add a
trailing comment (e.g., "# sxzz/workflows main @ YYYY-MM-DD") to document which
HEAD SHA/version is pinned; ensure the SHA corresponds to the current HEAD of
sxzz/workflows@main so the workflow is locked to an auditable, immutable commit.

with:
publish: true
permissions:
Expand Down