Skip to content

OCI base-profile artifacts at ghcr.io/security-profiles/runc are amd64-only #3161

@Ca-moes

Description

@Ca-moes

What happened:

Setting baseProfileName: oci://ghcr.io/security-profiles/runc:v1.3.3 (or any other published tag) on a SeccompProfile causes spod on a linux/arm64 host to fail with:

ERROR cannot pull base profile  err="read profile: open /tmp/pull-XXXXXXXXX/profile.yaml: no such file or directory"

The profile sits in Pending indefinitely; no SecurityProfileNodeStatus is created.

Inspecting the OCI manifest at any tag in this repository (verified on v1.1.4 through v1.4.0) shows it is a single-arch image manifest (not an OCI image index) with one layer titled profile-linux-amd64.yaml:

TOKEN=$(curl -sSL "https://ghcr.io/token?scope=repository:security-profiles/runc:pull&service=ghcr.io" | jq -r .token)
curl -sSL -H "Authorization: Bearer $TOKEN" \
  -H "Accept: application/vnd.oci.image.index.v1+json,application/vnd.oci.image.manifest.v1+json" \
  "https://ghcr.io/v2/security-profiles/runc/manifests/v1.4.0" \
  | jq '{mediaType, layers: [.layers[].annotations]}'

Returns:

{
  "mediaType": "application/vnd.oci.image.manifest.v1+json",
  "layers": [
    { "org.opencontainers.image.title": "profile-linux-amd64.yaml" }
  ]
}

There is no linux/arm64 (or any other non-amd64) variant published.

What you expected to happen:

spod resolves the OCI artifact for the host architecture and merges the runc default profile into the user's SeccompProfile. The profile reaches status.status: Installed. This is the documented behaviour described in installation-usage.md under "Base profile via OCI artifact".

How to reproduce it (as minimally and precisely as possible):

  1. Bring up a Kubernetes cluster on a linux/arm64 node (e.g. kind v0.31.0 on an Apple Silicon Mac, or a kind cluster on an arm64 Linux runner).
  2. Install cert-manager and SPO from deploy/operator.yaml.
  3. Apply a SeccompProfile that references the OCI base profile:
    apiVersion: security-profiles-operator.x-k8s.io/v1beta1
    kind: SeccompProfile
    metadata:
      name: test
      namespace: default
    spec:
      baseProfileName: oci://ghcr.io/security-profiles/runc:v1.3.3
      defaultAction: SCMP_ACT_ERRNO
  4. Watch the spod logs for the node:
    kubectl -n security-profiles-operator logs ds/spod -c security-profiles-operator

The error log line above appears and the profile never installs.

Anything else we need to know?:

  • The resolver in internal/pkg/artifact/artifact.go (around line 356) tries profile-linux-${arch}.yaml first and then falls back to profile.yaml. Neither exists in the artifact for non-amd64 architectures, so the fallback also fails.
  • The upstream e2e that exercises this path, test/tc_base_profiles_oci_test.go, currently carries //nolint:unused // test is flaky and therefore got deactivated (verified on main HEAD dbc1b7a5c). Re-enabling that test on an arm64 runner would be a natural regression target once a fix lands.
  • Suggested fix: have whatever workflow publishes ghcr.io/security-profiles/runc:* push a multi-arch OCI image index, with one per-arch manifest pointing to a profile-linux-${arch}.yaml layer. Adding linux/arm64 (and ideally linux/ppc64le for parity with the rest of SPO's matrix) would unblock the OCI base-profile path on non-amd64 hosts.
  • I haven't yet located the publishing workflow in the SPO repo (the matrix in .github/workflows/build.yml covers the spoc CLI, not the runc OCI artifact). Happy to send a PR once pointed at the right place.

Environment:

  • Cloud provider or hardware configuration: kind v0.31.0 on Apple Silicon (M-series); also reproduced on an arm64 GitHub Actions runner.
  • OS: Ubuntu 24.04 (runner) / Linux node images shipped with kind.
  • Kernel: 6.x range.
  • Others: SPO v0.10.0; reproduced against main HEAD dbc1b7a5c. cert-manager v1.x.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions