GitHub Action Reference

The havoc-security/scan-action GitHub Action runs HAVOC security scans as part of your CI/CD workflow. It posts inline PR comments, updates commit status, and optionally syncs results to HAVOC Cloud.

Setup

Minimal setup (free, no cloud account)

# .github/workflows/havoc.yml
name: HAVOC Security Scan
on:
  push:
    branches: [main]
  pull_request:

jobs:
  havoc:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: write  # Required for PR comments
      statuses: write       # Required for commit status

    steps:
      - uses: actions/checkout@@v4
        with:
          fetch-depth: 0  # Full history for diff-aware scanning

      - uses: havoc-security/scan-action@@v1
        with:
          token: {{ secrets.GITHUB_TOKEN }}
Known issue — the published action does not work. havoc-security/scan-action@v1 invokes the CLI with an --output flag that does not exist, swallows the resulting error, and so writes no results file and sets no outputs. It also discards the scan's exit code, so fail-on can never fail a build. A corrected action.yml is in this repository at packages/github-action/scan-action.yml and needs to be pushed to the action repo. Until then, call the CLI directly — see “Without the action” below.

With HAVOC Cloud

- uses: havoc-security/scan-action@@v1
  with:
    api-key: {{ secrets.HAVOC_API_KEY }}  # From havoc.cloud dashboard
    fail-on: high

Without the action

The action is a thin wrapper around the CLI. Calling the CLI directly works today:

- uses: actions/setup-node@@v4
  with:
    node-version: '20'

- run: npx @havoc-security/cli scan --fail-on high

Inputs

Every input the published action accepts. Anything not listed is not implemented.

InputRequiredDefaultDescription
api-keyYes—HAVOC API key from the havoc.cloud dashboard
pathNo.Directory to scan, relative to the checkout root
frameworkNolaravelLaravel is the only implemented value
fail-onNohighFail the workflow at or above this severity
cloud-urlNohttps://havoc.cloudFor self-hosted instances

Outputs

OutputTypeDescription
summarystringFull scan result as compact JSON
gradestringSecurity grade, A–F
findings-countintegerTotal number of findings
critical-countintegerNumber of critical findings
Not implemented: SARIF upload, PR comment posting, coverage thresholds, per-analyzer selection and cloud report URLs were previously documented here but exist in neither the action nor the CLI. Removed rather than left as aspirational documentation.

Examples

Fail the build on high severity

- uses: havoc-security/scan-action@@v1
  with:
    api-key: {{ secrets.HAVOC_API_KEY }}
    fail-on: high

Scan a subdirectory

- uses: havoc-security/scan-action@@v1
  with:
    api-key: {{ secrets.HAVOC_API_KEY }}
    path: apps/api

Use an output in a later step

- uses: havoc-security/scan-action@@v1
  id: havoc
  with:
    api-key: {{ secrets.HAVOC_API_KEY }}

- name: Report grade
  run: |
    echo "Grade: {{ steps.havoc.outputs.grade }}"
    echo "Findings: {{ steps.havoc.outputs.findings-count }}"

Permissions reference

The action only reads your code. It does not post PR comments, set commit statuses or upload SARIF, so it needs no write permissions.

PermissionWhen needed
contents: readAlways — to check out and read the code