KeyLeak GitHub Action

May 27, 2026 · View on GitHub

Scan your codebase and preview deployments for exposed API keys, BaaS misconfigurations, and secrets — directly in your CI/CD pipeline.

Quick Start

Scan local files on every PR

name: KeyLeak Security Scan
on: [pull_request]

jobs:
  keyleak:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: Amal-David/keyleak-detector@v0.5.0
        with:
          mode: local
          fail-on: high

Scan Vercel preview deployments

name: KeyLeak Preview Scan
on:
  deployment_status:

jobs:
  keyleak:
    if: github.event.deployment_status.state == 'success'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: Amal-David/keyleak-detector@v0.5.0
        with:
          mode: browser
          url: ${{ github.event.deployment_status.target_url }}
          baas-validate: true
          fail-on: high

Scan Netlify deploy previews

name: KeyLeak Netlify Scan
on:
  deployment_status:

jobs:
  keyleak:
    if: github.event.deployment_status.state == 'success'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: Amal-David/keyleak-detector@v0.5.0
        with:
          mode: browser
          url: ${{ github.event.deployment_status.environment_url }}
          baas-validate: true
          fail-on: high

Full scan (local + browser)

- uses: Amal-David/keyleak-detector@v0.5.0
  with:
    mode: both
    url: https://preview.example.com
    baas-validate: true
    fail-on: high
    output-format: sarif

Inputs

InputDefaultDescription
modelocallocal (files), browser (live URL), or both
urlURL to scan in browser mode
baas-validatefalseEnable active BaaS validation (Supabase RLS, Firebase rules)
fail-onhighSeverity threshold: low, medium, high, critical
launch-profileciProfile: launch-gate, local-dev, bug-bounty, ci, full
allowlistkeyleak-allowlist.yamlPath to allowlist file
output-formatjsonOutput: json, sarif, markdown, html

Outputs

OutputDescription
verdictSAFE_TO_SHIP, REVIEW, or BLOCK_SHIP
findings-countTotal number of findings
report-pathPath to the generated report file

SARIF Integration

Upload findings to GitHub Security tab:

- uses: Amal-David/keyleak-detector@v0.5.0
  with:
    mode: local
    output-format: sarif
    fail-on: high

- uses: github/codeql-action/upload-sarif@v3
  if: always()
  with:
    sarif_file: keyleak-report.sarif