Policy Input Structure
When evaluating external image policies, Nuon provides the following input structure:Quick Reference
| Field | Type | Description |
|---|---|---|
input.image | string | Image name (e.g., nginx, gcr.io/project/app) |
input.tag | string | Image tag (e.g., latest, v1.2.3) |
input.digest | string | Image digest (e.g., sha256:abc...) |
input.metadata.signed | bool | Whether the image has signatures |
input.metadata.sbom.present | bool | Whether an SBOM is present |
input.metadata.sbom.format | string | SBOM format: spdx, cyclonedx, or unknown |
input.metadata.signatures | array | List of signature details |
input.metadata.attestations | array | List of attestation types from OCI referrers |
input.metadata.index | object | Raw OCI image index (manifest list) |
input.metadata.attestation_manifests | array | Full attestation manifest data with layers |
Basic Image Requirements
Require Image Signing
Ensure all images are cryptographically signed:Require SBOM Presence
Ensure all images include a Software Bill of Materials:Require Specific SBOM Format
Enforce a specific SBOM format (SPDX or CycloneDX):Signature Inspection
Check Signature Algorithm
Require a specific signing algorithm:Require Signature from Trusted Issuer
Validate signature issuer for keyless signing (e.g., Sigstore):Attestation Policies
Require SLSA Provenance
Ensure images have SLSA provenance attestations:Check Specific Predicate Types
Inspect attestation layers for specific predicate types:Advanced: Decoded Attestation Content
When attestation layers are fetched with content decoding enabled, you can inspect the decoded in-toto statements.Validate In-Toto Statement Type
Verify Subject Digest Matches Image
Ensure attestation subjects match the image being validated:Inspect SLSA Provenance Predicate
Access the full provenance predicate for advanced validation:Platform-Specific Policies
Require Multi-Architecture Support
Ensure images support specific platforms:Image Registry Policies
Allowlist Trusted Registries
Only allow images from approved registries:Block Latest Tag
Prevent use of mutable tags:Combining Multiple Requirements
Production-Ready Image Policy
A comprehensive policy combining multiple security requirements:Configuring Image Policies
Add external image policies to your Nuon configuration:policies/external-images.toml
Using External Policy Files
Reference policies from your repository:policies/external-images.toml
Metadata Field Reference
input.metadata.sbom
| Field | Type | Description |
|---|---|---|
present | bool | true if SBOM detected via OCI referrers or attestation layers |
format | string | spdx, cyclonedx, or unknown |
uri | string | URI to SBOM artifact (when available) |
- OCI referrers with SBOM artifact types
- Attestation layers with predicate types:
https://spdx.dev/Document→ format:spdxhttps://cyclonedx.org/bom→ format:cyclonedx
input.metadata.signatures
| Field | Type | Description |
|---|---|---|
key_id | string | Key identifier (for keyed signing) |
issuer | string | OIDC issuer (for keyless signing) |
subject | string | OIDC subject identity |
algorithm | string | Signature algorithm/media type |
input.metadata.attestations
Attestations discovered via OCI referrers:
| Field | Type | Description |
|---|---|---|
type | string | Attestation artifact type |
predicate | string | Predicate type (when available) |
input.metadata.attestation_manifests
Full attestation manifest data including layers:
| Field | Type | Description |
|---|---|---|
digest | string | Manifest digest |
media_type | string | Manifest media type |
platform | object | Platform spec (os, architecture, variant) |
ref_digest | string | Referenced image digest |
annotations | object | OCI annotations |
layers | array | Attestation layer blobs |
input.metadata.attestation_manifests[].layers
| Field | Type | Description |
|---|---|---|
digest | string | Layer blob digest |
media_type | string | Layer media type |
size | int | Layer size in bytes |
predicate_type | string | In-toto predicate type |
decoded | object | Decoded in-toto statement (when available) |
truncated | bool | true if layer was too large to fetch |
input.metadata.attestation_manifests[].layers[].decoded
Decoded in-toto statement:
| Field | Type | Description |
|---|---|---|
_type | string | Statement type (e.g., https://in-toto.io/Statement/v1) |
subject | array | Statement subjects with name and digest |
predicateType | string | Predicate type URI |
predicate | object | Full predicate content (format varies by type) |
input.metadata.index
OCI image index (manifest list):
| Field | Type | Description |
|---|---|---|
digest | string | Index digest |
media_type | string | Index media type |
manifests | array | List of manifest entries |
input.metadata.index.manifests
| Field | Type | Description |
|---|---|---|
digest | string | Manifest digest |
media_type | string | Manifest media type |
platform | object | Platform spec |
annotations | object | OCI annotations |
is_attestation | bool | true if this is an attestation manifest |