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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
with:
fetch-depth: 0
Comment on lines +18 to 20

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the workflow with line numbers.
sed -n '1,120p' .github/workflows/ci.yml | cat -n

# Show all actions/checkout usages in the repo.
rg -n "actions/checkout@" .github/workflows -S

Repository: athal7/opencode-devcontainers

Length of output: 3624


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the workflow with line numbers.
sed -n '1,140p' .github/workflows/ci.yml | cat -n

# Show all actions/checkout usages in the repo.
rg -n "actions/checkout@" .github/workflows -S

Repository: athal7/opencode-devcontainers

Length of output: 3624


Disable checkout credentials in the test job.
npm ci and npm test run repository/dependency-controlled code, so leaving GITHUB_TOKEN in .git/config is unnecessary exposure. Add persist-credentials: false here, as in the release job.

Proposed fix
      - uses: actions/checkout@v7
        with:
          fetch-depth: 0
+         persist-credentials: false
📝 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
with:
fetch-depth: 0
- uses: actions/checkout@v7
with:
fetch-depth: 0
persist-credentials: false
🧰 Tools
🪛 zizmor (1.26.1)

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

(artipacked)

🤖 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/ci.yml around lines 18 - 20, Update the actions/checkout
step in the test job to set persist-credentials to false alongside fetch-depth,
matching the release job configuration.

Source: Linters/SAST tools


Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
new_release_published: ${{ steps.semantic.outputs.new_release_published }}
new_release_version: ${{ steps.semantic.outputs.new_release_version }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
with:
fetch-depth: 0
persist-credentials: false
Expand Down
Loading