chainsaw exception

Audit & Findings Updated

Manage policy exceptions (scoped allow-rules with expiry)

Manage policy exceptions (scoped allow-rules with expiry)

SubcommandWhat it does
chainsaw exception createCreate a new exception (allow a specific package@version)
chainsaw exception deleteDelete a policy exception
chainsaw exception listList active policy exceptions
chainsaw exception renewRenew an exception, resetting its expiry clock
chainsaw exception [command]

chainsaw exception create

Create a new exception (allow a specific package@version)

chainsaw exception create [flags]

Create a policy exception that allows a specific package version through the proxy even when it matches block conditions. Exceptions are scoped to (repository, package, version) and expire after the org’s configured exception age (or –expires when set). Use –from-file for JSON input, or pass the flags directly.

Examples: chainsaw exception create –repository npm-proxy –package left-pad –version 1.3.0 chainsaw exception create –repository npm-proxy –package left-pad –version 1.3.0
–reason “transitive dep, upstream fix pending” –expires 7d

# VEX-friendly: record an accepted risk on log4j-core 2.14.1. The # CVE + decision are what chainsaw sbom vex export needs to emit # a CycloneDX VEX row. An exception exports as exploitable + # will_not_fix: you are accepting a real risk, not asserting the # vulnerable code is absent. chainsaw exception create –repository maven-central –package log4j:log4j-core
–version 2.14.1 –cve CVE-2021-44228 –decision allow
–reason “JNDI lookup path not invoked in our codebase”

Use the explicit –repository / –package / –version triple.

Flags

FlagTypeDefaultDescription
--cvestring—CVE ID (or comma-separated list) the exception applies to (e.g. CVE-2021-44228). Required for ‘chainsaw sbom vex export’ to emit a VEX row.
--daysint0Number of days before the exception expires (mutually exclusive with –expires-at and –expires). Defaults to 30 when no other expiry flag is supplied.
--decisionstring—VEX decision: ‘allow’ (default — exports as exploitable + will_not_fix, i.e. an accepted risk), ‘monitor’ (in_triage), or ‘deny’. Empty falls through to the server default of allow.
--ecosystemstring—Alias for –repository: the repository the package came from (e.g. npm-proxy, maven-central). Use whichever name reads better; setting both to different values is an error.
--expires-atstring—Explicit RFC3339 timestamp for expiry (mutually exclusive with –days and –expires)
--expiresstring—Duration before the exception expires (e.g. 7d, 24h, 30m). Alias of –days expressed as a duration string.
--from-filestring—Read request body as JSON from file (–ecosystem/–days/–expires-at/–reason still apply on top)
--jsonbool—Print created exception as JSON
--packagestring—Package name (required)
--reasonstring—Human-readable justification for the exception (recorded in audit log)
--repositorystring—Repository name (required; –ecosystem is an accepted alias)
--versionstring—Package version (required)
--vex-notestring—Free-text justification used in the CycloneDX VEX ‘analysis.detail’ field. Falls back to –reason when omitted.

The global flags apply here too.

chainsaw exception delete

Delete a policy exception

chainsaw exception delete <exception-id> [flags]

Delete a policy exception by id.

Confirmation handling:

  • When stdin is a TTY, the command prompts (“Delete exception <id>? [y/N]:”) and aborts without action on anything other than “y”. –yes skips the prompt.
  • When stdin is NOT a TTY (CI, piped, scripts), there is no interactive prompt to display — the command requires –yes and exits with a clear error if it’s missing, rather than silently aborting. The old behaviour (silent “Aborted.” with exit 0 on non-TTY without –yes) made the command unusable from scripts without operators noticing.

Flags

FlagTypeDefaultDescription
--dry-runbool—Preview what would be deleted without actually deleting
--yesbool—Skip the interactive confirmation prompt. REQUIRED when stdin is not a TTY (scripts, CI) — otherwise the command exits with an error instead of silently aborting.

The global flags apply here too.

chainsaw exception list

List active policy exceptions

chainsaw exception list [flags]

Flags

FlagTypeDefaultDescription
--jsonbool—Output as JSON

The global flags apply here too.

chainsaw exception renew

Renew an exception, resetting its expiry clock

chainsaw exception renew <exception-id> [flags]

Extends an exception’s life by resetting createdAt to now. The server recomputes expiresAt from the org’s configured exception age. Only renewable on allow-mode exceptions that target vulnerable packages.

Flags

FlagTypeDefaultDescription
--jsonbool—Print renewed exception as JSON

The global flags apply here too.