Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/irchaosclub/FANGS/llms.txt

Use this file to discover all available pages before exploring further.

When a sandbox run finishes with one or more deviations, the FANGS notifier dispatches a single webhook POST per configured target containing the full deviation summary for that run. Targets are stored in the database and survive orchestrator restarts; delivery attempts are logged in the notifications table for audit and post-mortem. If the orchestrator is restarted mid-retry, the in-flight attempt is lost — the audit log records the last known state.

Adding a Notifier

Use fangs notifier add with the flags below:
FlagRequiredDescription
-nameUnique identifier for this target
-urlWebhook URL. Must be https:// in production; http:// only allowed for loopback hosts (127.0.0.1, localhost, ::1)
-templateslack | discord | generic (default: generic)
-secret-envName of the env var holding the HMAC secret. Generic template only — ignored for Slack and Discord
-min-severityFire only when the run’s max deviation severity ≥ this value: low | medium | high | critical
-headersExtra request headers as a JSON string-map, e.g. '{"X-API-Key":"$KEY"}'
-enabledtrue | false (default: true)
fangs notifier add \
  -name soc-slack \
  -url https://hooks.slack.com/services/T000/B000/xxxx \
  -template slack

Templates

FANGS ships three built-in templates. Each produces a different JSON structure tuned for its target.
The Slack template produces an incoming-webhook payload using Block Kit. A top-level text field ensures deviations appear in mobile push previews.
{
  "text": "🚨 FANGS deviation: axios@1.8.2 — 3 findings (max: crit)",
  "blocks": [
    {
      "type": "header",
      "text": { "type": "plain_text", "text": "🚨 FANGS deviation: axios@1.8.2 — 3 findings (max: crit)", "emoji": true }
    },
    {
      "type": "section",
      "text": { "type": "mrkdwn", "text": "Run `18b1f8a3c2e1` · package `axios` · version `1.8.2`" }
    },
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "• *crit* `1.2.3.4:31337` — net_new_destination\n• *warn* `/root/.ssh/id_rsa` — fs_new_path_read"
      }
    }
  ]
}
Up to 12 findings are shown inline; additional findings appear as a … and N more line. Slack and Discord use the URL as the secret — the -secret-env flag is ignored for these templates.

HMAC Request Signing

Generic-template targets can optionally sign every POST body with HMAC-SHA256. Set -secret-env to the name of a process environment variable that holds the shared secret. At delivery time the orchestrator reads the value of that env var, computes HMAC-SHA256(secret, body), and adds:
X-FANGS-Signature: sha256=<hex>
Your receiver verifies by computing the same HMAC over the raw request body and doing a constant-time comparison.
-secret-env takes an env var name, not the secret value itself. The secret never appears in the database or in CLI output — only the env var name is stored.
# Set the secret in the orchestrator's environment
export FANGS_WEBHOOK_SECRET="my-shared-secret"

# Register the target, referencing the env var by name
fangs notifier add \
  -name siem \
  -url https://siem.example.com/fangs \
  -template generic \
  -secret-env FANGS_WEBHOOK_SECRET
HMAC signing is intentionally skipped for slack and discord templates — those services use the webhook URL itself as the authenticator.

Retry Policy

Each delivery attempt runs independently in a background goroutine. The retry logic is:
OutcomeBehavior
HTTP 2xxSent — no further attempts
HTTP 4xx (except 408, 429)Permanent failure — no retry; bad request won’t improve
HTTP 408, 429Transient — retry with backoff
HTTP 5xxTransient — retry with backoff
Network / timeout errorTransient — retry with backoff
Backoff formula: delay = baseDelay × 2^(attempt-1) with ±25% jitter, so concurrent targets don’t thunderherd. Default baseDelay is 1 second; maximum 5 attempts per run per target.
The retry state is in-memory only. If the orchestrator restarts while a target is mid-retry, that delivery is lost. The notifications table records the last attempt status for post-mortem review.

Severity Filtering

Use -min-severity to prevent low-signal runs from flooding a high-priority channel. The notifier evaluates the maximum deviation severity across the whole run before deciding whether to fire.
# Only page the SOC channel on critical findings
fangs notifier add \
  -name soc-pager \
  -url https://hooks.slack.com/services/T000/B000/yyyy \
  -template slack \
  -min-severity critical

# Log everything high-and-above to the SIEM
fangs notifier add \
  -name siem-high \
  -url https://siem.example.com/fangs \
  -template generic \
  -min-severity high

Managing Notifiers

# List all configured targets
fangs notifier list

# Fire a synthetic test POST (not HMAC-signed)
fangs notifier test soc-slack

# Show delivery history for a specific run
fangs notifier history -run 18b1f8a3c2e1

# Remove a target
fangs notifier remove soc-slack
fangs notifier test fires the appropriate template-specific test payload immediately without touching the deviation database. The test POST is not HMAC-signed even on targets that have -secret-env configured — it is a connectivity check only.

Boot-Time Notifiers File

Instead of running fangs notifier add interactively, you can supply a JSON file at orchestrator startup with -notifiers-file. The orchestrator upserts each entry at boot. CLI-added entries coexist — the file is additive, not authoritative. The file accepts either a top-level JSON array or an object with a notifiers key:
[
  {
    "name": "soc-slack",
    "url": "https://hooks.slack.com/services/T000/B000/xxxx",
    "template": "slack"
  },
  {
    "name": "siem",
    "url": "https://siem.example.com/fangs",
    "template": "generic",
    "secret_env": "FANGS_WEBHOOK_SECRET",
    "min_severity": "high",
    "enabled": true
  }
]
Each entry requires name, url, and template. Optional fields are secret_env, headers (map), min_severity, and enabled (boolean, default true).
fangs-orchestrator -notifiers-file config/notifiers.json

Build docs developers (and LLMs) love