Skip to content

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

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

glebedel wants to merge 5 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 and the local composite action (.github/actions) 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 [email protected] 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 <[email protected]>
Co-authored-by: Guillaume Lebedel <[email protected]>
@glebedel glebedel self-assigned this Nov 2, 2026
Copilot AI balanced review requested due to automatic review settings November 2, 2026 02:24
@glebedel
glebedel requested a review from a team as a code owner November 2, 2026 02:24
@pkg-pr-new

pkg-pr-new Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/StackOneHQ/stackone-ai-node/@stackone/ai@396

commit: a86d1db

Comment thread .github/workflows/security-scan.yml Resolved

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 filename security-scan.yml conflicts with the documented .yaml naming convention and needs to be renamed to security-scan.yaml.

1 open issue
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 2.7.0 and zizmor 1.31.1, with reports written to job summaries.
  • Runs scans on pull requests, pushes to main, a weekly schedule, and manual dispatch.
  • Uses read-only permissions and SHA-pinned checkout with credential persistence disabled.
File Description
.github/​workflows/​security-scan.yml Adds scheduled and event-driven dependency and workflow audits with non-blocking findings.

Review effort: Balanced

Comment thread .github/workflows/security-scan.yaml Resolved
s2d2-s1 and others added 2 commits November 2, 2026 02:27
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-authored-by: Guillaume Lebedel <[email protected]>
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 <[email protected]>
Co-authored-by: Guillaume Lebedel <[email protected]>

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 were identified for the dependency and workflow security scanning changes.

No open issues 🎉

1 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 <[email protected]>
Co-authored-by: Guillaume Lebedel <[email protected]>

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 dependency and workflow security scans.

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 [email protected] 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