Skip to content

Architecture

Every way of running Argus ends the same way: scanners produce findings, reporters write them out, and everything downstream reads one file, argus-results.json.

flowchart LR
    n_config["Config"]
    n_engine["Engine"]
    n_scanners["Scanners"]
    n_findings["Findings"]
    n_reporters["Reporters"]
    n_results["argus-results.json"]
    n_consumers["Consumers"]
    n_config --> n_engine --> n_scanners --> n_findings --> n_reporters --> n_results --> n_consumers
Stage What happens
Config argus.yml, CLI flags, or composite-action inputs. argus/core/config.py loads it and argus/core/schema.py validates it.
Engine ArgusEngine (source scans) or ContainerEngine (image scans) picks the scanners, computes exclusions and runs them, in parallel by default.
Scanners One module per tool under argus/scanners/ and argus/linters/. Each runs its tool locally, or in Docker when the tool isn't installed (ADR-014).
Findings Each scanner parses its tool's output into Finding objects, grouped into a ScanResult per scanner and a ScanSummary per run (argus/core/models.py).
Reporters Reporters registered in the argus.reporters entry-point group turn the ScanSummary into output formats. JsonReporter always runs.
argus-results.json The canonical artifact (ADR-018). Every other surface reads this file rather than the scanners' raw output.
Consumers argus view (terminal and browser), argus report, the MCP server, GitHub code scanning (SARIF) and PR comments.

To see every component and how they connect, open the interactive map.

Pipelines

The same stages, step by step, for each way Argus runs.

Source scan

argus scan [--config argus.yml | <scanner> ...]

Decisions: ADR-013, ADR-014, ADR-018

flowchart TD
    n_source_scan_entry(["argus scan [--config argus.yml | #lt;scanner#gt; ...]"])
    n_source_scan_load["Load config"]
    subgraph n_source_scan_loop_1["For each enabled scanner"]
        n_source_scan_available["Run the tool"]
        n_source_scan_parse["Parse output"]
        n_source_scan_keep_raw["Keep raw output"]
    end
    n_source_scan_summary["Build ScanSummary"]
    n_source_scan_report["Report"]
    n_source_scan_entry --> n_source_scan_load --> n_source_scan_available --> n_source_scan_parse --> n_source_scan_keep_raw --> n_source_scan_summary --> n_source_scan_report
Steps
Step What happens
Load config ArgusEngine loads the config and computes exclusions.
Run the tool
for each enabled scanner
If is_available(), run the tool locally; otherwise fall back to docker run (ADR-014). Scanners run in parallel by default.
Parse output
for each enabled scanner
Parse the tool's output into list[Finding] and wrap it in ScanResult(scanner=<name>, findings, metadata).
Keep raw output
for each enabled scanner
If reporting.keep_raw is set, copy the tool's raw files to <output_dir>/raw/<scanner>/.
Build ScanSummary All ScanResults are collected into one ScanSummary.
Report JsonReporter always writes argus-results.json; terminal, markdown, sarif and the other reporters run per reporting.formats.

Container scan

argus scan container [--image REF | --discover PATH]

Decisions: ADR-018, ADR-044

flowchart TD
    n_container_scan_entry(["argus scan container [--image REF | --discover PATH]"])
    n_container_scan_targets["Resolve targets"]
    subgraph n_container_scan_loop_1["For each image"]
        n_container_scan_scan_image["scan_image"]
        n_container_scan_vex["VEX filter"]
        n_container_scan_ignores["Native ignores"]
        n_container_scan_keep_raw["Keep raw output"]
        n_container_scan_digest["Bind to digest"]
    end
    n_container_scan_map["Map to ScanResult"]
    n_container_scan_report["Report"]
    n_container_scan_entry --> n_container_scan_targets --> n_container_scan_scan_image --> n_container_scan_vex --> n_container_scan_ignores --> n_container_scan_keep_raw --> n_container_scan_digest --> n_container_scan_map --> n_container_scan_report
Steps
Step What happens
Resolve targets ContainerEngine resolves the images to scan. CLI flags win over the containers section of argus.yml.
scan_image
for each image
Runs trivy, grype, syft, exposure and services against the image.
VEX filter
for each image
containers.vex or --vex passes OpenVEX documents to trivy and grype (--vex). not_affected and fixed findings are dropped at the source.
Native ignores
for each image
containers.trivy_ignore_file (--ignorefile) and containers.grype_config_file (-c); rules can be scoped to one file in the image. Anything either tool dropped (ignore file or VEX) lands in ContainerScanResult.ignored_findings, reported but never counted (ADR-044).
Keep raw output
for each image
If reporting.keep_raw is set, copy the trivy, grype and syft raw outputs and write exposure-findings.json and services-findings.json to <output_dir>/raw/<image>/. The exposure and services helpers have no upstream JSON, so one is synthesized when they produce findings.
Bind to digest
for each image
Resolve the image digest (RepoDigest when pulled or pushed, the config Id for local builds that were never pushed; "" if unknown) onto ContainerScanResult.digest and each finding's image_digest and image_ref metadata, so results record what was scanned, not a mutable tag (#237).
Map to ScanResult Each ContainerScanResult becomes ScanResult(scanner="container/<name>"), so viewers need no container-specific code.
Report Same reporter pipeline as source scans, ending in argus-results.json.

Composite action

uses: huntridge-labs/argus/.github/actions/scanner-<name>@<tag>

Decisions: ADR-013, ADR-021

flowchart TD
    n_composite_action_entry(["uses: huntridge-labs/argus/.github/actions/scanner-#lt;name#gt;@#lt;tag#gt;"])
    n_composite_action_install["Install the SDK"]
    n_composite_action_scan["argus scan #lt;name#gt;"]
    n_composite_action_outputs["Severity counts"]
    n_composite_action_upload["Upload"]
    n_composite_action_comment["PR comment"]
    n_composite_action_entry --> n_composite_action_install --> n_composite_action_scan --> n_composite_action_outputs --> n_composite_action_upload --> n_composite_action_comment
Steps
Step What happens
Install the SDK pip install from the action's own checkout ($GITHUB_ACTION_PATH/../../..), so the SDK version always matches the action tag.
argus scan <name> Runs the SDK with --format sarif --format json --format markdown and --output-vars counts.env.
Severity counts counts.env is appended to $GITHUB_OUTPUT; the markdown summary goes to the step summary.
Upload Uploads the reports as artifacts and the SARIF file to GitHub code scanning.
PR comment Optional. When post_pr_comment is true on a pull_request event, comment-pr posts or updates the scanner's comment.

MCP server

argus mcp

Decisions: ADR-018

flowchart TD
    n_mcp_entry(["argus mcp"])
    n_mcp_connect["Connect"]
    n_mcp_dispatch["Dispatch tools"]
    n_mcp_respond["Return results"]
    n_mcp_entry --> n_mcp_connect --> n_mcp_dispatch --> n_mcp_respond
Steps
Step What happens
Connect An AI assistant connects over stdio.
Dispatch tools Tools (argus_scan, argus_validate, argus_detect, argus_init, argus_classify and others) call the same SDK entry points as the CLI.
Return results Tools return structured JSON. Resources expose argus://config, argus://config/schema, argus://results/latest and argus://architecture.