Skip to content

Security

Runs dependency audits → secret scanning → CodeQL SAST for Node.js and/or Python projects. Each job is independently toggleable.

Usage

yaml
jobs:
  security:
    uses: KevinDeBenedetti/github-workflows/.github/workflows/security.yml@main
    with:
      run-node-audit: true
      run-codeql: true
      codeql-languages: '["javascript","typescript"]'

Inputs

InputTypeDefaultDescription
run-node-auditbooleantrueRun pnpm audit --audit-level=high
node-working-directorystring'.'Path to the Node.js app
run-python-auditbooleanfalseRun pip-audit via uvx
python-working-directorystring'.'Path to the Python app
run-secret-scanbooleantrueRun Gitleaks secret scanning
run-codeqlbooleantrueRun CodeQL SAST analysis
codeql-languagesstring'["javascript","typescript"]'JSON array of languages for CodeQL

Jobs

JobCondition
audit-noderun-node-audit: true
audit-pythonrun-python-audit: true
secret-scanrun-secret-scan: true
codeqlrun-codeql: true (matrix per language)

Notes

  • Secret scanning uses actions/checkout with fetch-depth: 0 (full history) to scan all commits.
  • Gitleaks SARIF results are uploaded to the Security tab on failure.
  • CodeQL runs in a matrix — add multiple languages to scan them in parallel.
  • Requires security-events: write permission for Gitleaks and CodeQL (granted automatically).
  • GITLEAKS_LICENSE secret is optional; only needed for private repos with the Gitleaks enterprise plan.