Skip to content
Merged
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
24 changes: 12 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- 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.

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

sed -n '1,220p' .github/workflows/ci.yml

Repository: CoreyLeath-code/LogSight-AI

Length of output: 2604


Disable persisted checkout credentials in every job.
Set persist-credentials: false on each actions/checkout step so later repository-controlled commands don’t inherit the token:

  • .github/workflows/ci.yml#L20
  • .github/workflows/ci.yml#L39
  • .github/workflows/ci.yml#L51-L53
  • .github/workflows/ci.yml#L79
🧰 Tools
🪛 zizmor (1.26.1)

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

(artipacked)

📍 Affects 1 file
  • .github/workflows/ci.yml#L20-L20 (this comment)
  • .github/workflows/ci.yml#L39-L39
  • .github/workflows/ci.yml#L51-L53
  • .github/workflows/ci.yml#L79-L79
🤖 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 20, Disable persisted credentials on every
actions/checkout step in .github/workflows/ci.yml at lines 20, 39, 51-53, and 79
by setting persist-credentials to false; leave the existing checkout behavior
otherwise unchanged.

Source: Linters/SAST tools

- uses: actions/setup-python@v6
with:
python-version: "3.11"
cache: pip
Expand All @@ -27,7 +27,7 @@ jobs:
- run: ruff check .
- run: mypy
- run: pytest
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
if: always()
with:
name: coverage
Expand All @@ -36,8 +36,8 @@ jobs:
package-and-container:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v7
- uses: actions/setup-python@v6
with:
python-version: "3.11"
- run: pip install build
Expand All @@ -48,25 +48,25 @@ jobs:
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
with:
python-version: "3.11"
- run: python -m pip install --upgrade "setuptools>=83" && pip install -e ".[dev]"
- run: bandit -c pyproject.toml -r logsight
- run: pip-audit
- run: pip-licenses --format=json --output-file=licenses.json
- uses: gitleaks/gitleaks-action@v2
- uses: gitleaks/gitleaks-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: anchore/sbom-action@v0
with:
path: .
format: spdx-json
output-file: sbom.spdx.json
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: security-inventory
path: |
Expand All @@ -76,14 +76,14 @@ jobs:
benchmark:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v7
- uses: actions/setup-python@v6
with:
python-version: "3.11"
cache: pip
- run: pip install -e ".[dev]"
- run: mkdir -p benchmarks && pytest tests/test_benchmarks.py --benchmark-only --benchmark-json=benchmarks/latest.json --no-cov
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: benchmark-${{ github.sha }}
path: benchmarks/latest.json
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: github/codeql-action/init@v3
- 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.

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

sed -n '1,120p' .github/workflows/codeql.yml

Repository: CoreyLeath-code/LogSight-AI

Length of output: 563


Disable persisted checkout credentials.

actions/checkout leaves its token in Git config by default. This workflow only runs CodeQL init/analyze, so it doesn't need authenticated Git access later.

Suggested change
      - uses: actions/checkout@v7
+        with:
+          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
- uses: actions/checkout@v7
with:
persist-credentials: false
🧰 Tools
🪛 zizmor (1.26.1)

[warning] 19-19: 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/codeql.yml at line 19, Update the actions/checkout step in
the CodeQL workflow to disable persisted credentials by configuring
persist-credentials as false, while leaving the existing checkout behavior
unchanged.

Source: Linters/SAST tools

- uses: github/codeql-action/init@v4
with:
languages: python
- uses: github/codeql-action/analyze@v3
- uses: github/codeql-action/analyze@v4