apus security

Security tools: audit plus optional safe fixes. Related: Security.

apus security audit
apus security audit --deep
apus security audit --deep --password <password>
apus security audit --deep --token <token>
apus security audit --auth password --password <password>
apus security audit --fix
apus security audit --json

Audit modes

Plain security audit stays on the cold config/filesystem/read-only path: it does not discover plugin runtime security collectors, so routine audits do not load every installed plugin runtime. --deep adds best-effort live Gateway checks and plugin-owned security audit collectors (explicit internal callers may also opt into those collectors when they already have an appropriate runtime scope).

If Gateway password auth is supplied only at startup, pass the same value with --auth password --password <password> so the audit can check it against hooks.token.

What it checks

DM/trust model

Webhook/hooks

Startup logs a non-fatal security warning, and audit flags hooks.token reuse of active Gateway shared-secret auth values (gateway.auth.token / APUS_GATEWAY_TOKEN, gateway.auth.password / APUS_GATEWAY_PASSWORD). Also warns when:

Run apus doctor --fix to rotate a persisted reused hooks.token, then update external hook senders to use the new token.

Sandbox/tools

Sandbox browser

Network/discovery

Plugins/channels

Source scans skip files above their per-file byte limit, including files that grow while being read. If a file changes during a read, the audit reports a scan failure; rerun after edits finish.

Dangerous flags

Settings prefixed with dangerous/dangerously are explicit break-glass operator overrides. Enabling one is not, by itself, a security vulnerability report. Audit reports them under the config.insecure_or_dangerous_flags checkId. For the complete dangerous-parameter inventory, see "Insecure or dangerous flags summary" in Security.

SecretRef behavior

security audit resolves supported SecretRefs in read-only mode for its targeted paths. If a SecretRef is unavailable in the current command path, audit continues and reports secretDiagnostics instead of crashing. --token and --password only override deep-check auth for that command invocation; they do not rewrite config or SecretRef mappings.

Suppressions

Accept intentional standing findings with security.audit.suppressions. Each suppression matches an exact checkId and can be narrowed with case-insensitive titleIncludes and/or detailIncludes substrings:

{
  "security": {
    "audit": {
      "suppressions": [
        {
          "checkId": "plugins.tools_reachable_permissive_policy",
          "detailIncludes": "Enabled extension plugins: gbrain",
          "reason": "trusted local operator plugin"
        }
      ]
    }
  }
}

Suppressed findings are removed from the active summary and findings list. JSON output keeps them under suppressedFindings for auditability. When suppressions are configured, active output also keeps an unsuppressible security.audit.suppressions.active info finding so readers can tell the audit was filtered. Dangerous config flags are emitted one flag per finding, so accepting one dangerous flag does not hide other enabled flags that share the same config.insecure_or_dangerous_flags checkId.

Agent-run shell commands that change suppressions follow the ordinary exec approval policy. Command-text inspection is not a config-write protection boundary.

JSON output

apus security audit --json | jq '.summary'
apus security audit --deep --json | jq '.findings[] | select(.severity=="critical") | .checkId'

With --fix --json, output includes both fix actions and the final report:

apus security audit --fix --json | jq '{fix: .fix.ok, summary: .report.summary}'

If remediation fails unexpectedly, the command exits with status 1 before running the audit. With --json, it emits the standard CLI JSON failure envelope. Run apus security audit separately to inspect the current state.

What --fix changes

Applies safe, deterministic remediations:

--fix does not:

Related