Skip to content

About

No description, website, or topics provided.

Resources

Security policy

Stars

3 stars

Watchers

1 watching

Forks

Repository files navigation

AccuKnox ASPM Scanner CLI

AccuKnox Logo

accuknox-aspm-scanner is a unified CLI for Phase-1 ASPM scans: IaC, SAST, SCA, Secret, SBOM, Container, ML model scan, API discovery, SonarQube SAST, and DAST — in CI/CD pipelines or local developer workflows.

It can upload results to the AccuKnox ASPM Platform, but it can also run in standalone mode for restricted or on-prem environments.

Features

  • 🚀 One CLI for Phase-1 scan types: IaC, SAST, SCA, Secret (TruffleHog/Gitleaks), SBOM, Container, ML Scan, API Discovery, SonarQube SAST, and DAST
  • 🔄 Supports both local tools and containerized execution
  • 🔐 Optional upload to AccuKnox ASPM
  • 🧰 Works in standalone and on-prem environments
  • 🧵 Supports environment-variable and flag-based configuration
  • 🧩 Supports pre-commit integration
  • 🚦 CI/CD quality gate (gate) that fails the pipeline on policy breaches

Installation

1. Connected environment

Requires Python 3.9+ (3.10+ recommended; matches project Pipfile).

Install from the GitHub release wheel:

pip install https://github.com/accuknox/aspm-scanner-cli/releases/download/v0.17.0/accuknox_aspm_scanner-0.17.0-py3-none-any.whl

2. Restricted or on-prem environment

Install from the release .deb package:

sudo dpkg -i accuknox-aspm-scanner_<version>.deb

3. Native binaries (Linux, macOS, Windows)

Install the cross-platform Python wheel (same as connected environment above), or download the platform-specific PyInstaller binary from GitHub Releases. Do not reuse one filename across OSes:

Platform Release asset
Linux x86_64 accuknox-aspm-scanner-linux-amd64 (also published as accuknox-aspm-scanner for Jenkins compatibility)
macOS Apple Silicon accuknox-aspm-scanner-darwin-arm64
Windows x64 accuknox-aspm-scanner-windows-amd64.exe (also accuknox-aspm-scanner.exe)
# Linux x86_64
curl -fL -o accuknox-aspm-scanner \
  https://github.com/accuknox/aspm-scanner-cli/releases/download/v0.17.0/accuknox-aspm-scanner-linux-amd64
chmod +x accuknox-aspm-scanner

The unprefixed accuknox-aspm-scanner asset is the Linux ELF only. macOS builds are published as *-darwin-arm64 so they cannot overwrite the Linux binary.

macOS — both local and container modes

On macOS you can run scans either way:

  1. Local (no Docker): install native scanner tools, then scan without --container-mode
  2. Container: Docker Desktop + --container-mode
# Local — works on Apple Silicon (M-series) and Intel Macs
accuknox-aspm-scanner tool install --type sast
accuknox-aspm-scanner scan --skip-upload --keep-results sast --command "scan ."

# Or container mode
accuknox-aspm-scanner scan --skip-upload --keep-results sast --command "scan ." --container-mode

Local macOS tools supported today: iac, sast, secret, container (Trivy), gitleaks, sq-sast.
For dast / codeassure, use --container-mode for now.

Windows — both local and container modes

  1. Local (no Docker): install native Windows scanner tools (x64), then scan without --container-mode
  2. Container: Docker Desktop + --container-mode
accuknox-aspm-scanner tool install --type sast
accuknox-aspm-scanner scan --skip-upload --keep-results sast --command "scan ."

accuknox-aspm-scanner scan --skip-upload --keep-results sast --command "scan ." --container-mode

Local Windows tools supported today: iac, sast, secret, container (Trivy), gitleaks, sq-sast, codeassure (x64).
For dast, use --container-mode for now. Tools install under %USERPROFILE%\AppData\Local\Programs\AccuKnox\.

Platform Install Local scan (tool install) Container scan (--container-mode)
Linux pip wheel, .deb Supported Supported
macOS (Intel + Apple Silicon) pip wheel Supported (see tools above) Supported
Windows (x64) pip wheel, .exe Supported (see tools above) Supported

Notes:

  • Apple Silicon = arm64 / M-series; Intel Mac = x86_64. The CLI detects the CPU and installs the matching binary.
  • Windows local install currently targets x64 upstream binaries (standard for these scanners).
  • IaC (Checkov): Apple Silicon uses Checkov’s Darwin standalone zip (the asset is named X86_64 but the binary is arm64). Intel Mac installs Checkov via a dedicated pip venv (no usable x86_64 standalone zip). Other Phase-1 tools use native arm64 or x86_64 builds.

Get Help

Use standard CLI help:

accuknox-aspm-scanner --help
accuknox-aspm-scanner scan --help
accuknox-aspm-scanner scan iac --help
accuknox-aspm-scanner scan sast --help
accuknox-aspm-scanner scan secret --help
accuknox-aspm-scanner scan sca --help
accuknox-aspm-scanner scan container --help
accuknox-aspm-scanner scan ml-scan --help
accuknox-aspm-scanner scan api-discovery --help
accuknox-aspm-scanner scan dast --help
accuknox-aspm-scanner scan sq-sast --help
accuknox-aspm-scanner tool --help
accuknox-aspm-scanner pre-commit --help
accuknox-aspm-scanner gate --help

If you are running directly from local source code:

python -m aspm_cli.cli --help

Environment Variables

AccuKnox upload variables are optional when --skip-upload is used.

  • ACCUKNOX_ENDPOINT: Control plane URL for result upload
  • ACCUKNOX_LABEL: Label used to associate uploaded results
  • ACCUKNOX_TOKEN: Bearer token for upload
  • ACCUKNOX_CLI_ID: CI/CD quality-gate run id (uuid) shared by every scanner and the gate step in one pipeline run. Falls back for --cli-id. See CI/CD Quality Gate.
  • ACCUKNOX_PROJECT_NAME: Project name for SBOM uploads (required; created automatically if it does not exist)
  • ACCUKNOX_PROJECT: Legacy fallback for project name
  • DEBUG: Set to TRUE for verbose debug logs
  • SOFT_FAIL: Set to TRUE to enable soft-fail by default
  • KEEP_RESULTS: Set to TRUE to keep result files after scan completion
  • SCAN_IMAGE: Override the scanner image used in container mode
  • SYFT_IMAGE: Override the Syft image used for the filesystem SBOM inventory in container mode (default: anchore/syft:v1.42.3)
  • CODEASSURE_IMAGE: Override the AI analysis image used by SAST AI analysis
  • ACCUKNOX_ENABLE_AI_SAST: Set to TRUE to enable AI-SAST per repo (alternative to --ai-analysis)
  • GITLEAKS_IMAGE: Override the Gitleaks image when --engine gitleaks
  • ML_SCAN_IMAGE: Override the full ModelScan image for ml-scan (default: public.ecr.aws/k9v9d5v2/accuknox/ondemand_modelscan:1.0.21)
  • ML_SCAN_IMAGE_REGISTRY / IMAGE_REGISTRY: On-prem registry host; builds {registry}/ondemand_modelscan:{tag} when set
  • ML_SCAN_IMAGE_TAG: Tag for ondemand_modelscan (default 1.0.21, from platform k8s_jobs/modelscan/release.txt)
  • ML_SCAN_DOCKER_PLATFORM: Docker platform for container mode (default linux/amd64)
  • API_DISCOVERY_IMAGE: Override the code2api image for api-discovery (alias of SCAN_IMAGE when set)
  • CODE2API_IMAGE: Default code2api scanner image when SCAN_IMAGE is unset

Tool Management

Install all supported local tools:

accuknox-aspm-scanner tool install --all

Install or update a specific tool:

accuknox-aspm-scanner tool install --type iac
accuknox-aspm-scanner tool update --type iac

Supported tool types:

  • iac
  • sast
  • sq-sast
  • secret
  • container
  • dast
  • codeassure
  • gitleaks
  • syft

User-level tool installs are placed under:

~/.local/bin/accuknox/

How The Scan Command Works

All scans follow this structure:

accuknox-aspm-scanner scan [flags-before-the-scan-name] <scan-name> --command "<scanner-args>" [flags-after-the-scan-name]

Here is what each part means:

  • scan: tells the CLI you want to run a scan
  • flags before the scan name: these are common scan flags and work across all scan types
  • <scan-name>: one of iac, sast, sca, secret, container, ml-scan, api-discovery, dast, or sq-sast
  • flags after the scan name: these are only for the selected scanner
  • --command: required for every scan and passed to the underlying scanner

Simple rule:

  • If a flag is written before iac, sast, secret, container, dast, or sq-sast, it affects the overall scan behavior
  • If a flag is written after the scan name, it affects only that scanner

Example:

accuknox-aspm-scanner scan --skip-upload --keep-results iac --command "-d ." --container-mode

In that example:

  • --skip-upload and --keep-results are flags before the scan name, so they control upload and file retention
  • iac is the scan name
  • --command and --container-mode come after iac, so they apply only to the IaC scanner

Important:

  • --command is required for every scan type
  • Use --skip-upload if you do not want to upload results
  • Use --keep-results if you want to keep the generated artifact files
  • Some output/report flags passed inside --command are normalized by the CLI so it can collect results consistently

Common flags used before the scan name:

  • --endpoint
  • --label
  • --token
  • --project-name
  • --skip-upload
  • --keep-results
  • --softfail
  • --cli-id — CI/CD quality-gate run id (see CI/CD Quality Gate)
  • --repository — CI/CD gate scope repository (e.g. org/repo)
  • --branch — CI/CD gate scope branch
  • --commit-sha — CI/CD gate scope commit SHA

If you do not use --skip-upload, you must provide:

  • ACCUKNOX_ENDPOINT or --endpoint
  • ACCUKNOX_LABEL or --label
  • ACCUKNOX_TOKEN or --token

You can provide upload settings in either style:

Using environment variables:

ACCUKNOX_ENDPOINT=cspm.accuknox.com \
ACCUKNOX_LABEL=POC \
ACCUKNOX_TOKEN=abcd1234 \
accuknox-aspm-scanner scan iac --command "-d ." --container-mode

Using flags before the scan name:

accuknox-aspm-scanner scan --endpoint cspm.accuknox.com --label POC --token abcd1234 iac --command "-d ." --container-mode

Scan Reference

IaC Scan

Use for Checkov-based IaC scanning.

Required:

  • --command

Flags used after iac:

  • --container-mode
  • --severity — Comma-separated severities that fail the scan. Allowed: INFO,LOW,MEDIUM,HIGH,CRITICAL. Defaults to all.
  • --repo-url
  • --repo-branch — defaults to the CI branch (see Branch in scan reports), else git

Typical --command value:

-d .

Example:

accuknox-aspm-scanner scan --skip-upload --keep-results iac --command "-d ."

Container mode with AccuKnox upload:

ACCUKNOX_ENDPOINT=cspm.accuknox.com \
ACCUKNOX_LABEL=POC \
ACCUKNOX_TOKEN=abcd1234 \
accuknox-aspm-scanner scan iac --command "-d ." --container-mode

SAST Scan

Use for OpenGrep/SAST scanning.

Required:

  • --command

Flags used after sast:

  • --container-mode
  • --severity — Comma-separated severities that fail the scan (matched on finding impact). Allowed: LOW,MEDIUM,HIGH,CRITICAL,UNKNOWN. Defaults to all.
  • --aiscan-severity
  • --repo-url
  • --commit-ref — defaults to the CI branch (see Branch in scan reports), else git
  • --commit-sha
  • --pipeline-id
  • --job-url
  • --ai-analysis
  • --codeassure-config

Typical --command value:

scan .

Basic example:

accuknox-aspm-scanner scan --skip-upload --keep-results sast --command "scan ."

With AI analysis (CLI flag or per-repo env var):

accuknox-aspm-scanner scan --skip-upload --keep-results sast --command "scan ." --ai-analysis --aiscan-severity "HIGH,CRITICAL"

AI analysis is off by default; --ai-analysis (or the variable below) turns it on, and --no-ai-analysis forces it off even when the variable is set.

Local mode needs two standalone binaries installed side by side, codeassure and context-graph:

accuknox-aspm-scanner tool install --type codeassure

They are downloaded from the matching aspm-scanner-cli release (codeassure-<os>-<arch>, context-graph-<os>-<arch> and an ai-sast-SHA256SUMS file; the release workflow attaches them automatically from the pinned codeassure-cli and code-context-graph releases) and every file is verified against that checksum list before it is installed. Supported: Linux amd64, macOS arm64, Windows amd64. Set AI_SAST_BASE_URL to download from another location, or CODEASSURE_EXECUTABLE to use a binary you already have. The LLM settings come from --codeassure-config (a codeassure.json) or CODEASSURE_* environment variables.

Per-repo AI-SAST via environment variable (e.g. GitLab CI variable):

ACCUKNOX_ENABLE_AI_SAST=TRUE accuknox-aspm-scanner scan --skip-upload sast --command "scan ." --container-mode

Container mode with AccuKnox upload:

ACCUKNOX_ENDPOINT=cspm.accuknox.com \
ACCUKNOX_LABEL=POC \
ACCUKNOX_TOKEN=abcd1234 \
accuknox-aspm-scanner scan sast --command "scan ." --container-mode

Secret Scan

Use for TruffleHog or Gitleaks secret scanning.

Required:

  • --command

Flags used after secret:

  • --container-mode
  • --engine — trufflehog (default) or gitleaks

TruffleHog example:

accuknox-aspm-scanner scan --skip-upload --keep-results secret --command "filesystem ." --container-mode

Gitleaks example (SARIF output; upload uses data_type=DS → DroopescanParser; findings appear as droopescan, not in TruffleHog secret-scan filters):

accuknox-aspm-scanner scan --skip-upload --keep-results secret \
  --engine gitleaks \
  --command "detect --source . --report-format sarif --report-path results.json --no-banner" \
  --container-mode

SCA Scan

Use for Trivy filesystem dependency vulnerability scanning (Software Composition Analysis).

Required:

  • --command

Flags used after sca:

  • --container-mode
  • --severity
  • --repo-url — used for SCA asset identity (ArtifactName); defaults from git
  • --repo-branch — branch used with --repo-url; defaults to the CI branch, else git
  • --no-infer-deps — do not infer dependencies from source when no tracker lists them (see SBOM: merged inventory and inferred dependencies)

Typical --command value:

fs .

Example:

accuknox-aspm-scanner scan --skip-upload --keep-results sca --command "fs ." --container-mode

CI example with explicit repo identity:

accuknox-aspm-scanner scan --skip-upload --keep-results sca \
  --command "fs ." \
  --repo-url "${CI_PROJECT_PATH}" \
  --repo-branch "${CI_COMMIT_REF_NAME}" \
  --container-mode

Container Scan

Use for Trivy-based container image vulnerability scanning and SBOM generation (image or filesystem).

Required:

  • --command

Flags used after container:

Typical --command values:

image nginx:latest          # image vuln scan or container SBOM
filesystem .                # repo/filesystem SBOM (--generate-sbom only)

Vulnerability scan example:

accuknox-aspm-scanner scan --skip-upload --keep-results container --command "image nginx:latest" --container-mode

Image SBOM (AccuKnox project classifier container):

accuknox-aspm-scanner scan --skip-upload --keep-results --project-name demo-project container --command "image nginx:latest" --generate-sbom --container-mode

Filesystem SBOM (AccuKnox project classifier application; run from repo root in container mode):

accuknox-aspm-scanner scan --skip-upload --keep-results --project-name demo-project container --command "filesystem ." --generate-sbom --container-mode

Local mode (no Docker) works on Linux, macOS and Windows: install the scanner once with accuknox-aspm-scanner tool install --type container, then drop --container-mode:

accuknox-aspm-scanner scan --skip-upload --keep-results --project-name demo-project container --command "filesystem ." --generate-sbom
accuknox-aspm-scanner scan --skip-upload --keep-results --project-name demo-project container --command "image nginx:latest" --generate-sbom

SBOM: merged inventory and inferred dependencies

A filesystem/fs, rootfs or image SBOM is built from up to three sources and written as one document:

  1. Trivy is the primary document: components, vulnerabilities, licenses and the dependency graph.
  2. Syft scans the same target. Components both found are filled in from Syft where Trivy has gaps (licenses, hashes, CPE, evidence); components only Syft found (for example from conanfile.txt, or GitHub Actions in CI configs) are added. In a CycloneDX SBOM, advisories for the added components are looked up with a second Trivy pass over just those components. Syft file entries and components with an UNKNOWN version are not looked up. Added components carry accuknox:found-by=inventory.
  3. Source inference (filesystem only) covers trees that have no dependency tracker. For C/C++ it reads #includes, build files, Dockerfiles and CI configs and lists what they reference. Components carry accuknox:inferred, accuknox:confidence (A/B/C), accuknox:source and accuknox:evidence (file:line) properties and accuknox:found-by=source-inference.
Confidence Evidence Version Advisory lookup
A CMake FetchContent/ExternalProject/CPM with a release tag, find_package(X EXACT n), vcpkg.json overrides, .gitmodules + gitlink commit, MODULE.bazel bazel_dep, Bazel WORKSPACE http_archive/git_repository, Meson wraps, autotools PKG_CHECK_MODULES [pkg = x.y.z], conan install pkg/x.y.z in a Dockerfile or CI config resolved yes, when the package is a known registry package
B vendored tree (third_party/, vendor/, extern/, deps/, ...) with a VERSION file, project(... VERSION n) or a version macro in a header sniffed yes, when the package is a known registry package
C an #include of a known package; a version constraint only (Meson dependency(... version: '>=1.2'), autotools >=; find_package(Boost 1.70) means "at least 1.70", not a version); a distro/brew/vcpkg install in a Dockerfile or CI config (apt-get install libssl-dev=3.0.2-0ubuntu1: a distro version is a patched build, so it is kept as accuknox:version-constraint, never as an upstream version) none none

Private and internal dependencies (git submodules, FetchContent git URLs, vendored directories) are listed as components with a pkg:github/... or pkg:generic/... purl and are never sent for an advisory or license lookup. Credentials embedded in a remote URL are stripped. Nothing is written into the scanned tree (Syft's inventory is read from its stdout) and no network call is made for inference.

Limits: an #include names a package, never a version, so include-only components have no findings. Inference is heuristic (conditional compilation, macros and generated headers can cause misses or over-reports), and the header-to-package map (aspm_cli/inference/header_map.json) is a curated list. Advisory coverage for C/C++ depends on the scanner's Conan advisory data, which is limited. Includes that match no known package are not added to the SBOM. Syft's own --enrich all can query public package registries for license data, as before.

Opt-outs and behaviour:

  • --no-syft-merge: Trivy only for the inventory.
  • --no-infer-deps: skip source inference.
  • --no-build-probe (or ACCUKNOX_BUILD_PROBE=off): do not read versions from a build directory or a sandboxed CMake configure (below).
  • Syft is installed with accuknox-aspm-scanner tool install --type syft. If it is missing or fails, the scan warns and continues with the Trivy SBOM. --enrich-licenses (the previous opt-in) keeps its strictness: with it, a missing Syft fails the scan.
  • SPDX (--sbom-format spdx): the added packages and inferred dependencies are appended to Trivy's SPDX document (with DEPENDS_ON relationships and what found them in comment). SPDX cannot carry vulnerabilities, so there is no advisory pass.
  • --container-mode: the advisory lookup for the added components is a second Trivy container run. The two runs share one throw-away Docker volume (accuknox-trivy-cache-<id>, removed afterwards) so the vulnerability database is downloaded once. An image inventory mounts the Docker socket, as the Trivy image scan already does.
accuknox-aspm-scanner tool install --type syft

accuknox-aspm-scanner scan --project-name fs-test --keep-results --softfail \
  container --command "filesystem ." --generate-sbom

--container-mode still works: Syft runs as anchore/syft:v1.42.3 (override with SYFT_IMAGE) using the same /workdir mount.

For sca, the same inference runs after the filesystem scan: dependencies with a resolved version are checked through a synthetic conan.lock kept in a temp directory outside the repository, and their advisories are appended to results.json under the target inferred from source, so they count toward --severity. SCA reports list only vulnerable packages, so versionless and clean inferred components appear in the SBOM only. Use --no-infer-deps to turn it off.

Versions from the build. An #include <zlib.h> names a library, not its version. When the system libraries a C/C++ project uses would otherwise stay versionless, the scanner looks for the version in this order:

  1. an existing build directory under the scanned tree (CMakeCache.txt): read only, and it reflects the customer's own build. The version comes from the package's *ConfigVersion.cmake, a <Pkg>_VERSION cache entry, or the version macros in the headers CMake resolved;
  2. otherwise, if cmake is installed, a throw-away cmake -S <repo> -B <tempdir> run. It runs the repository's own CMake code, so it is only done inside a sandbox that denies network access and any write outside the temp directory (macOS sandbox-exec, Linux bwrap); without one it is skipped and logged. It reports the libraries installed on the scanning machine, which match the product only when the scan runs on its build host;
  3. otherwise the component stays versionless and is listed without lookups.

A version the repository itself states is never replaced, and vendored copies never take the host's version. Such components carry accuknox:source=build-output and the evidence CMakeCache.txt:<VAR> (build-output | cmake-configure).

SBOM upload requires --project-name (or ACCUKNOX_PROJECT_NAME). The project does not need to exist beforehand: if it is missing, AccuKnox creates it automatically from this name. --project-name is not required for vulnerability scans. Legacy env ACCUKNOX_PROJECT is also accepted.

SBOM Phase-1 capabilities:

Capability CLI command Upload data_type
Generate BOM container --generate-sbom SBOM
Upload BOM same + AccuKnox creds SBOM
Dependency vulnerabilities sca --command "fs ." TR (Trivy JSON; parser classifies as SCA via ArtifactType: filesystem)

SBOM generation includes vulnerability and license metadata in CycloneDX output (--scanners vuln,license).

Container mode with AccuKnox upload:

ACCUKNOX_ENDPOINT=cspm.accuknox.com \
ACCUKNOX_LABEL=POC \
ACCUKNOX_TOKEN=abcd1234 \
accuknox-aspm-scanner scan container --command "image nginx:latest" --container-mode

SBOM standard, author and the CERT-In check

Flags used after container with --generate-sbom (also accepted by pipeline --scans sbom):

  • --sbom-format cyclonedx|spdx — the standard to generate (default cyclonedx; spdx writes SPDX 2.3 JSON).
  • --sbom-author NAME — the "author of SBOM data". Default: ACCUKNOX_SBOM_AUTHOR, then the CI actor (GITLAB_USER_EMAIL, GITHUB_ACTOR, ...), then git config user.email, then AccuKnox ASPM Scanner.
  • --sbom-output FILE — also write the finished SBOM to FILE. This copy leaves out the platform-only top-level fields (project_name, project_classifier), so it passes strict CycloneDX/SPDX validators. The uploaded file keeps them.
  • --sbom-version N — the SBOM's revision number (CycloneDX version). The scanner always writes 1; the platform also bumps it by itself when the same BOM is re-uploaded with different content.
  • --sbom-vex FILE (repeatable) — a VEX file (OpenVEX, CycloneDX VEX or CSAF). It is passed to Trivy (--vex), which drops the CVEs the file marks not affected or fixed, and every statement that matches a component is recorded in the SBOM as vulnerabilities[].analysis, so the file shows that the CVE was assessed. Statements for products that are not in the SBOM are ignored. In --container-mode Trivy only sees files under the current directory; others are still recorded in the SBOM. SPDX has no place for VEX statements.
  • --cert-in-check — check the SBOM against the CERT-In minimum data fields (21 fields, CERT-In Technical Guidelines on SBOM v2.0) and exit 1 unless it is conformant.

Every SBOM the scanner generates now carries the author, assembly time, lifecycle (source for a repository, analyzed for an image) and SBOM level, the fields that can be worked out automatically on each component (origin, criticality, patch status, usage restrictions, executable/archive/structured, unique identifier), and a conformance attestation (accuknox:cert-in:* properties in CycloneDX, annotations in SPDX).

A component with no supplier gets the organisation its package URL names where the namespace is one (Maven group id, npm scope, github.com/<owner>), marked with certin:supplier-source=purl-namespace so it is not mistaken for a declared supplier. Other ecosystems stay declared unknown.

A field the scanner cannot know (a supplier a lockfile does not name, for example) is written as an explicit unknown with a reason code (certin:unknown:<field>), not left out and not guessed. The check reports how much of the data is real: Conformant (34 components, 59.5% of fields populated, 40.5% declared unknown).

accuknox-aspm-scanner scan --skip-upload --project-name demo container \
  --command "filesystem ." --generate-sbom --sbom-format spdx --cert-in-check --sbom-output sbom.spdx.json

Notes on what the check means:

  • The guideline defines no pass/fail rule. "Conformant" here is AccuKnox's reading of it: every field is populated on every component, or declared unknown with a reason. It is not a CERT-In certification.
  • The 21 fields are mandatory for software supplied to government and public-sector bodies; for others they are recommended.
  • The platform and this package use the same rules; independent open tools (cyclonedx-cli validate, pyspdxtools -i) check the file format only, not CERT-In conformance.
  • To check a file you already have, run accuknox-aspm-scanner cert-in-check sbom.json (add --json for the full report). It exits 0 when conformant, 1 when partially or not conformant, 2 when the file cannot be read, and it says whether the file's own attestation still matches its content.
  • VEX/CSAF statements are not generated.
  • aspm_cli/certin/ is a copy of the platform's xbom/certin; do not edit it here.

ML Scan

Use for static ML model scanning with ModelScan (modelscan==0.8.1 inside the platform ondemand_modelscan job image). The CLI discovers model files under the -p path (.pkl, .pt, .pth, .h5, .keras, .pb, .ckpt, .npy), runs modelscan scan -p <file> -r json per file, wraps results as ondemand_modelscan, and uploads with artifact data_type=MLC (routes to ModelscanParser; findings appear in the UI as MLChecks).

Pre-release: use --container-mode (recommended for CI and platform parity). Local modelscan on PATH is optional for development only; release tarballs ship in a later GA.

Default container image (public mirror of platform Modelscan Ondemand ondemand_modelscan:1.0.21, linux/amd64):

public.ecr.aws/k9v9d5v2/accuknox/ondemand_modelscan:1.0.21

Override with ML_SCAN_IMAGE, or set IMAGE_REGISTRY / ML_SCAN_IMAGE_TAG for on-prem mirrors. On Apple Silicon Macs, container mode uses --platform linux/amd64 by default (override with ML_SCAN_DOCKER_PLATFORM).

Flags used after ml-scan:

  • --container-mode
  • --repo-url — used for model_id / model_path metadata
  • --commit-ref — branch/ref in model_path; defaults to the CI branch, else git
  • --model-name — optional collector name in upload payload
  • --source-type — default github

Default --command:

scan -p . -r json

Example (CI — scan all models in repo checkout):

accuknox-aspm-scanner scan --skip-upload --keep-results ml-scan \
  --repo-url "${CI_PROJECT_PATH}" \
  --commit-ref "${CI_COMMIT_REF_NAME}" \
  --command "scan -p . -r json" \
  --container-mode

Example (single model path):

accuknox-aspm-scanner scan ml-scan \
  --command "scan -p ./models/model.pkl -r json" \
  --container-mode

API Discovery Scan

Use code2api for static API discovery from source (internal routes, external HTTP calls, auth hints).

Pre-release: use --container-mode with the published image below. Local binary packaging (tool install --type api-discovery) ships in a later GA.

Default container image:

public.ecr.aws/k9v9d5v2/accuknox/code2api:0.1.0

Default --command:

-path . -output results.json

Flags used after api-discovery:

  • --container-mode (required for pre-release)
  • --repo-url (optional metadata; defaults from git)

Example:

export SCAN_IMAGE=public.ecr.aws/k9v9d5v2/accuknox/code2api:0.1.0
accuknox-aspm-scanner scan --skip-upload --keep-results api-discovery \
  --command "-path . -output results.json" \
  --container-mode

Upload uses data_type=API. Output is code2api JSON (internal_apis, external_apis, summary).

DAST Scan

Use for DAST scanning. Full guide, including authenticated scans and the automation plan format: docs/dast-scan.md.

Required: --scan-type with --target, or --dast-plan.

Flags used after dast:

  • --scan-type: baseline (passive), full (active) or api (OpenAPI/SOAP/GraphQL)
  • --target: target URL (or API definition file for api)
  • --options: extra scanner options, e.g. "-m 5" (spider minutes) or "-I"
  • --severity-threshold
  • --container-mode (required for --auth-* and --dast-plan)
  • --dast-plan: path to an automation plan (YAML) to run as-is instead of --scan-type/--auth-* - full control over jobs. Mutually exclusive with --auth-*. Template: docs/examples/dast-plan-template.yaml.
  • --auth-url, --auth-username, --auth-password: log in with a real headless browser before spidering/scanning (works for plain HTML forms and JS/SPA logins like OWASP Juice Shop).
  • --auth-logged-in-regex, --auth-logged-out-regex, --auth-login-fallback-url: optional session-verification settings for the authenticated flow above.

Recommended example:

accuknox-aspm-scanner scan --skip-upload --keep-results dast --scan-type baseline --target http://example.com/ --options "-I" --container-mode

Container mode with AccuKnox upload:

ACCUKNOX_ENDPOINT=cspm.accuknox.com ACCUKNOX_LABEL=POC ACCUKNOX_TOKEN=abcd1234 accuknox-aspm-scanner scan dast --scan-type baseline --target http://example.com/ --options "-I" --container-mode

Authenticated scan:

accuknox-aspm-scanner scan dast \
  --scan-type baseline --target https://example.com --options "-m 5" \
  --container-mode \
  --auth-url "https://example.com/login" \
  --auth-username "user@example.com" \
  --auth-password "..." \
  --auth-login-fallback-url "https://example.com/account" \
  --auth-logged-in-regex "user@example\.com"

Bring-your-own plan (see docs/dast-scan.md for the full job reference):

accuknox-aspm-scanner scan dast --dast-plan ./plan.yaml --container-mode

SonarQube SAST Scan

Use for SonarQube-based SAST plus result fetch.

Required:

  • --command

Flags used after sq-sast:

  • --skip-sonar-scan
  • --container-mode
  • --severity — Comma-separated severities that fail the scan. Matches SonarQube issue severity (INFO,MINOR,MAJOR,CRITICAL,BLOCKER) and hotspot vulnerabilityProbability (LOW,MEDIUM,HIGH). Defaults to all.
  • --repo-url
  • --branch
  • --commit-sha
  • --pipeline-url

Typical --command value:

-Dsonar.projectKey=<PROJECT_KEY> -Dsonar.host.url=<HOST_URL> -Dsonar.token=<TOKEN> -Dsonar.organization=<ORG_ID>

Example:

accuknox-aspm-scanner scan --skip-upload --keep-results sq-sast --command "-Dsonar.projectKey=<PROJECT_KEY> -Dsonar.host.url=<HOST_URL> -Dsonar.token=<TOKEN> -Dsonar.organization=<ORG_ID>"

Fail the pipeline when Critical/Blocker issues (or High hotspots) are found:

accuknox-aspm-scanner scan --skip-upload --keep-results sq-sast \
  --command "-Dsonar.projectKey=<PROJECT_KEY> -Dsonar.host.url=<HOST_URL> -Dsonar.token=<TOKEN> -Dsonar.organization=<ORG_ID>" \
  --severity "CRITICAL,BLOCKER,HIGH"

Important note:

  • Even with --skip-sonar-scan, --command is still required by the current parser

Container mode with AccuKnox upload:

ACCUKNOX_ENDPOINT=cspm.accuknox.com \
ACCUKNOX_LABEL=POC \
ACCUKNOX_TOKEN=abcd1234 \
accuknox-aspm-scanner scan sq-sast --command "-Dsonar.projectKey=<PROJECT_KEY> -Dsonar.host.url=<HOST_URL> -Dsonar.token=<TOKEN> -Dsonar.organization=<ORG_ID>" --container-mode

Preview features

Preview features ship in the CLI but are off, and left out of --help, unless ACCUKNOX_PREVIEW=true is set. They are not yet stable: their flags, output and behaviour may change in any release.

Feature Without ACCUKNOX_PREVIEW=true
Incremental scans (--changed-only, ACCUKNOX_CHANGED_ONLY) A warning, then a full scan
PR decorator (decorate-pr, see docs/pr-decorator.md) Refused (exit 1)

Incremental scans (--changed-only)

On a pull/merge request, scan only what the PR changed. Off by default: without the flag every scan is a full scan.

Known limitation: AccuKnox compares each upload with the previous scan of the same asset, so findings in files a partial scan did not cover move to Waiting for Verification and then Fixed. Use incremental scans for fast PR feedback only, and keep full scans on your default branch.

export ACCUKNOX_PREVIEW=true
accuknox-aspm-scanner scan --changed-only sast --command "scan ."
accuknox-aspm-scanner pipeline --changed-only --scans sast,secret,iac,sca,sbom --quality-gate
accuknox-aspm-scanner scan --changed-only --base-ref origin/main iac --command "-d ."   # any CI

The changed files are the diff from the merge-base with the PR's base (deleted files excluded). The base is the PR base on GitHub Actions, --base-ref / ACCUKNOX_BASE_REF anywhere else, or detected from GitLab, Bitbucket, Azure DevOps and Jenkins PR variables (the base branch must be fetched: fetch-depth: 0 on GitHub). ACCUKNOX_CHANGED_ONLY=true is the same as the flag.

Scan With --changed-only
sast (and AI analysis) Scans only the changed files; AI analysis only verifies findings on them.
secret trufflehog filesystem: changed files. trufflehog git: --since-commit <base>. gitleaks: the PR's commits (--log-opts); --no-git stays full.
iac -d <dir> becomes -f <file> for each changed file.
sca, sbom Full scan, but only if a manifest or lockfile changed (package-lock.json, requirements.txt, go.mod, pom.xml, ...).
container, dast, api-discovery, ml-scan, mobile, sq-sast Not repo-file scans: the flag is ignored.

If nothing relevant changed, the scan is skipped (exit 0, nothing uploaded). With --quality-gate, scan runs a full scan instead of skipping (the gate waits for that upload); pipeline only declares scans that produced results, so a skip is safe there. The gate then judges only the uploaded (changed-file) findings.

It falls back to a full scan, with a warning, when the diff can't be computed (shallow clone, missing base), when no base is known, or when more than ACCUKNOX_INCREMENTAL_MAX_FILES files changed (default 1000).

Quality Gates

A quality gate lets the policy thresholds configured in AccuKnox decide the build. The CLI uploads every scan as part of one run, waits for AccuKnox to evaluate them, and then passes, warns or fails the build from the verdict. The thresholds live in AccuKnox (policy service), not in the CLI.

Unified run: pipeline

export ACCUKNOX_ENDPOINT=cspm.accuknox.com ACCUKNOX_LABEL=POC ACCUKNOX_TOKEN=<token>
export ACCUKNOX_GATE_TOKEN=<user token>   # see "Tokens" below

accuknox-aspm-scanner pipeline --scans sast,sca,secret,iac,sbom --quality-gate

pipeline runs the scans in order, uploads them under one run id, then waits for the verdict (default 5 minutes).

  • --scans: any of sast, sq-sast, sca, secret, iac, sbom (container/filesystem SBOM), ml.
  • Per-scan options: --sast-command (default scan .), --sca-command (fs .), --secret-command, --secret-engine, --iac-command (-d .), --sbom-command (filesystem .), --ml-command (scan -p . -r json), --sq-sast-command, --container-mode.
  • --secret-command defaults to TruffleHog git mode, git file://. (the checked-out commits), and to filesystem . outside a git checkout. AccuKnox cannot yet import TruffleHog filesystem results, and in CI filesystem mode also reports the token actions/checkout stores in .git/config. With --secret-engine gitleaks the default is detect --source ..
  • ml scans model files (.pkl .pt .pth .h5 .keras .pb .ckpt .npy). The quality gate does not cover it: its result is uploaded outside the gate run, and model issues fail the build unless --softfail. In container mode the scanner image is pulled only when model files are found.
  • Only scans that produced a result are declared to the gate, so a clean secret scan (nothing to upload) never leaves the gate waiting.
  • With --quality-gate, findings no longer fail a scan step: the policy decides. Scans that cannot run or upload still fail the build. Without it, pipeline simply runs the scans one after another.
  • A scan that passed only because no policy checked it (no policy matches the repository and branch, or the matching policies do not gate that scan) is printed as a warning, and as an annotation on GitHub Actions and Azure DevOps.
  • --fail-fast stops at the first scan that cannot run.
  • --ai-analysis runs AI analysis on the scans that support it (today: sast; off by default), with --aiscan-severity, --codeassure-config, --context-graph-config and --graph-no-joern. These options need --ai-analysis. Other scan types ignore it until they gain an AI step.

Branch in scan reports

SAST, IaC, SCA, SonarQube and ML reports record a branch, and AccuKnox files SAST and IaC findings under repository + branch. Unless --commit-ref / --repo-branch / --branch is given, the branch comes from ACCUKNOX_BRANCH, then the CI (on pull requests, the source branch): GITHUB_HEAD_REF / GITHUB_REF_NAME, CI_COMMIT_REF_NAME, BITBUCKET_BRANCH, SYSTEM_PULLREQUEST_SOURCEBRANCH / BUILD_SOURCEBRANCH, CHANGE_BRANCH / BRANCH_NAME, GIT_BRANCH; and only then git. CI checkouts are often detached (GitHub pull requests, GitLab, Azure DevOps), where git can only answer HEAD, which would put every such build under one HEAD branch.

The repository URL in those reports follows the same order (ACCUKNOX_REPO_URL, the CI's repository URL, then git's remote) with any credentials removed: some CIs check out with the job token in the remote URL. SAST reports also link to the CI run (--pipeline-id / --job-url default from the CI). ML scans run ModelScan in its container when it is not installed locally.

Separate steps: scan --quality-gate + gate

When each scan is its own workflow step, tie them to one run and finish with gate:

accuknox-aspm-scanner scan --quality-gate --gate-scanners SG,TR,IAC sast --command "scan ."
accuknox-aspm-scanner scan --quality-gate --gate-scanners SG,TR,IAC sca  --command "fs ."
accuknox-aspm-scanner scan --quality-gate --gate-scanners SG,TR,IAC iac  --command "-d ."
accuknox-aspm-scanner gate

--gate-scanners must list every scan type the run uploads (SG sast, SQ sq-sast, TR sca/container, IAC, TruffleHog/DS secret, SBOM). A scan that produces no result (for example a clean secret scan) must not be listed, or the gate waits for it. Use pipeline to have this handled for you.

All steps of one CI run share a run id automatically (derived from the CI run on GitHub Actions, GitLab, Bitbucket, Azure DevOps and Jenkins). Outside CI, or to override it, set ACCUKNOX_CLI_ID / --cli-id. scan --quality-gate prints the run id it used.

Outcome and exit codes

AccuKnox verdict Result Exit code
passed build continues 0
warning (a warn policy action) build continues, warning printed 0
failed (a block policy action) build fails 1
a scan could not be evaluated (unparsable scan, policy service unavailable) build fails 2
no verdict before --gate-timeout --gate-on-timeout fail (default) fails, pass continues 2 / 0

--softfail reports a policy failure without failing the build. It does not hide scans that could not be evaluated. The CLI prints a per-scanner table and every breached threshold, adds GitHub annotations, and writes a summary to $GITHUB_STEP_SUMMARY when available.

Options

  • --quality-gate (or ACCUKNOX_QUALITY_GATE=true): enable the gate.
  • --gate-timeout <seconds>: how long to wait for the verdict (default 300).
  • --gate-on-timeout fail|pass: what to do if the verdict does not arrive in time (default fail).
  • --cli-id, --repository: override the run id / the owner/name that policy scopes match.
  • --gate-json-file <path> (or ACCUKNOX_GATE_JSON_FILE): also save the gate response to a file.

Machine-readable result

After the verdict the CLI prints the gate response as JSON on stdout (logs go to stderr), between the lines ----- quality gate response (json) ----- and ----- end quality gate response -----:

{"cli_id": "…", "state": "resolved", "exit_code": 1, "softfail": false, "detail": null,
 "response": { "status": "failed", "blocking": true, "results": {"SG": {"status": "fail", "counts": {…}, "reasons": […]}}, "overall": […] }}

response is the backend's poll response verbatim (empty when no verdict arrived); state is resolved | timeout | unsupported | rejected. Use --gate-json-file for automations that should not parse stdout.

The repository and branch are detected from the CI environment or git. Policy scopes are matched against owner/name:branch; set ACCUKNOX_REPO_URL / ACCUKNOX_BRANCH when they cannot be detected.

Tokens

Uploads use ACCUKNOX_TOKEN. The gate API identifies a user, which that token may not, so gate and pipeline use ACCUKNOX_GATE_TOKEN (or --gate-token) for polling and fall back to ACCUKNOX_TOKEN. If the fallback is rejected the error says so. Keep both as CI secrets.

GitHub Actions example

- uses: actions/checkout@v4
- name: AccuKnox scans and quality gate
  env:
    ACCUKNOX_ENDPOINT: cspm.accuknox.com
    ACCUKNOX_LABEL: my-label
    ACCUKNOX_TOKEN: ${{ secrets.ACCUKNOX_TOKEN }}
    ACCUKNOX_GATE_TOKEN: ${{ secrets.ACCUKNOX_GATE_TOKEN }}
  run: accuknox-aspm-scanner pipeline --scans sast,sca,secret,iac --quality-gate

The first run for a tenant can be slow while AccuKnox downloads reference data for a scan type, so raise --gate-timeout if the gate times out on first use.

Quickstart

Local mode is the default. Install the required local tool first:

accuknox-aspm-scanner tool install --type iac
accuknox-aspm-scanner scan --skip-upload --keep-results iac --command "-d ."

Upload example:

ACCUKNOX_ENDPOINT=cspm.accuknox.com \
ACCUKNOX_LABEL=POC \
ACCUKNOX_TOKEN=abcd1234 \
accuknox-aspm-scanner scan --softfail sast --command "scan ."

On-Prem / Air-Gapped Usage

For most on-prem POCs:

  1. Install the CLI using the wheel or .deb package.
  2. Decide whether each scan will run in local mode or container mode.
  3. If upload is not available, use --skip-upload.
  4. If you want local artifacts, use --keep-results.
  5. If using container mode in a restricted environment, point SCAN_IMAGE to your internal registry image before each scan.

Recommended on-prem pattern:

accuknox-aspm-scanner scan --skip-upload --keep-results <scan-name> --command "<scanner args>"

On-prem examples

IaC with mirrored Checkov image:

export SCAN_IMAGE=registry.local/bridgecrew/checkov:3.2.458
accuknox-aspm-scanner scan --skip-upload --keep-results iac --command "-d ." --container-mode

Secret scan with mirrored TruffleHog image:

export SCAN_IMAGE=registry.local/trufflesecurity/trufflehog:3.90.3
accuknox-aspm-scanner scan --skip-upload --keep-results secret --command "git file://." --container-mode

Container scan with mirrored Trivy image:

export SCAN_IMAGE=registry.local/accuknox/trivy:0.69.3
accuknox-aspm-scanner scan --skip-upload --keep-results container --command "image nginx:latest" --container-mode

DAST with mirrored scanner image:

export SCAN_IMAGE=registry.local/dast/scanner:2.16.1
accuknox-aspm-scanner scan --skip-upload --keep-results dast --scan-type baseline --target http://example.com/ --options "-I" --container-mode

SonarQube SAST against self-hosted SonarQube:

export SCAN_IMAGE=registry.local/sonarsource/sonar-scanner-cli:11.4
accuknox-aspm-scanner scan --skip-upload --keep-results sq-sast --command "-Dsonar.projectKey=my-project -Dsonar.host.url=https://sonarqube.internal -Dsonar.token=$SONAR_TOKEN" --container-mode

On-prem notes

  • SCAN_IMAGE is shared across scanner types, so set it per scan type
  • CODEASSURE_IMAGE is used only for SAST AI analysis
  • DAST is most reliable in --container-mode
  • Result files are deleted unless --keep-results is used
  • tool install downloads public artifacts, so fully restricted environments may need pre-staged local tools or mirrored images

More detailed operational notes and workarounds are available in docs/onprem-setup-guide.md.

Pre-Commit Integration

Install the generated pre-commit hook:

accuknox-aspm-scanner pre-commit install

Remove the generated pre-commit hook:

accuknox-aspm-scanner pre-commit uninstall

Debugging

Enable verbose debug mode:

DEBUG=TRUE accuknox-aspm-scanner scan --skip-upload iac --command "-d ."

Scan compiled artifacts, manifests and existing SBOMs

Install the native inventory and vulnerability engines, or pass --container-mode:

accuknox-aspm-scanner tool install --type syft
accuknox-aspm-scanner tool install --type container

# Existing --command workflows remain supported.
accuknox-aspm-scanner scan --skip-upload --keep-results sca --target ./dist/service
accuknox-aspm-scanner scan --skip-upload --keep-results sca --target ./dist/application.jar
accuknox-aspm-scanner scan --skip-upload --keep-results sca --target ./package-lock.json
accuknox-aspm-scanner scan --skip-upload --keep-results sca --target ./dependencies.cdx.json
accuknox-aspm-scanner scan --skip-upload --keep-results sbom --target ./dist/service

# More inputs, all scanned locally (nothing is uploaded with --skip-upload):
accuknox-aspm-scanner scan --skip-upload --keep-results sca --target ./release.zip        # zip/tar/tgz, nested archives
accuknox-aspm-scanner scan --skip-upload --keep-results sca --target ./service.exe        # PE, ELF, Mach-O (Go, Rust, .NET, jar...)
accuknox-aspm-scanner scan --skip-upload --keep-results sca --target ./service.gz         # gz/xz/bz2 single files
accuknox-aspm-scanner scan --skip-upload --keep-results sca --target ./bundle.7z          # 7z/rar (needs 7-Zip or bsdtar)
docker save myapp:1.0 -o myapp.tar
accuknox-aspm-scanner scan --skip-upload --keep-results sca --target ./myapp.tar          # container image tarball (docker save / OCI)
accuknox-aspm-scanner scan --skip-upload --keep-results sbom --target ./oci-layout-dir    # OCI image layout directory

# Upload results using the usual ACCUKNOX_ENDPOINT/TOKEN/LABEL settings (tenant is optional).
accuknox-aspm-scanner scan sca --target ./dist/service --asset-name payment-service
accuknox-aspm-scanner scan --project-name payments sbom --target ./dist/service

Uploads

sca --target and sbom --target upload through /api/v1/artifact/, the same route and token handling as the SAST, SCA, secret and IaC scanners, so any token that works for those works here.

  • sca uploads the merged Trivy report (TR). It appears as a filesystem asset named after --asset-name (default: the file name), so re-uploading the same name updates that asset.
  • sbom uploads the CycloneDX document (SBOM) under --project-name / ACCUKNOX_PROJECT_NAME, which is required for SBOM uploads and created if missing. An SBOM with no components is not uploaded.
  • The scan always runs locally first and its files are kept with --keep-results/--output-dir. If the upload fails the status and response body are logged and the exit code is 2.
  • Not available on this route: the coverage/"limited" summary, per-run ingestion status and the SHA-256 artifact identity. Those stay in the local result.json. Mobile analysis (mobile --target) still uses the backend's artifact API.

What is scanned, and how

Input Inventory (Syft) Vulnerabilities (Trivy, results merged)
Manifest / lockfile the file fs
Directory dir: sbom + fs (lockfiles) + rootfs (binaries, jars, OS packages)
Executable, jar/war/ear, rpm/deb file: sbom + rootfs
zip, tar, tgz, whl, nupkg, 7z, rar unpacked tree sbom + fs + rootfs on the unpacked tree
gz / xz / bz2 single file decompressed, then re-detected as for the decompressed content
Container image tarball / OCI layout docker-archive: / oci-archive: / oci-dir: (never unpacked) sbom + image --input
CycloneDX / SPDX JSON converted sbom

trivy fs reads lockfiles but not compiled binaries, while trivy rootfs reads binaries but not lockfiles, which is why a directory or unpacked archive needs both. Every pass is merged into one vulnerabilities.json (an advisory for the same package and version is reported once; 1.2.3 and v1.2.3 count as the same version). Any package Trivy reports that Syft did not inventory is added to sbom.json so each finding maps to a component. If one pass fails the others still count and the failure is listed in coverage_reasons.

  • Archives are unpacked into the result directory with the existing hardening (no path traversal, links, special files, encrypted members or duplicate names) under one shared size and member budget, so nested archives (up to 3 levels) and compressed layers cannot expand beyond one archive's limit. Your input is never modified. Archives found inside a directory you pass are not unpacked; pass the archive itself. Package archives (.jar .war .ear .rpm .deb) are read as packages, not unpacked.
  • Trivy skips executables without the execute bit, so the engine marks unpacked binaries executable inside the result directory (nothing is ever run), and copies a non-executable single binary there before scanning. Binaries inside a directory you pass keep your modes.
  • 7z/rar need an extractor on PATH: 7-Zip (7zz, 7z, 7za) or libarchive bsdtar (bsdtar is preinstalled on macOS; on Linux apt install libarchive-tools or 7zip; on Windows install 7-Zip). The listing is validated before extraction and the result is checked again afterwards.
  • Alpine .apk packages are scanned as archives; Android .apk/.ipa still go to mobile.
  • Local scans accept inputs up to 4 GiB (16 GiB expanded). Override with ACCUKNOX_ARTIFACT_MAX_BYTES and ACCUKNOX_ARTIFACT_MAX_EXPANDED_BYTES. Only the small result.json is uploaded, so the backend's upload cap does not apply.
  • Not supported: VM disk images (trivy vm), encrypted archives, symlink-bearing archives.

--target-type auto|directory|manifest|binary|archive|sbom controls input detection (container image tarballs and unpacked bundles are archive; the report's artifact.format says which). --target and legacy --command are mutually exclusive. Use a directory to include companion manifests/lockfiles while preserving relative paths. Standalone manifest scans select only that file. No dependency installation or build execution occurs. Existing CycloneDX and SPDX JSON SBOMs are supported; XML/tag-value are excluded. For reproducible disconnected scans, populate --cache-dir first, then use --offline. Container mode mounts the selected input read-only and maps input, result and cache paths explicitly; it does not require a Docker socket mount.

Native Syft 1.42.3 downloads are verified against pinned SHA-256 checksums on Linux, macOS and Windows. Trivy remains pinned to 0.69.3. SYFT_IMAGE and SCAN_IMAGE override the corresponding container images.

Use --output-dir outside the target directory to retain result.json, sbom.json, and vulnerabilities.json. Otherwise a temporary result directory is used; --keep-results retains it. Operational failures retain diagnostics/results. Exit codes for these new workflows are 0 success, 1 severity gate, 2 operational/incomplete inventory failure. --softfail applies to severity gates. Limited nonempty inventory can still match advisories; it does not establish that all embedded dependencies were identified. Stripped binaries may have no usable metadata and cannot be declared vulnerability-free.

Mobile scanning from CI/CD

Full APK/IPA analysis runs on the backend's existing mobile services:

accuknox-aspm-scanner scan --project-name mobile-app mobile --target ./app.apk --asset-name android-app
accuknox-aspm-scanner scan --project-name mobile-app mobile --target ./app.apk --mode static_dynamic
accuknox-aspm-scanner scan --project-name mobile-app mobile --target ./app.ipa --mode static
accuknox-aspm-scanner scan --project-name mobile-app mobile --target ./app.apk --no-wait --idempotency-key build-123
accuknox-aspm-scanner scan --keep-results mobile --run-id RUN_UUID --output-dir ./mobile-results

Default static mode includes SBOM and dependency vulnerability matching. Dynamic mode requires an Android analyzer; IPA supports static/SBOM modes. --mode sbom uses the backend's mobile inventory and dependency pipeline. Mobile analysis cannot use --skip-upload. Commands wait by default (--timeout, default 3600 seconds), or return a run ID with --no-wait. Resume a wait/download with --run-id. A timeout does not cancel the backend run. Backend capability checks report missing services or an incompatible deployment before starting work.

About

No description, website, or topics provided.

Resources

Security policy

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages