Skip to content

ci: security hardening (dependabot, secret/dep/workflow scanning, pinned actions) - #246

Closed
glebedel wants to merge 4 commits into
mainfrom
s2d2/security-hardening-2026-11
Closed

glebedel wants to merge 4 commits into
mainfrom
s2d2/security-hardening-2026-11

Conversation

@glebedel

@glebedel glebedel commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

What and why

Part of the Security Autopilot CI hardening pass. This repo already has .github/dependabot.yaml, already runs gitleaks in ci.yaml, and already SHA-pins every action, so this PR only adds the two missing scanners:

  • osv-scanner (v2.7.0): scans the lockfiles for known vulnerable dependencies. Installed from the release binary, verified against a SHA-256 pinned in the workflow (OSV_SCANNER_SHA256, bumped together with the version) before use.
  • zizmor (v1.31.1): audits the workflows for unsafe patterns such as template injection, excessive permissions and credential persistence. Run with pipx run zizmor==1.31.1.

The new .github/workflows/security-scan.yaml is report-only for now: both scanners write their output to the job summary and the job never fails on findings, because there is an existing backlog to triage first. A scanner that fails to run fails its job, so a broken scan is never shown as clean: osv-scanner exit codes 0 (clean), 1 (findings) and 128 (no packages) pass and any other code fails; zizmor runs with --no-exit-codes under set -e, so findings pass and tool errors fail. It runs on pull requests, pushes to main, weekly (Monday 05:23 UTC) and on manual dispatch. Top-level permissions: contents: read, checkout with persist-credentials: false, all actions pinned by SHA. No SARIF upload (code scanning is not available on this plan).

No dependabot, gitleaks, auto-merge or pinning changes.

Files

  • .github/workflows/security-scan.yaml (new)

Verification

  • actionlint 1.7.12: clean.
  • zizmor 1.31.1 on the new file (regular and auditor personas): no findings.
  • Ran the osv-scanner install step locally: the pinned hash matches both the release manifest and the downloaded binary; osv-scanner scan source -r --format markdown . produces a report for the lockfiles and exits 1 on findings, which the step accepts.
  • The workflow runs on this PR; see the "Security scan" checks and their job summaries.

Requested by guillaume@stackone.com in Slack (Security Autopilot apply A+B+C)

🤖 Generated with Claude Code

Adds .github/workflows/security-scan.yml running osv-scanner (pinned,
checksum-verified release binary) and zizmor (pinned) on pull requests,
pushes to main, weekly and on demand. Findings go to the job summary
and never fail the job. gitleaks already runs in ci.yaml and all
actions are already SHA-pinned, so neither is repeated here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Guillaume Lebedel <10488548+glebedel@users.noreply.github.com>
@glebedel glebedel self-assigned this Nov 2, 2026
Copilot AI balanced review requested due to automatic review settings November 2, 2026 02:24
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The workflow suppresses OSV scan failures and pipx/zizmor installation or execution errors, allowing checks to pass even when dependency or workflow auditing never completes.

2 open issues
What changed in this PR

Adds report-only dependency and workflow security scanning alongside the existing gitleaks checks, without changing Dependabot or existing action pins.

Changes:

  • Adds checksum-verified osv-scanner and version-pinned zizmor, with reports written to job summaries.
  • Runs on pull requests, pushes to main, a weekly schedule, and manual dispatch.
  • Uses read-only permissions and SHA-pinned checkout without persisted credentials.
File Description
.github/​workflows/​security-scan.yml Adds dependency and workflow scanning jobs with non-blocking findings and summary output.

Review effort: Balanced

Comment thread .github/workflows/security-scan.yml Resolved
Comment thread .github/workflows/security-scan.yml Resolved
Comment thread .github/workflows/security-scan.yaml Resolved
Findings still never fail the job. osv-scanner exit codes 127 and above
and any zizmor error (run with --no-exit-codes) now fail the job instead
of being reported as a clean run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Guillaume Lebedel <10488548+glebedel@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are recorded for the added report-only dependency and workflow security scans.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

The osv-scanner SHA-256 is pinned in the workflow instead of read from the release manifest. osv-scanner exit codes 0, 1 and 128 pass; any other code fails the job. zizmor runs under set -e with --no-exit-codes, so findings pass and tool errors fail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Guillaume Lebedel <10488548+glebedel@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

There are no active review issues for the added dependency and workflow security scanning.

No open issues 🎉

Review effort: Balanced

@glebedel

glebedel commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

Closing without merging. Aikido already covers secrets, dependencies and GitHub Actions workflow checks, so the gitleaks, osv-scanner and zizmor jobs (and the new Dependabot config added with them) would only duplicate it. Requested by guillaume@stackone.com in Slack. The branch is kept, so this can be reopened if needed.

@glebedel glebedel closed this Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants