Skip to content
Open
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/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7

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 | 🔴 Critical | ⚡ Quick win

Action reference must be pinned to a commit hash to comply with security policy.

The static analysis tool flags an ERROR: "action is not pinned to a hash (required by blanket policy)". Using a semantic version tag (v7) instead of a full commit hash makes the action vulnerable to tag mutation attacks and violates the repository's documented security requirements.

📌 Proposed fix: Pin action to commit hash
-      - uses: actions/checkout@v7
+      - uses: actions/checkout@e2f67f32abdc3755287c92b8e1dfb8f30b7e5786

To find the commit hash for actions/checkout@v7, visit the actions/checkout releases page and copy the commit SHA from the release tag.

Alternatively, if your security policy permits semantic versioning, please add an explicit policy exception and document the rationale.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- uses: actions/checkout@v7
- uses: actions/checkout@e2f67f32abdc3755287c92b8e1dfb8f30b7e5786
🧰 Tools
🪛 zizmor (1.25.2)

[warning] 16-16: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[error] 16-16: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

🤖 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/build-and-test.yml at line 16, The actions/checkout@v7
reference in the workflow file uses a semantic version tag instead of a commit
hash, which violates the security policy. Replace the `v7` tag with the full
commit SHA by visiting the actions/checkout releases page for version 7, copying
the commit hash from the release tag, and updating the action reference to use
the complete commit hash instead of the semantic version tag.

Source: Linters/SAST tools

- name: Setup node
uses: actions/setup-node@v6
with:
Expand Down
Loading