Skip to content

Commit 8f36136

Browse files
Berik AshimovBerik Ashimov
authored andcommitted
CI: fix Security workflow (pip-audit pip upgrade, gitleaks via OSS CLI)
pip-audit: upgrade pip so the runner toolchain is not flagged. gitleaks: the gitleaks-action requires a paid license for org repos; use the open-source CLI (v8.30.1) to scan git history instead.
1 parent e254a2d commit 8f36136

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/security.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ jobs:
4141
- uses: actions/setup-python@v5
4242
with:
4343
python-version: "3.13"
44-
- run: pip install pip-audit
44+
# Upgrade pip first so the runner's own pip version is not flagged
45+
# (the audit targets the project's dependency tree, not the toolchain).
46+
- run: pip install --upgrade pip pip-audit
4547
- run: pip-audit --strict
4648

4749
gitleaks:
@@ -51,7 +53,12 @@ jobs:
5153
- uses: actions/checkout@v4
5254
with:
5355
fetch-depth: 0
54-
- uses: gitleaks/gitleaks-action@v2
56+
# Use the gitleaks CLI directly: the gitleaks-action requires a paid
57+
# license for organization repositories, the open-source CLI does not.
58+
- name: Install gitleaks
59+
run: curl -sSL https://github.com/gitleaks/gitleaks/releases/download/v8.30.1/gitleaks_8.30.1_linux_x64.tar.gz | tar -xz -C /usr/local/bin gitleaks
60+
- name: Scan git history for secrets
61+
run: gitleaks git . --redact --verbose
5562

5663
codeql:
5764
name: CodeQL (semantic SAST)

0 commit comments

Comments
 (0)