Skip to content

Docker Agent — Overview

CoreFix provides two Docker images for running security scans locally or on any server. Your source code never leaves your environment — only security findings are sent to the CoreFix cloud for AI enrichment, deduplication, and reporting.

ImagePurposeDetailed Guide
corefixhq/cfixCode scanning — SAST, secrets, SCA, IaC, KubernetesCode Scanner — Standalone Usage
corefixhq/cfix-webWeb application scanning — DAST, CVEs, port scanning, SSL/TLSWeb Scanner — Standalone Usage

Both images are available on Docker Hub


When to Use Docker / CLI

  • Scan a repo locally before pushing to remote
  • One-off security audits on any codebase
  • Run web scans against staging or production URLs
  • Environments without a GitHub App or CI/CD integration
  • Air-gapped or restricted environments
  • Evaluating CoreFix before setting up a full integration

Prerequisites


Common Environment Variables

The following environment variables are shared by both the code and web scanning agents. They can only be passed via -e flags on the Docker command.

VariableRequiredDescription
X_CFIX_API_KEYYesYour CoreFix API key
GITHUB_TOKENNoGitHub Personal Access Token for pushing scan results as SARIF to GitHub Code Scanning
DEBUGNoSet to app:* to enable verbose debug logging

Note: GITHUB_TOKEN is available for both agents. For web scans, this allows pushing DAST findings to your GitHub repository's Code Scanning tab as SARIF, giving you a unified view of code and web findings directly in GitHub.


Bring Your Own Model (BYOK)

Both agents support AI enrichment using CoreFix's built-in model rotation or your own OpenAI-compatible API key.

If you don't specify a model or API key, CoreFix automatically selects a model based on your plan — no configuration needed.

If you provide --openai-api-key, you must also specify --model. The scan will fail without it. You pay your provider directly.

bash
# BYOK — model is required
--openai-api-key sk-proj-xxxxxxxx --model gpt-4o-mini

# No key — CoreFix handles model selection automatically
# (no flags needed)

See Supported Models for the full reference.


CLI Options — Code Scanner (corefixhq/cfix)

FlagRequiredDescription
[scanner]NoPositional argument. Comma-separated scanner names. Default: osv,iac,secrets,k8s,sast,sonar,container,ai,malware
--openai-api-keyNoYour own OpenAI-compatible API key (BYOK)
--modelNoAI model to use for enrichment. Required when --openai-api-key is provided
--ignore-ai-analysisNoSkip the AI pipeline — deduplication, enrichment, and AI-based prioritization. Raw/normalized findings are still written to /output
--github-tokenNoGitHub PAT for pushing SARIF to GitHub Code Scanning
--containerNoComma-separated container image names to scan (used with the container scanner). Defaults to the first 3 images from docker images on the host if omitted

Note: For container scanning, mount the Docker socket with -v /var/run/docker.sock:/var/run/docker.sock so the scanner can access your local Docker daemon and pull images directly — no credentials to your container registry are needed.

Available scanners:

ScannerFlagWhat It Covers
SASTsastCode vulnerabilities across 30+ languages via OpenGrep
SecretssecretsHardcoded credentials, API keys, tokens via Gitleaks
DependenciesosvCVEs in open source packages via OSV-Scanner
IaCiacTerraform, Dockerfile, CloudFormation misconfigs via KICS
Kubernetesk8sK8s manifests, RBAC, pod security via Kubescape
sonarSonarQubeSecurity hotspot, bug, code smell, and vulnerability rules
containerCoreFix Container ScannerContainer image vulnerabilities and Dockerfile CIS benchmarking
aiAI BOM / AI Governance ScannerAI Bill of Materials (AI BOM) and AI governance scan across source code
sbomSBOM GeneratorSoftware Bill of Materials for the scanned project
malwareCoreFix Malware ScannerMalware within Python, NPM (JS), Golang, Ruby gems, GitHub Actions, and VS Code extensio

CLI Options — Web Scanner (corefixhq/cfix-web)

Limitation

For the web scanner, --token works today for complex web application authentication (OAuth, SSO, MFA) — CoreFix bypasses username/password credentials and injects the provided Authorization/Cookie value into every request. It is still reserved and has no effect for API testing (the openapi block); that remains unavailable.

FlagRequiredDescription
[scanner]NoPositional argument. Comma-separated scanner names. Default: nmap,vuln,web
--targetYesTarget URL. Accepts https://app.com, http://IP:8080, or bare domain
--usernameNoLogin username for authenticated scans
--passwordNoLogin password for authenticated scans
--tokenNoBearer token or Cookie value to inject for complex web app auth (OAuth, SSO, MFA) in place of --username/--password. Still reserved and has no effect for API testing
--openai-api-keyNoYour own OpenAI-compatible API key (BYOK)
--modelNoAI model to use for enrichment. Required when --openai-api-key is provided
--ignore-ai-analysisNoSkip the AI pipeline — deduplication, enrichment, and AI-based prioritization. Raw/normalized findings are still written to /output
--github-tokenNoGitHub PAT for pushing SARIF to GitHub Code Scanning
--coverageNoControls scan depth and duration
--scanner-profileNoControls which active scan rules are executed. Choices: all (default), sqli, xss, injection, path_traversal, access_control, passive_only, quick_active
--latest-harNoUse only the latest Chrome extension HAR recording session. If omitted, all available HAR sessions are used

Available scanners:

ScannerFlagWhat It Covers
Port scannmapOpen ports, services, network discovery via Nmap
CVE scanvulnKnown CVEs, misconfigs, exposed panels via Nuclei
Web scanwebSmart shorthand — auto-selects sub-scanners based on config
DAST (unauth)webUnauthenticated web crawl and active scan via OWASP ZAP
DAST (auth)webAuthenticated web scan using credentials via OWASP ZAP. Configure .cfix.web.yaml
API fuzzingwebAPI fuzzing against OpenAPI/Swagger spec. Will launch automatically when available (Coming Soon)
ZAP API fuzzingwebZAP-based API fuzzing (Coming Soon)
SSL/TLSwebSSL/TLS configuration and certificate analysis via testssl.sh, Launches automatically if https website

--coverage (optional)

Controls scan depth and duration. Affects both Nuclei vulnerability scanning and authenticated web scanning.

  • For Nuclei scanning, defaults to normal if not specified.
  • For authenticated scans, CoreFix automatically determines coverage based on application complexity if not specified. If explicitly set, the specified value is used.
bash
--coverage moderate
ValueExpected CoverageTime ImpactBest For
quick10–20%+15 minCI/CD gating, smoke tests
normal60–70%+30 minStandard pipeline scans
moderate60–70%+45 minBalanced depth, thorough rules
high90–95%+75 minPre-release audits
veryhigh95–99%+90 minFull security audits, compliance
max99–99.9%+120 minMaximum crawl depth and rule strength short of exhaustive
extreme99–99.9%+240 minDeep enterprise-scale audits
exhaustive99.9–100%+360 minExhaustive, compliance-grade full coverage

"Time Impact" is the additional time the coverage level adds on top of the base scan, not a total scan duration cap.

LevelMax Alerts / RuleRule Duration Limit
quick52 min
normal52 min
moderate85 min
high105 min
veryhigh1010 min
max1015 min
extreme1520 min
exhaustive1530 min

Coverage also determines which Nuclei template categories are enabled:

CoverageNuclei Template Categories
quick / not setMisconfig, exposure, CVE, takeover, default-login, tech
normal / moderateAll of above + SSL, TLS
high / veryhigh / max / extreme / exhaustiveAll of above + HTTP, CORS, XSS, SQLi, SSRF, redirect, LFI, RFI, token, secret, WordPress (core, plugins, themes)

Quick Start

Code Scanning

bash
docker run --rm \
  -e X_CFIX_API_KEY=<your-api-key> \
  -v $(pwd):/code \
  -v ~/scan-results:/output \
  corefixhq/cfix

For the full CLI reference, scanner flags, examples, and output details, see Code Scanner — Standalone Usage.

Web Scanning

bash
docker run --rm \
  --network host \
  -e X_CFIX_API_KEY=<your-api-key> \
  -v $(pwd):/web \
  -v ~/scan-results:/output \
  corefixhq/cfix-web \
  --target https://your-app.com

For the full CLI reference, authentication options, browser setup, and config file details, see Web Scanner — Standalone Usage.


Viewing Results

After a scan completes, results are available in multiple places:

  • Dashboard — findings appear automatically at app.corefix.dev under your project.
  • Local output — raw, normalized, and enriched results are written to your mounted output directory.
  • GitHub Code Scanning — if GITHUB_TOKEN was provided, SARIF results are pushed to your repository's Security tab.

Next Steps