OCI Artifacts: Distributing Container Images and Helm Charts

Package container images, Helm charts, and related artifacts with OCI; check registry support and verify signatures and SBOMs by digest.

published: reading time: 27 min read author: Geek Workbench updated: November 23, 2026
Quick Summary

OCI registries can store more than container images, but support for custom media types and referrers depends on the registry and its configuration. This guide pins examples to OCI Distribution 1.1.1, ORAS 1.4.0, Helm 4.3.2, and Cosign 3.1.4, then shows how to publish an image, attach an SBOM by digest, and verify a signature against an expected identity.

Introduction

The OCI Distribution Specification defines a registry API for content addressed by manifests, tags, and digests. Tools such as ORAS use that API to store artifacts like Helm charts, SBOMs, and policy bundles alongside container images. The format is content agnostic, but a registry’s support for custom media types and referrers depends on its implementation and configuration.

This guide uses OCI Image Specification 1.1.0 and Distribution Specification 1.1.1, ORAS CLI 1.4.0, Helm 4.3.2, and Cosign 3.1.4. The Helm examples use helm push and helm pull; older guides may show experimental helm chart commands. Check the registry vendor’s support matrix and test the exact artifact and referrer operations you plan to use.

An image, its SBOM, and its signature are separate objects. An SBOM can refer to the image digest, and a signature can verify that digest, but storing them in the same registry does not establish trust by itself. A deployment policy still needs to verify the artifact and the expected signer.

When to Use / When Not to Use

When OCI artifacts make sense

OCI artifacts are useful when you want to distribute non-image content through a registry your tools and organization already support. Before choosing this route, confirm that the registry accepts the media types you need, retains those artifacts, and supports the referrer discovery method required by your signing or SBOM workflow.

Use OCI artifacts when images, charts, and related metadata benefit from a shared authentication and promotion workflow. Keep the image, SBOM, and signature linked by the image digest; do not treat a multi-layer artifact bundle as equivalent to a signed image with a verifiable SBOM.

The OCI format can make artifacts portable, but portability still depends on registry and client support. A registry may implement the base distribution API without accepting custom media types or supporting the Distribution 1.1 referrers API.

Helm charts are a common use case. A pipeline can package a chart and push it to an OCI registry, without maintaining a chart repository index.yaml. The registry must support the chart media types and the Helm client version used by the pipeline.

ORAS can package files as OCI artifacts, including SBOMs and policy bundles. A push using a custom artifact or layer media type can still fail if the registry or a client on the pull path does not accept that type. Test upload, download, and discovery against the exact registry configuration before relying on the workflow.

When to stick with traditional approaches

OCI artifact support requires a compatible registry. Older self-hosted registries may reject custom media types or lack the referrers API. In those cases, chart repositories (for Helm) or separate artifact stores may be a better fit.

If you only distribute container images and do not need to bundle additional artifacts, standard Docker image push and pull is simpler and more widely understood.

If your artifacts are large binary files that change frequently, the registry storage costs can add up. Some artifact types are better served by object storage with a CDN.

Registry compatibility is the first constraint. OCI Distribution conformance does not guarantee support for every artifact type or referrer discovery. Check the registry’s documentation for media types, manifest versions, referrers, retention, and project-level settings. Then push a test artifact, pull it back, and query its referrers using the same clients and versions used in production.

The second constraint is tooling integration. Helm OCI support became generally available in Helm 3.8.0, but the examples here target Helm 4.3.2. OCI registries do not use the chart repository index.yaml workflow, so teams that depend on helm search repo may need a registry-specific catalog or a tag-listing tool such as ORAS.

Large binary artifacts with frequent updates may fit object storage and a CDN better. Compare request, transfer, storage, and retention costs for your provider, and account for registry cleanup and replication behavior before choosing.

OCI Artifact Distribution Flow

flowchart TD
    A[Developer] --> B[oras push<br/>or helm push]
    B --> C{Registry Type}
    C -->|OCI-compatible| D[Registry with required media-type support]
    C -->|Traditional| E[ChartMuseum<br/>HTTP API]
    D --> F[Artifacts stored in<br/>OCI Registry]
    E --> G[index.yaml +<br/>chart tarballs]
    F --> H[Clusters pull via<br/>standard docker/helm pull]
    D --> I[Cosign signs<br/>manifests]
    I --> H

What is OCI?

This guide’s examples use OCI Image Specification 1.1.0 for image format and OCI Distribution Specification 1.1.1 for registry operations. The Image Specification describes image content; the Distribution Specification describes the API used to push and pull it.

The Distribution Specification is designed to be agnostic about content types. That does not mean every registry accepts every media type or supports every discovery feature. In particular, the referrers API was added in Distribution Specification 1.1 and must be supported by the registry for API-based discovery to work.

OCI artifact types include:

  • Container images (the original use case)
  • Helm charts
  • Architecture diagrams
  • Policy bundles
  • SBOMs (Software Bills of Materials)
  • Binary blobs

OCI Distribution Specification

The OCI distribution spec describes a REST API for distributing artifacts. Registries implementing this spec expose endpoints like:

GET  /v2/<name>/blobs/<digest>
POST /v2/<name>/blobs/uploads/
PUT  /v2/<name>/blobs/uploads/<uuid>?digest=<digest>
GET  /v2/<name>/manifests/<ref>
PUT  /v2/<name>/manifests/<ref>
DELETE /v2/<name>/manifests/<ref>

Each artifact is identified by:

  • Name: Repository path (e.g., myregistry.azurecr.io/myteam/myartifact)
  • Digest: SHA256 hash of the manifest content
  • Tag: Human-readable reference (e.g., v1.0.0, latest)

Pushing Artifacts to Registries

The examples below use ORAS CLI 1.4.0 and Helm 4.3.2. Pin the same versions in CI and verify them with oras version and helm version before relying on command behavior.

Using ORAS (OCI Registry As Storage):

# Install ORAS CLI 1.4.0 (requires a compatible Go toolchain)
go install oras.land/oras/cmd/oras@v1.4.0

# Login to your registry
oras login myregistry.azurecr.io

# Push a generic artifact (any file)
oras push myregistry.azurecr.io/myteam/config:v1.0.0 \
  ./config.json:application/json

# Push with custom media type
oras push myregistry.azurecr.io/myteam/mydata:v1.0.0 \
  ./data.tar.gz:application/x-tar+gzip

Push Helm chart as OCI artifact:

# Login
helm registry login myregistry.azurecr.io

# Package and push a chart with Helm 4.3.2
helm package ./mychart
helm push mychart-1.0.0.tgz oci://myregistry.azurecr.io/myteam/charts

# Pull
helm pull oci://myregistry.azurecr.io/myteam/charts/mychart --version 1.0.0 --untar --untardir ./extracted

Push related files as one generic artifact:

# This creates one artifact with two layers; it does not sign a container image.
oras push myregistry.azurecr.io/myteam/bundle:v1.0.0 \
  ./sbom.spdx:application/spdx+json \
  ./policy.yaml:application/yaml

Helm Charts as OCI Artifacts

Helm 4.3.2 packages a chart as a .tgz file and pushes it to an OCI registry. The registry path supplies the namespace; Helm derives the chart name and version from the package metadata.

Workflow example:

# Run with Helm 4.3.2
helm package ./mychart

# Login to OCI registry
helm registry login -u myuser myregistry.azurecr.io

# Push the package; the chart name and version come from Chart.yaml
helm push mychart-1.0.0.tgz oci://myregistry.azurecr.io/mycorp/charts

# Pull and inspect the chart
helm pull oci://myregistry.azurecr.io/mycorp/charts/mychart --version 1.0.0
helm show all oci://myregistry.azurecr.io/mycorp/charts/mychart --version 1.0.0

# List available versions with ORAS CLI 1.4.0
oras repo tags myregistry.azurecr.io/mycorp/charts/mychart

The registry may require the repository or namespace to exist before the push. Check its documentation and test both push and pull with the exact registry configuration used in production.

Cosign for Artifact Signing

Cosign 3.1.4 signs an image by digest and stores a separate signature artifact. The signature is useful only when the verifier checks both the image digest and the identity allowed by deployment policy.

For keyless signing in CI, the job must provide an OIDC identity that Sigstore can use. Replace the sample identity and issuer with the exact workflow identity your policy trusts.

IMAGE="myregistry.azurecr.io/myteam/myimage@sha256:REPLACE_WITH_REAL_DIGEST"

# Keyless signing in an OIDC-enabled CI job
cosign sign --yes "$IMAGE"

# Verify the exact digest and expected workflow identity
cosign verify "$IMAGE" \
  --certificate-identity "https://github.com/ORG/REPO/.github/workflows/release.yml@refs/heads/main" \
  --certificate-oidc-issuer "https://token.actions.githubusercontent.com"

For key-based signing, pin the public key used by deployment policy and verify with cosign verify --key cosign.pub "$IMAGE". Do not use --insecure-ignore-tlog as a production verification shortcut. A successful cryptographic check proves the signature matches the digest and configured trust material; policy must still decide whether that signer is allowed to publish this artifact.

Practical Workflow Examples

Publish an image, attach an SBOM, and verify the signer

REGISTRY="myregistry.azurecr.io"
REPOSITORY="myteam/myapp"
IMAGE_TAG="$REGISTRY/$REPOSITORY:v1.0.0"

# Push the image, then resolve the tag once and use its immutable digest.
docker push "$IMAGE_TAG"
DIGEST="$(oras resolve "$IMAGE_TAG")"
IMAGE="$REGISTRY/$REPOSITORY@$DIGEST"

# Attach the SBOM as a referrer to the image digest.
# Use an artifact type and media type accepted by your registry and policy.
oras attach --artifact-type application/vnd.example.sbom.v1+json \
  "$IMAGE" ./sbom.spdx.json:application/spdx+json

# Sign the same digest. In keyless CI, this job must have the expected OIDC identity.
cosign sign --yes "$IMAGE"

# Verify both digest and signer identity before deployment.
cosign verify "$IMAGE" \
  --certificate-identity "https://github.com/ORG/REPO/.github/workflows/release.yml@refs/heads/main" \
  --certificate-oidc-issuer "https://token.actions.githubusercontent.com"

# Confirm that the SBOM is discoverable as a referrer to this image.
oras discover --artifact-type application/vnd.example.sbom.v1+json "$IMAGE"

The signature verifies the image digest and the expected build identity. The SBOM reference records which image digest it describes, but that relationship does not prove who generated the SBOM. If policy requires a trusted SBOM, sign or attest it too and verify that signer and predicate before deployment. Registry support for the Referrers API and compatibility tag schema varies, so test the discovery behavior against the production registry.

Promote an artifact between registries

Copying an image does not guarantee that its signatures and other referrers are copied. Use a copy tool and options that preserve the required referrers, then verify them in the destination registry. If the destination does not preserve or expose them, re-sign or re-attach according to your promotion policy.

# Resolve and copy the exact image digest; do not invent a digest-shaped tag.
IMAGE="myregistry.azurecr.io/myteam/myapp@sha256:REPLACE_WITH_REAL_DIGEST"
oras cp --recursive "$IMAGE" "prodregistry.example.com/myteam/myapp:v1.0.0"

# Resolve the destination and verify its signature and attached artifacts.
PROD_DIGEST="$(oras resolve prodregistry.example.com/myteam/myapp:v1.0.0)"
PROD_IMAGE="prodregistry.example.com/myteam/myapp@$PROD_DIGEST"
cosign verify "$PROD_IMAGE" \
  --certificate-identity "https://github.com/ORG/REPO/.github/workflows/release.yml@refs/heads/main" \
  --certificate-oidc-issuer "https://token.actions.githubusercontent.com"
oras discover "$PROD_IMAGE"

Production Failure Scenarios

OCI artifact workflows can fail when the registry, client, and artifact type do not agree.

Registry does not support OCI artifact types

Do not infer support from a successful image push or from the phrase “OCI-compatible.” Test the required workflow end to end: push one artifact with the intended media types, pull it, resolve its digest, attach a referrer, and discover that referrer using the production client. Review the registry’s current docs for feature flags, permissions, retention, and supported manifest types.

Media type mismatches

ORAS and Helm use media types to identify artifact content. If you push an unexpected type, the registry may reject it and a client may be unable to pull it. Helm charts use application/vnd.cncf.helm.chart.content.v1.tar+gzip for the chart layer in the current format; older Helm versions used different media types.

What a media type mismatch looks like in practice:

Registries differ in the media types and artifact manifests they accept. A 415 Unsupported Media Type can indicate a registry or proxy rejected the request, but other errors may come from authentication, repository configuration, or client compatibility. Compare the registry response with its support documentation and the exact CLI version used by the publisher.

Detecting and resolving media type issues:

# Inspect the manifest media type of an artifact
oras manifest fetch myregistry.azurecr.io/myteam/myapp:v1.0.0 | jq '.mediaType'

# Check the chart layer media type in the manifest
oras manifest fetch myregistry.azurecr.io/myteam/charts/mychart:1.0.0 | jq '.layers[].mediaType'

# Push the chart using Helm so it writes the expected manifest and media types.
helm push mychart-1.0.0.tgz oci://myregistry.azurecr.io/myteam/charts

Avoid manually overriding Helm’s chart media type. Pin the Helm version across the publishing and consuming pipeline, and test both chart push and pull before changing the production registry.

Digest mismatch after promotion

When promoting artifacts between registries (dev to staging to prod), always pull by digest, not by tag. Tags can be overwritten, causing the same tag to point to different content in different registries. Using digests ensures bit-for-bit identity across environments.

# Wrong: pull by tag (may change)
oras pull myregistry.azurecr.io/myteam/myapp:v1.0.0

# Right: pull by digest (immutable)
oras pull myregistry.azurecr.io/myteam/myapp@sha256:abc123...

Cosign signature verification failures

Cosign verification can fail if the digest differs, the signature referrer is missing, or the certificate identity and OIDC issuer do not match policy. A registry copy may preserve the image digest but omit signature referrers; check the destination rather than assuming that a tag copy moved every associated artifact.

Run the verification command to see what went wrong:

# Verify with a trusted public key
cosign verify --key cosign.pub "$IMAGE"

# Or verify keyless signing against the expected identity and issuer
cosign verify "$IMAGE" \
  --certificate-identity "https://github.com/ORG/REPO/.github/workflows/release.yml@refs/heads/main" \
  --certificate-oidc-issuer "https://token.actions.githubusercontent.com"

Use the verification error and registry logs to distinguish a missing signature from an identity mismatch or trust-service failure. Do not bypass identity or transparency checks to make a deployment pass; correct the signing configuration or update policy through the normal review process.

OCI vs Alternatives

Aspect OCI Artifacts Chart Repositories Object Storage + CDN
Storage Container registry HTTP server with index.yaml S3 / GCS / Blob
Access control Integrated with registry auth Separate per-repo auth Separate IAM
Artifact bundling Multiple artifacts in one push Single artifact per package Manual bundling
Helm support Native in Helm 4.3.2 Native Requires download + install
Cosign integration Depends on registry referrers Separate workflow Separate workflow
Cross-registry promotion Copy by digest and verify refs Pull by URL Copy via CLI
Cost Registry storage rates Cheap static hosting Pay per GB

OCI artifacts win when you already use a container registry and want unified artifact management. Chart repositories remain practical for pure Helm distributions without artifact bundling.

Observability Hooks

Track artifact distribution health with these monitoring practices.

Key metrics:

# Artifact push success rate
sum(rate(oras_push_success_total[5m])) by (repository, artifact_type)

# Artifact pull latency (p95)
histogram_quantile(0.95,
  sum(rate(oras_pull_duration_seconds_bucket[5m])) by (le, repository)
)

# Signature verification failures
sum(rate(cosign_verify_failure_total[5m])) by (repository, error_code)

# Registry storage used by artifact type
sum(registry_artifact_storage_bytes) by (artifact_type, repository)

Alert rules:

# Alert if artifact pushes are failing
- alert: OCIArtifactPushFailures
  expr: sum(rate(oras_push_failure_total[5m])) > 0.01
  labels:
    severity: critical
  annotations:
    summary: "OCI artifact push failures detected"
    description: "{{ $value }} push failures per second. Check registry connectivity and authentication."

# Alert if Cosign verification failures spike
- alert: CosignVerificationFailures
  expr: sum(rate(cosign_verify_failure_total[5m])) / sum(rate(cosign_verify_total[5m])) > 0.05
  labels:
    severity: critical
  annotations:
    summary: "Cosign verification failure rate above 5%"
    description: "Image signature verification is failing for {{ $labels.repository }}. Unverified images may be running in production."

# Alert if artifact storage is running low
- alert: RegistryStorageHigh
  expr: registry_storage_used_bytes / registry_storage_limit_bytes > 0.85
  labels:
    severity: warning
  annotations:
    summary: "Registry storage above 85%"
    description: "Artifact storage is running low. Plan cleanup or expansion."

Debugging commands:

# Check ORAS login status
oras login localhost:5000 -u admin -p admin

# Inspect artifact manifest
oras manifest fetch myregistry.azurecr.io/myteam/myapp:v1.0.0

# Verify artifact signature
cosign verify --key mykey.pem myregistry.azurecr.io/myteam/myapp:v1.0.0

# List all artifacts in a repository
oras repo tags myregistry.azurecr.io/myteam

# Check a Helm chart in OCI Registry with Helm 4.3.2
helm pull oci://myregistry.azurecr.io/myteam/charts/mychart \
  --version 1.0.0 --untar --untardir /tmp/chart

# Inspect SBOM attached to image
cosign attest --type spdxjson \
  --predicate /tmp/sbom.json \
  myregistry.azurecr.io/myteam/myapp:v1.0.0

Common Pitfalls / Anti-Patterns

Pulling by mutable tag instead of immutable digest

Pushing myapp:latest and then pulling myapp:latest later may give you a different image. Tags can be overwritten. Always pull by digest for reproducible builds and deployments.

Consider a CI pipeline that builds and pushes myapp:build-123 and myapp:latest on every commit to main. Between your helm install --set image=myapp:latest and the actual pod scheduling on the cluster, another pipeline run may have overwritten the latest tag with a newer build. The pod that eventually starts runs code you never tested with that commit.

Digest-based pulling eliminates this race entirely:

# Resolve the image tag once, then deploy the image by digest.
IMAGE_TAG="myregistry.azurecr.io/myteam/myapp:v1.0.0"
DIGEST="$(oras resolve "$IMAGE_TAG")"
IMAGE="myregistry.azurecr.io/myteam/myapp@$DIGEST"

# Container image references can use the immutable digest.
echo "$IMAGE"

# Helm chart versions remain semantic versions, not image digests.
helm install myrelease oci://myregistry.azurecr.io/myteam/charts/mychart \
  --version 1.0.0

Store the digest as an environment variable or in a config file checked into source control alongside your deployment manifests. GitOps tools like Flux and Argo CD support digest-based image references natively, so the manifest stays immutable once you commit it.

Registry settings and referrer support

Registry support changes across products, versions, and configuration. Before onboarding a registry, check its documentation for custom artifact media types, the Distribution 1.1 Referrers API, compatibility-tag discovery, repository creation, permissions, and retention. Do not assume that a successful image push proves that charts, SBOMs, or signatures will also work.

Run a small compatibility check with the same versions and permissions as the production pipeline:

# Push and pull a non-image artifact with the expected media type.
oras push registry.example.com/team/policy:v1 ./policy.yaml:application/yaml
oras pull registry.example.com/team/policy:v1 -o ./pulled-policy

# Test both referrer discovery mechanisms against the image digest.
oras discover --distribution-spec v1.1-referrers-api "$IMAGE"
oras discover --distribution-spec v1.1-referrers-tag "$IMAGE"

The ORAS 1.4.0 discover command documents these referrer modes as preview features. Treat the result as a compatibility check, not proof that every tool or registry will handle referrers the same way. Record the working mode and configuration alongside the deployment policy.

Using non-standard media types without client configuration

Some registries and clients only recognize standard OCI media types. Custom media types may work locally but fail in production environments with stricter validation. Stick to standard types unless you control both the push and pull tooling.

The problem with deviating from standard media types:

The OCI spec defines canonical media types. A custom media type may be valid for an artifact, but a client or registry along the pull path can still reject or mishandle it. This matters in mixed tooling environments where ORAS, Helm, and Docker use the same registry.

For example, a policy bundle pushed with a custom media type may be readable by the publisher’s ORAS version but rejected by another client or registry. A custom type is an agreement between every component on the pull path, not a portability guarantee.

Standard media types to use:

Artifact Type Standard Media Type
OCI Image Manifest application/vnd.oci.image.manifest.v1+json
OCI Config Blob application/vnd.oci.image.config.v1+json
Helm Chart Tarball application/vnd.cncf.helm.chart.content.v1.tar+gzip
Generic Tarball application/x-tar+gzip
SPDX SBOM JSON application/spdx+json
Generic JSON application/json
Plain Text text/plain

When you genuinely need a custom media type:

Vendor-prefixed types like application/vnd.mycompany.artifact.v1+json are structurally valid when your tooling requires them. Each client on the pull path must support the type, which can require configuration. This is easiest when you control both ends of the pipeline; for distribution across teams or to third parties, standard types are usually simpler.

Not cleaning up dangling manifests

Repeatedly replacing tags can leave unreferenced manifests or blobs until the registry’s retention and garbage-collection rules remove them. Those rules differ by registry and may also affect signatures and SBOM referrers. Use immutable release tags where possible, inspect the provider’s cleanup behavior, and monitor storage with the registry’s supported metrics rather than assuming that deleting a tag immediately removes its content.

Interview Questions

1. What is the difference between the OCI Image Specification and the OCI Distribution Specification?

Expected answer points:

  • The OCI Image Specification defines the format and structure of a container image (manifest, config, filesystem layers)
  • The OCI Distribution Specification defines the HTTP API for distributing artifacts through compatible registries
  • They are independent specifications: images are the content, distribution is the transport
  • The distribution spec works over HTTPS using REST endpoints compatible with Docker Registry v2
2. What is ORAS and how does it extend OCI artifact distribution?

Expected answer points:

  • ORAS (OCI Registry As Storage) can use a registry to store non-image artifacts when the registry and clients support the required types
  • It allows pushing any file type as an artifact with custom media types
  • Supports artifact bundling: push multiple related files (image, SBOM, signature) in one operation
  • Uses the OCI distribution spec like a key-value store, leveraging existing auth and storage infrastructure
3. Why should you pull container images and OCI artifacts by digest instead of by tag?

Expected answer points:

  • Tags are mutable: `myapp:latest` can point to different content at different times
  • Digests are content-addressable: `myapp@sha256:abc123...` always returns the same bits
  • Pulling by digest ensures bit-for-bit reproducibility across environments
  • Critical for reproducible builds, audit trails, and security verification
  • Tags are useful for promotion pipelines but should resolve to digests for production pulls
4. How do you push and pull an OCI chart with the pinned Helm version?

Expected answer points:

  • Package the chart with Helm 4.3.2 using `helm package ./mychart`
  • Authenticate with `helm registry login registry.example.com`
  • Push the package with `helm push mychart-1.0.0.tgz oci://registry.example.com/charts`
  • Pull it with `helm pull oci://registry.example.com/charts/mychart --version 1.0.0`
  • The registry does not use the chart repository `index.yaml` workflow
5. What is Cosign and what does it sign in the context of OCI artifacts?

Expected answer points:

  • Cosign is part of the Sigstore project, used for cryptographic signing of OCI artifacts
  • It generates a separate signature artifact associated with the image digest; registry discovery support varies
  • Signature is associated with the image digest, not the tag
  • Supports key-based signing (private key) and keyless signing (OIDC identity via Sigstore)
  • Supports container image signatures and attestations; verify the exact artifact type and registry workflow
  • Signature attestation supports predicates like SLSA provenance and SPDX SBOMs
6. How does Cosign keyless signing work and what OIDC providers does it support?

Expected answer points:

  • Keyless signing uses OIDC identities (GitHub Actions, Google, Microsoft) to derive signing keys
  • The signing client creates an ephemeral key pair and obtains an OIDC identity token
  • Fulcio issues a short-lived certificate for the identity; the signature payload binds to the artifact digest
  • Sigstore's transparency service records the signing event when the configured flow uses it
  • Supports GitHub Actions OIDC, Google OIDC, and other OIDC providers
  • No long-lived private keys to manage, reducing key rotation burden
7. Which media type identifies a Helm chart layer, and why should the publisher and registry agree on it?

Expected answer points:

  • Helm uses `application/vnd.cncf.helm.chart.content.v1.tar+gzip` for the chart content layer in the current format
  • OCI manifests use a separate manifest media type
  • A registry may reject a media type or a client may not know how to consume it
  • Use matching Helm versions and check the registry's current media-type support
  • Custom types require support from every publisher, registry, and consumer in the workflow
8. How do you promote an OCI image and check that its signature referrer reached production?

Expected answer points:

  • Copy the source image by immutable digest with a tool configured to preserve referrers, such as `oras cp --recursive`
  • Resolve the destination tag and confirm it has the same image digest
  • Use `oras discover` at the destination to check that signature and SBOM referrers are available
  • Verify the signature against the expected identity and issuer at the destination
  • If the referrers were not copied, re-sign or re-attach them under the promotion policy
9. What should you test before relying on an OCI registry for charts and referrers?

Expected answer points:

  • Check registry version, project settings, authorization, media-type support, and referrer discovery
  • Push and pull a chart with the exact Helm version used by the pipeline
  • Push a custom artifact and confirm the registry returns the expected manifest
  • Attach an SBOM and signature, then query them with the production client
  • Check storage, retention, and cleanup behavior using the registry's current documentation
10. What is the difference between `oras push` and `docker push` for artifact distribution?

Expected answer points:

  • `docker push` only supports container image media types defined in the Docker specification
  • `oras push` can write non-image artifacts, subject to registry and client media-type support
  • ORAS can push multiple files as separate layers in a single artifact manifest
  • ORAS works without Docker daemon; it talks directly to the registry HTTP API
  • Use the image build and push tool already supported by your pipeline for container images
11. How do you attach an SBOM to a container image using ORAS or Cosign?

Expected answer points:

  • Resolve the pushed image tag to an immutable digest with `oras resolve`
  • Attach the SBOM to that digest with `oras attach --artifact-type application/vnd.example.sbom.v1+json IMAGE sbom.spdx.json:application/spdx+json`
  • Sign the same image digest with Cosign and verify the expected signer identity and OIDC issuer
  • Use `oras discover` to confirm the SBOM is associated with the image digest
  • If policy requires SBOM authenticity, sign or attest the SBOM and verify its signer too
12. What Prometheus metrics would you monitor to detect OCI artifact distribution failures in production?

Expected answer points:

  • `oras_push_success_total` and `oras_push_failure_total` by repository and artifact type
  • `oras_pull_duration_seconds` histogram to detect latency spikes
  • `cosign_verify_failure_total` to track signature verification failures
  • `registry_storage_used_bytes` by artifact type to monitor storage consumption
  • `cosign_verify_success_total` as a ratio to total verification attempts
  • Alert thresholds: push failure rate > 1%, verification failure rate > 5%, storage > 85%
13. How does Cosign attestation differ from Cosign signature, and when would you use each?

Expected answer points:

  • A Cosign signature is a cryptographic proof that the artifact content has not changed since signing
  • A Cosign attestation is a signed JSON document (predicate) about the artifact, such as SLSA provenance or an SBOM
  • Attestations use `cosign attest`; signatures use `cosign sign`
  • Use attestations when you need to attach metadata: build provenance, scan results, policy compliance
  • Use signatures when you just need integrity verification: "this artifact has not been tampered with"
  • Both are stored as separate artifacts linked to the image digest via Rekor entries
14. What is a dangling manifest in an OCI registry and why does it cause storage bloat?

Expected answer points:

  • A dangling manifest occurs when a new manifest is pushed with the same tag as an existing manifest
  • The old manifest is no longer reachable by tag but still exists as ablob in storage
  • Whether and when untagged content is removed depends on registry retention and garbage-collection policy
  • Over time with frequent re-tags, this accumulates unused blobs consuming storage
  • Registry garbage collection must be run periodically to reclaim space
  • Check the registry's cleanup policy and test when untagged manifests and blobs are reclaimed
15. Describe the OCI distribution specification endpoints and what each one does.

Expected answer points:

  • `GET /v2//blobs/` — download a layer/blob by its SHA256 digest
  • `POST /v2//blobs/uploads/` — initiate a resumable blob upload session
  • `PUT /v2//blobs/uploads/?digest=` — complete a blob upload
  • `GET /v2//manifests/` — fetch a manifest by tag or digest
  • `PUT /v2//manifests/` — push a manifest (creates or updates a tag)
  • `DELETE /v2//blobs/` — delete a blob (not always supported)
  • The registry tracks blobs separately from manifests; manifests reference blobs by digest
16. What is the SLSA framework and how does it relate to OCI artifact signing with Cosign?

Expected answer points:

  • SLSA (Supply Chain Levels for Software Artifacts) defines security levels for software supply chains
  • Cosign can generate and verify SLSA provenance attestations using `cosign attest --type slsaprovenance`
  • SLSA provenance describes how an artifact was built: source repo, build system, materials, entry point
  • Policy engines like Gatekeeper and OPA can enforce SLSA level requirements before deployment
  • Rekor stores provenance attestations for auditability and traceability
17. How do you debug a failed `oras push` operation? Walk through your troubleshooting steps.

Expected answer points:

  • Verify login: `oras login localhost:5000 -u admin -p admin` — check credentials are stored
  • Check registry accessibility: `curl -I https://myregistry.azurecr.io/v2/`
  • Inspect the manifest: `oras manifest fetch myregistry.azurecr.io/myteam/myapp:v1.0.0`
  • Check network: `oras push` may fail due to MTU issues, proxy configuration, or TLS certificate problems
  • Verify artifact does not already exist with different content at that tag: use digest-based pulls
  • Use `--debug` flag for verbose output from ORAS
18. How does the OCI distribution specification handle artifact naming and repository paths?

Expected answer points:

  • Repositories follow a DNS-like path structure: `myregistry.azurecr.io/myteam/myartifact`
  • The registry hostname is the first path component; subsequent segments are namespace tiers
  • Artifact name combines namespace + artifact name: `mycorp/charts/mychart`
  • Tags are mutable references within a repository: `v1.0.0`, `latest`, `sha256-abcd...`
  • Digests are the canonical immutable identifier: `sha256:` of the manifest content
  • Name-to-digest resolution is registry-internal; clients cache the mapping
19. What are the trade-offs between using OCI artifacts versus traditional Helm chart repositories for distributing Helm charts?

Expected answer points:

  • OCI artifacts use existing registry infrastructure; chart repos require separate HTTP hosting with `index.yaml`
  • OCI artifacts support Cosign signing; chart repos have no native signing story
  • OCI artifacts allow bundling multiple charts or SBOMs in a single push operation
  • Chart repos are simpler to serve from static hosting (S3 + CloudFront) without registry auth complexity
  • This guide uses Helm 4.3.2 for OCI charts; older client behavior and syntax differ
  • OCI artifacts win in Kubernetes-native environments where registry auth is already configured
20. How would you enforce an image-signing policy before production deployment?

Expected answer points:

  • Use an admission policy tool that supports Cosign verification, and test its behavior with the pinned Cosign version
  • Require a signature for the resolved image digest, not just a mutable tag
  • For key-based signatures, configure the trusted public key; for keyless signatures, require the expected certificate identity and OIDC issuer
  • Reject images when the signature, digest, identity, issuer, or required transparency evidence does not meet policy
  • Check that the registry exposes the signature referrer to the admission component
  • Log verification failures and test policy updates before applying them to production

Further Reading

Conclusion

OCI Distribution gives registries a common API, but it does not guarantee that every registry accepts every media type or exposes referrers. Test the image, SBOM, signature, and discovery steps with the registry and client versions you plan to deploy.

Resolve the image to a digest, attach the SBOM to that digest, and verify a signature against an approved key or the expected keyless identity and OIDC issuer. Treat artifacts stored beside an image as untrusted until your policy verifies their content, association, and signer. During promotion, confirm that required referrers arrive at the destination and verify the image there before deployment.

Category

Related Posts

Container Images: Building, Optimizing, and Distributing

Learn how Docker container images work, layer caching strategies, image optimization techniques, and how to publish your own images to container registries.

#docker #containers #devops

Container Registry: Image Storage, Scanning & Distribution

Set up and secure container registries for storing, scanning, and distributing container images across your CI/CD pipeline and clusters.

#containers #docker #registry

Developing Helm Charts: Templates, Values, and Testing

Create production-ready Helm charts with Go templates, custom value schemas, and testing using Helm unittest and ct.

#helm #kubernetes #devops