# LicenseExceptions

Recorded, attributed exceptions to the licence policy: a licence exempted everywhere (blanket) or one package exempted, each with who approved it, why.

Recorded, attributed exceptions to the licence policy: a licence exempted everywhere (blanket) or one package exempted, each with who approved it, why, and until when. An exempted finding is kept and badged, never dropped, and an expired exception stops applying and says so; the expiry date is inclusive. Two forms are valid. The repository file .vulnetix/license-exceptions.yaml, read by vulnetix license and scan --evaluate-licenses, keeps blanket and packages at the top level with no metadata. The config form puts them under spec, with metadata. The server does not store exceptions yet: the CLI validates the document and plan notes it, but apply sends nothing.

`blanket` exceptions are checked first and the first unexpired match wins; `packages` are checked after them. See [Licence policy](/sca/license/policy.md) and [Licence evaluation](/sca/license/license.md).

| | |
|---|---|
| `apiVersion` | `vulnetix.com/v1` |
| `kind` | `LicenseExceptions` |
| Group | [Scanners and gates](/platform-iac/kinds/catalogue.md#scanners-and-gates) |
| Status | **Validate only.** The server stores nothing for it: validate and plan check a document, and apply sends nothing. |
| Objects per tenant | one (`metadata.name: default`) |
| Token and role | None. The server stores nothing for this kind; validating needs no credential. |
| Terraform resource | None: the server stores nothing for this kind |
| CLI | [`vulnetix config validate`](/platform-iac/cli/validate.md) reads it (CLI v3.165.1 and later); `plan` and `apply` note it and send nothing. |
| Pinned schema | [`v1.19.1/LicenseExceptions.schema.json`](https://github.com/Vulnesis/config-schemas/releases/download/v1.19.1/LicenseExceptions.schema.json) |
| Newest schema | [`latest/LicenseExceptions.schema.json`](https://github.com/Vulnesis/config-schemas/releases/latest/download/LicenseExceptions.schema.json) |
| First released in | [`v1.3.0`](https://github.com/Vulnesis/config-schemas/releases/tag/v1.3.0) |
| Print the built-in copy | `vulnetix config schema LicenseExceptions` |

## Minimal

Only the fields the kind requires. From `examples/LicenseExceptions/minimal.yaml`.

**YAML**

```yaml
# yaml-language-server: $schema=https://github.com/Vulnesis/config-schemas/releases/latest/download/LicenseExceptions.schema.json
apiVersion: vulnetix.com/v1
kind: LicenseExceptions
metadata:
  name: default
spec: {}
```

**HCL**

There is no Terraform resource. The server stores nothing for this kind, so there is nothing for Terraform to manage. The file stays in the repository; see [Which files are Platform IaC documents](/platform-iac/cli/validate.md#which-files-are-platform-iac-documents).

**CLI** (validates it)

```bash
vulnetix config validate -f - <<'EOF'
# yaml-language-server: $schema=https://github.com/Vulnesis/config-schemas/releases/latest/download/LicenseExceptions.schema.json
apiVersion: vulnetix.com/v1
kind: LicenseExceptions
metadata:
  name: default
spec: {}
EOF
```

## Advanced

Every field the kind supports, with a `when` expression where it takes one. From `examples/LicenseExceptions/advanced.yaml`.

**YAML**

```yaml
# yaml-language-server: $schema=https://github.com/Vulnesis/config-schemas/releases/latest/download/LicenseExceptions.schema.json
apiVersion: vulnetix.com/v1
kind: LicenseExceptions
metadata:
  name: default
  labels:
    team: legal
  annotations:
    ticket: https://tracker.example.com/LEGAL-102
spec:
  blanket:
    - license: MPL-2.0
      id: LEX-001
      reason: File-level copyleft; we ship MPL files unmodified and publish their source.
      scope: unmodified
      approver: legal@acme.com
      approvedDate: "2026-03-02"
      expires: "2027-03-01"
      projects: ["*"]
  packages:
    - purl: pkg:golang/github.com/hashicorp/*
      license: BUSL-1.1
      id: LEX-002
      reason: Internal tooling only; not offered as a competing hosted service.
      scope: dynamically linked
      approver: legal@acme.com
      approvedDate: "2026-04-15"
      expires: "2026-12-31"
      projects: [infra-tools]
    - name: ghostscript
      license: AGPL-3.0-only
      id: LEX-003
      reason: Used in the batch PDF renderer, which is never exposed over a network.
      scope: vendored
      approver: cto@acme.com
      approvedDate: "2026-05-20"
      projects: [pdf-batch]
---
# The repository file form, .vulnetix/license-exceptions.yaml: blanket and packages at the top level, no metadata.
apiVersion: vulnetix.com/v1
kind: LicenseExceptions
blanket:
  - license: EPL-2.0
    reason: Eclipse libraries are used unmodified as build-time dependencies.
packages:
  - purl: pkg:npm/%40acme/internal-fonts
    reason: Proprietary fonts licensed to ACME under contract C-2291.
```

**HCL**

There is no Terraform resource. The server stores nothing for this kind, so there is nothing for Terraform to manage. The file stays in the repository; see [Which files are Platform IaC documents](/platform-iac/cli/validate.md#which-files-are-platform-iac-documents).

**CLI** (validates it)

```bash
vulnetix config validate -f - <<'EOF'
# yaml-language-server: $schema=https://github.com/Vulnesis/config-schemas/releases/latest/download/LicenseExceptions.schema.json
apiVersion: vulnetix.com/v1
kind: LicenseExceptions
metadata:
  name: default
  labels:
    team: legal
  annotations:
    ticket: https://tracker.example.com/LEGAL-102
spec:
  blanket:
    - license: MPL-2.0
      id: LEX-001
      reason: File-level copyleft; we ship MPL files unmodified and publish their source.
      scope: unmodified
      approver: legal@acme.com
      approvedDate: "2026-03-02"
      expires: "2027-03-01"
      projects: ["*"]
  packages:
    - purl: pkg:golang/github.com/hashicorp/*
      license: BUSL-1.1
      id: LEX-002
      reason: Internal tooling only; not offered as a competing hosted service.
      scope: dynamically linked
      approver: legal@acme.com
      approvedDate: "2026-04-15"
      expires: "2026-12-31"
      projects: [infra-tools]
    - name: ghostscript
      license: AGPL-3.0-only
      id: LEX-003
      reason: Used in the batch PDF renderer, which is never exposed over a network.
      scope: vendored
      approver: cto@acme.com
      approvedDate: "2026-05-20"
      projects: [pdf-batch]
---
# The repository file form, .vulnetix/license-exceptions.yaml: blanket and packages at the top level, no metadata.
apiVersion: vulnetix.com/v1
kind: LicenseExceptions
blanket:
  - license: EPL-2.0
    reason: Eclipse libraries are used unmodified as build-time dependencies.
packages:
  - purl: pkg:npm/%40acme/internal-fonts
    reason: Proprietary fonts licensed to ACME under contract C-2291.
EOF
```

## Fields

Paths use dots for nesting and `[]` for the items of a list. **Required** means required whenever the parent object is present. A default is what the server uses when the field is left out.

| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
| <span id="apiVersion"></span>`apiVersion` | string | yes |  | exactly `vulnetix.com/v1` | The document format version. Every kind in this release is vulnetix.com/v1. |
| <span id="kind"></span>`kind` | string | yes |  | exactly `LicenseExceptions` | Always LicenseExceptions. |
| <span id="metadata"></span>`metadata` | object | no |  | no other keys | Metadata for a singleton kind whose documents predate metadata.name. Both metadata and its name may be left out; a name, when given, must be default. |
| <span id="metadata-name"></span>`metadata.name` | string | no |  | exactly `default` |  |
| <span id="metadata-org"></span>`metadata.org` | string | no |  | format `uuid` | The tenant (organization UUID) the document belongs to. When set, plan and apply refuse to run against any other tenant. |
| <span id="metadata-labels"></span>`metadata.labels` | object | no |  | map of string to string (length 0 to 256); keys match `^[a-z0-9]([a-z0-9._/-]{0,61}[a-z0-9])?$` | Free key/value labels. Stored with the object, never interpreted by the server. |
| <span id="metadata-annotations"></span>`metadata.annotations` | object | no |  | map of string to string (length 0 to 4096) | Free key/value notes for people and tools, such as a ticket link. |
| <span id="spec"></span>`spec` | object | no |  | no other keys |  |
| <span id="spec-blanket"></span>`spec.blanket` | array of object | no |  |  | Licences exempted wherever they appear. The first unexpired match wins. |
| <span id="spec-blanket-license"></span>`spec.blanket[].license` | string | yes |  | length 1 to any | The SPDX licence id. Matching is by prefix, so MPL-2.0 also covers MPL-2.0-no-copyleft-exception. |
| <span id="spec-blanket-id"></span>`spec.blanket[].id` | string | no |  | length 1 to any | A stable id to refer to the exception by in reports. |
| <span id="spec-blanket-reason"></span>`spec.blanket[].reason` | string | yes |  | pattern `\S` | Why the exception exists. Required: an exception nobody can explain cannot be told apart from a mistake. |
| <span id="spec-blanket-scope"></span>`spec.blanket[].scope` | string | no |  |  | What the claim is limited to, such as vendored, unmodified, dynamically linked. |
| <span id="spec-blanket-approver"></span>`spec.blanket[].approver` | string | no |  |  | Who signed the exception off. |
| <span id="spec-blanket-approvedDate"></span>`spec.blanket[].approvedDate` | string | no |  | pattern `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[12][0-9]\|3[01])(T00:00:00Z)?$` | When it was approved, as YYYY-MM-DD. |
| <span id="spec-blanket-expires"></span>`spec.blanket[].expires` | string | no |  | pattern `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[12][0-9]\|3[01])(T00:00:00Z)?$` | The last day the exception applies, as YYYY-MM-DD. Left out, it never expires. |
| <span id="spec-blanket-projects"></span>`spec.blanket[].projects` | array of string | no |  | each item: length 1 to any | Only these projects, matched without case; * is every project. Left out, every project. |
| <span id="spec-packages"></span>`spec.packages` | array of object | no |  |  | Packages exempted, optionally under one licence. Checked after blanket exceptions. |
| <span id="spec-packages-purl"></span>`spec.packages[].purl` | string | no |  | pattern `^pkg:[a-zA-Z.+-]+/`; length 5 to any | The package, as a purl with * as a wildcard segment, such as pkg:golang/github.com/hashicorp/*. |
| <span id="spec-packages-name"></span>`spec.packages[].name` | string | no |  | length 1 to any | The package name, matched as a substring, for ecosystems where the short name and the full module path are both in use. |
| <span id="spec-packages-license"></span>`spec.packages[].license` | string | no |  | length 1 to any | Exempt the package only under this SPDX licence. Left out, the package is exempt whatever licence it carries, which is the broader claim. |
| <span id="spec-packages-id"></span>`spec.packages[].id` | string | no |  | length 1 to any | A stable id to refer to the exception by in reports. |
| <span id="spec-packages-reason"></span>`spec.packages[].reason` | string | yes |  | pattern `\S` | Why the exception exists. Required: an exception nobody can explain cannot be told apart from a mistake. |
| <span id="spec-packages-scope"></span>`spec.packages[].scope` | string | no |  |  | What the claim is limited to, such as vendored, unmodified, dynamically linked. |
| <span id="spec-packages-approver"></span>`spec.packages[].approver` | string | no |  |  | Who signed the exception off. |
| <span id="spec-packages-approvedDate"></span>`spec.packages[].approvedDate` | string | no |  | pattern `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[12][0-9]\|3[01])(T00:00:00Z)?$` | When it was approved, as YYYY-MM-DD. |
| <span id="spec-packages-expires"></span>`spec.packages[].expires` | string | no |  | pattern `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[12][0-9]\|3[01])(T00:00:00Z)?$` | The last day the exception applies, as YYYY-MM-DD. Left out, it never expires. |
| <span id="spec-packages-projects"></span>`spec.packages[].projects` | array of string | no |  | each item: length 1 to any | Only these projects, matched without case; * is every project. Left out, every project. |
| <span id="blanket"></span>`blanket` | array of object | no |  |  | Licences exempted wherever they appear. The first unexpired match wins. |
| <span id="blanket-license"></span>`blanket[].license` | string | yes |  | length 1 to any | The SPDX licence id. Matching is by prefix, so MPL-2.0 also covers MPL-2.0-no-copyleft-exception. |
| <span id="blanket-id"></span>`blanket[].id` | string | no |  | length 1 to any | A stable id to refer to the exception by in reports. |
| <span id="blanket-reason"></span>`blanket[].reason` | string | yes |  | pattern `\S` | Why the exception exists. Required: an exception nobody can explain cannot be told apart from a mistake. |
| <span id="blanket-scope"></span>`blanket[].scope` | string | no |  |  | What the claim is limited to, such as vendored, unmodified, dynamically linked. |
| <span id="blanket-approver"></span>`blanket[].approver` | string | no |  |  | Who signed the exception off. |
| <span id="blanket-approvedDate"></span>`blanket[].approvedDate` | string | no |  | pattern `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[12][0-9]\|3[01])(T00:00:00Z)?$` | When it was approved, as YYYY-MM-DD. |
| <span id="blanket-expires"></span>`blanket[].expires` | string | no |  | pattern `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[12][0-9]\|3[01])(T00:00:00Z)?$` | The last day the exception applies, as YYYY-MM-DD. Left out, it never expires. |
| <span id="blanket-projects"></span>`blanket[].projects` | array of string | no |  | each item: length 1 to any | Only these projects, matched without case; * is every project. Left out, every project. |
| <span id="packages"></span>`packages` | array of object | no |  |  | Packages exempted, optionally under one licence. Checked after blanket exceptions. |
| <span id="packages-purl"></span>`packages[].purl` | string | no |  | pattern `^pkg:[a-zA-Z.+-]+/`; length 5 to any | The package, as a purl with * as a wildcard segment, such as pkg:golang/github.com/hashicorp/*. |
| <span id="packages-name"></span>`packages[].name` | string | no |  | length 1 to any | The package name, matched as a substring, for ecosystems where the short name and the full module path are both in use. |
| <span id="packages-license"></span>`packages[].license` | string | no |  | length 1 to any | Exempt the package only under this SPDX licence. Left out, the package is exempt whatever licence it carries, which is the broader claim. |
| <span id="packages-id"></span>`packages[].id` | string | no |  | length 1 to any | A stable id to refer to the exception by in reports. |
| <span id="packages-reason"></span>`packages[].reason` | string | yes |  | pattern `\S` | Why the exception exists. Required: an exception nobody can explain cannot be told apart from a mistake. |
| <span id="packages-scope"></span>`packages[].scope` | string | no |  |  | What the claim is limited to, such as vendored, unmodified, dynamically linked. |
| <span id="packages-approver"></span>`packages[].approver` | string | no |  |  | Who signed the exception off. |
| <span id="packages-approvedDate"></span>`packages[].approvedDate` | string | no |  | pattern `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[12][0-9]\|3[01])(T00:00:00Z)?$` | When it was approved, as YYYY-MM-DD. |
| <span id="packages-expires"></span>`packages[].expires` | string | no |  | pattern `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[12][0-9]\|3[01])(T00:00:00Z)?$` | The last day the exception applies, as YYYY-MM-DD. Left out, it never expires. |
| <span id="packages-projects"></span>`packages[].projects` | array of string | no |  | each item: length 1 to any | Only these projects, matched without case; * is every project. Left out, every project. |

## Rules

Conditions the schema enforces beyond each field's own type. `vulnetix config validate` and the engine's plan report a document that breaks one.

| On | Rule |
|---|---|
| `the document` | Exactly one of these holds: (1) The config form: `metadata` is required, `spec` is required, `blanket` is not allowed and `packages` is not allowed; (2) The repository file form: `spec` is not allowed. |
| `spec.packages[]` | At least one of `purl` or `name` is set. |
| `packages[]` | At least one of `purl` or `name` is set. |

## Applying this kind

- **Not stored.** The engine registers the kind so that validate and plan check a document. A plan that includes one shows the warning `not_stored`, and apply sends nothing for it.

## Two forms

Both are valid, and a document is exactly one of them.

| Form | Where | Shape |
|---|---|---|
| Repository file | `.vulnetix/license-exceptions.yaml` | `blanket` and `packages` at the top level. `metadata` is optional. |
| Config | A document under `.vulnetix/config` | `metadata` and `spec` are required, and `blanket` and `packages` sit under `spec` |

The fields in the table are the same in both. A licence file written before documents carried `apiVersion` and `kind` is read as this kind from its well-known path, so an older repository keeps working. `vulnetix license` and `vulnetix scan --evaluate-licenses` read the file, or the document under `.vulnetix/config`, unless `--exceptions-file` names one. Defining it in both places, or twice, is an error. See [Which files are Platform IaC documents](/platform-iac/cli/validate.md#which-files-are-platform-iac-documents). In GitHub Actions the [license action](/sca/github-actions/license.md) reads the same files.

```yaml
# The repository file form, .vulnetix/license-exceptions.yaml
apiVersion: vulnetix.com/v1
kind: LicenseExceptions
blanket:
  - license: EPL-2.0
    reason: Eclipse libraries are used unmodified as build-time dependencies.
packages:
  - purl: pkg:npm/%40acme/internal-fonts
    reason: Proprietary fonts licensed to ACME under contract C-2291.
```

## Where it takes effect

Like [`LicensePolicy`](/platform-iac/kinds/license-policy.md), the server stores nothing for this kind. The engine registers it so that validate and plan check a document, and a plan that includes one shows the warning `not_stored`. The CLI reads the repository file on the machine running the scan.

## Terraform and OpenTofu

There is no Terraform resource. The server stores nothing for this kind, so there is nothing for Terraform to manage. The file stays in the repository; see [Which files are Platform IaC documents](/platform-iac/cli/validate.md#which-files-are-platform-iac-documents).

Check a file with `vulnetix config validate -f <file>`. See [Validate documents](/platform-iac/cli/validate.md). In an editor, start the file with the [schema comment](/platform-iac/schemas/editors.md).
