Skip to content
Open
Show file tree
Hide file tree
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/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v7.0.0
uses: actions/checkout@v7.0.1

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

for f in .github/workflows/ci.yml .github/workflows/coverage.yml .github/workflows/security.yml; do
  echo "### $f"
  wc -l "$f"
  echo
  nl -ba "$f" | sed -n '1,220p'
  echo
done

Repository: Microck/kagi-cli

Length of output: 252


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show checkout step context and any git/auth-related steps in the workflows.
rg -n -C 3 'actions/checkout|persist-credentials|git |github.token|GITHUB_TOKEN|permissions:' .github/workflows/ci.yml .github/workflows/coverage.yml .github/workflows/security.yml

Repository: Microck/kagi-cli

Length of output: 2203


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the repository for any workflow docs or conventions around checkout credentials.
rg -n 'persist-credentials|checkout' .github README* docs* . 2>/dev/null | head -n 200

Repository: Microck/kagi-cli

Length of output: 2047


🏁 Script executed:

#!/bin/bash
set -euo pipefail

nl -ba .github/workflows/ci.yml | sed -n '1,140p'
echo '---'
nl -ba .github/workflows/coverage.yml | sed -n '1,120p'
echo '---'
nl -ba .github/workflows/security.yml | sed -n '1,140p'

Repository: Microck/kagi-cli

Length of output: 194


Sensitive Data Exposure (CWE-522): Insufficiently Protected Credentials

Disable checkout credential persistence in these non-publishing workflows. actions/checkout writes the workflow token into git config by default; add with: persist-credentials: false to the Checkout steps in .github/workflows/ci.yml#L23, .github/workflows/coverage.yml#L21, and .github/workflows/security.yml#L25 unless authenticated git access is required.

🧰 Tools
🪛 zizmor (1.26.1)

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

(artipacked)

📍 Affects 3 files
  • .github/workflows/ci.yml#L23-L23 (this comment)
  • .github/workflows/coverage.yml#L21-L21
  • .github/workflows/security.yml#L25-L25
🤖 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 at line 23, Disable checkout credential persistence
for the Checkout steps using actions/checkout in .github/workflows/ci.yml at
lines 23-23, .github/workflows/coverage.yml at lines 21-21, and
.github/workflows/security.yml at lines 25-25 by adding with:
persist-credentials: false; no authenticated git access is required.

Source: Linters/SAST tools


- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v7.0.0
uses: actions/checkout@v7.0.1

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v7.0.0
uses: actions/checkout@v7.0.1
with:
persist-credentials: false
ref: ${{ github.event_name == 'workflow_dispatch' && github.ref || github.event.workflow_run.head_sha }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v7.0.0
uses: actions/checkout@v7.0.1
with:
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.release_tag || github.ref }}
persist-credentials: false
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v7.0.0
uses: actions/checkout@v7.0.1
with:
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.release_tag || github.ref }}
persist-credentials: false
Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v7.0.0
uses: actions/checkout@v7.0.1
with:
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.release_tag || github.ref }}
persist-credentials: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v7.0.0
uses: actions/checkout@v7.0.1

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
Expand Down