chainsaw exception
Manage policy exceptions (scoped allow-rules with expiry)
Manage policy exceptions (scoped allow-rules with expiry)
| Subcommand | What it does |
|---|---|
chainsaw exception create | Create a new exception (allow a specific package@version) |
chainsaw exception delete | Delete a policy exception |
chainsaw exception list | List active policy exceptions |
chainsaw exception renew | Renew 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
| Flag | Type | Default | Description |
|---|---|---|---|
--cve | string | — | 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. |
--days | int | 0 | Number of days before the exception expires (mutually exclusive with –expires-at and –expires). Defaults to 30 when no other expiry flag is supplied. |
--decision | string | — | 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. |
--ecosystem | string | — | 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-at | string | — | Explicit RFC3339 timestamp for expiry (mutually exclusive with –days and –expires) |
--expires | string | — | Duration before the exception expires (e.g. 7d, 24h, 30m). Alias of –days expressed as a duration string. |
--from-file | string | — | Read request body as JSON from file (–ecosystem/–days/–expires-at/–reason still apply on top) |
--json | bool | — | Print created exception as JSON |
--package | string | — | Package name (required) |
--reason | string | — | Human-readable justification for the exception (recorded in audit log) |
--repository | string | — | Repository name (required; –ecosystem is an accepted alias) |
--version | string | — | Package version (required) |
--vex-note | string | — | 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
| Flag | Type | Default | Description |
|---|---|---|---|
--dry-run | bool | — | Preview what would be deleted without actually deleting |
--yes | bool | — | 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
| Flag | Type | Default | Description |
|---|---|---|---|
--json | bool | — | 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
| Flag | Type | Default | Description |
|---|---|---|---|
--json | bool | — | Print renewed exception as JSON |
The global flags apply here too.