Repository: kubernetes-sigs/security-profiles-operator
Pull request #1582 (2023-03-29 08:30:09)

build(deps): bump github.com/opencontainers/runc from 1.1.4 to 1.1.5
Bumps [github.com/opencontainers/runc](https://github.com/opencontainers/runc) from 1.1.4 to 1.1.5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/opencontainers/runc/releases">github.com/opencontainers/runc's releases</a>.</em></p>
<blockquote>
<h2>runc 1.1.5 -- &quot;囚われた屈辱は　反撃の嚆矢だ&quot;</h2>
<p>This is the fifth patch release in the 1.1.z series of runc, which fixes
three CVEs found in runc.</p>
<ul>
<li>
<p>CVE-2023-25809 is a vulnerability involving rootless containers where
(under specific configurations), the container would have write access
to the /sys/fs/cgroup/user.slice/... cgroup hierarchy. No other
hierarchies on the host were affected. This vulnerability was
discovered by Akihiro Suda.
<a href="https://github.com/opencontainers/runc/security/advisories/GHSA-m8cg-xc2p-r3fc">https://github.com/opencontainers/runc/security/advisories/GHSA-m8cg-xc2p-r3fc</a></p>
</li>
<li>
<p>CVE-2023-27561 was a regression which effectively re-introduced
CVE-2019-19921. This bug was present from v1.0.0-rc95 to v1.1.4. This
regression was discovered by <a href="https://github.com/Beuc"><code>@​Beuc</code></a>.
<a href="https://github.com/advisories/GHSA-vpvm-3wq2-2wvm">https://github.com/advisories/GHSA-vpvm-3wq2-2wvm</a></p>
</li>
<li>
<p>CVE-2023-28642 is a variant of the same bug and was fixed by the same
patch. This variant of the above vulnerability was reported by Lei
Wang.
<a href="https://github.com/opencontainers/runc/security/advisories/GHSA-g2j6-57v7-gm8c">https://github.com/opencontainers/runc/security/advisories/GHSA-g2j6-57v7-gm8c</a></p>
</li>
</ul>
<p>In addition, the following other fixes are included in this release:</p>
<ul>
<li>Fix the inability to use <code>/dev/null</code> when inside a container. (<a href="https://redirect.github.com/opencontainers/runc/issues/3620">#3620</a>)</li>
<li>Fix changing the ownership of host's <code>/dev/null</code> caused by fd redirection
(a regression in 1.1.1). (<a href="https://redirect.github.com/opencontainers/runc/issues/3674">#3674</a>, <a href="https://redirect.github.com/opencontainers/runc/issues/3731">#3731</a>)</li>
<li>Fix rare runc exec/enter unshare error on older kernels, including
CentOS &lt; 7.7. (<a href="https://redirect.github.com/opencontainers/runc/issues/3776">#3776</a>)</li>
<li>nsexec: Check for errors in <code>write_log()</code>. (<a href="https://redirect.github.com/opencontainers/runc/issues/3721">#3721</a>)</li>
</ul>
<h3>Static Linking Notices</h3>
<p>The <code>runc</code> binary distributed with this release are <em>statically linked</em> with
the following <a href="https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html">GNU LGPL-2.1</a> licensed libraries, with <code>runc</code> acting
as a &quot;work that uses the Library&quot;:</p>
<ul>
<li><a href="https://github.com/seccomp/libseccomp">libseccomp</a></li>
</ul>
<p>The versions of these libraries were not modified from their upstream versions,
but in order to comply with the LGPL-2.1 (§6(a)), we have attached the
complete source code for those libraries which (when combined with the attached
runc source code) may be used to exercise your rights under the LGPL-2.1.</p>
<p>However we strongly suggest that you make use of your distribution's packages
or download them from the authoritative upstream sources, especially since
these libraries are related to the security of your containers.</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/opencontainers/runc/blob/v1.1.5/CHANGELOG.md">github.com/opencontainers/runc's changelog</a>.</em></p>
<blockquote>
<h2>[1.1.5] - 2023-03-29</h2>
<blockquote>
<p>囚われた屈辱は
反撃の嚆矢だ</p>
</blockquote>
<h3>Fixed</h3>
<ul>
<li>Prohibit container's <code>/proc</code> and <code>/sys</code> to be symlinks (CVE-2019-19921,
CVE-2023-27561, CVE-2023-28642, <a href="https://redirect.github.com/opencontainers/runc/issues/3785">#3785</a>)</li>
<li>rootless: rework /sys/fs/cgroup mounts to avoid exposing the host's cgroup
hierarchy into the container. (CVE-2023-25809)</li>
<li>Fix the inability to use <code>/dev/null</code> when inside a container. (<a href="https://redirect.github.com/opencontainers/runc/issues/3620">#3620</a>)</li>
<li>Fix changing the ownership of host's <code>/dev/null</code> caused by fd redirection
(a regression in 1.1.1). (<a href="https://redirect.github.com/opencontainers/runc/issues/3674">#3674</a>, <a href="https://redirect.github.com/opencontainers/runc/issues/3731">#3731</a>)</li>
<li>Fix rare runc exec/enter unshare error on older kernels, inlcuding
CentOS &lt; 7.7. (<a href="https://redirect.github.com/opencontainers/runc/issues/3776">#3776</a>)</li>
<li>nsexec: Check for errors in <code>write_log()</code>. (<a href="https://redirect.github.com/opencontainers/runc/issues/3721">#3721</a>)</li>
<li>Various CI fixes and updates. (<a href="https://redirect.github.com/opencontainers/runc/issues/3618">#3618</a>, <a href="https://redirect.github.com/opencontainers/runc/issues/3630">#3630</a>, <a href="https://redirect.github.com/opencontainers/runc/issues/3640">#3640</a>, <a href="https://redirect.github.com/opencontainers/runc/issues/3729">#3729</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/opencontainers/runc/commit/f19387a6bec4944c770f7668ab51c4348d9c2f38"><code>f19387a</code></a> VERSION: release v1.1.5</li>
<li><a href="https://github.com/opencontainers/runc/commit/58a9abee210c5a72ab10904f96e0026f684f24e3"><code>58a9abe</code></a> Merge pull request from GHSA-m8cg-xc2p-r3fc</li>
<li><a href="https://github.com/opencontainers/runc/commit/27fb72c7ffdbd509b3c15b2bdb4df3d2192bfe7b"><code>27fb72c</code></a> merge branch 'pr-3776' into release-1.1</li>
<li><a href="https://github.com/opencontainers/runc/commit/8ec02ea1b14edac85a6e9a2b622ae44e15e11ccd"><code>8ec02ea</code></a> nsexec: retry unshare on EINVAL</li>
<li><a href="https://github.com/opencontainers/runc/commit/059d7730fc102052c90fea52c7b3c6f04fbbc487"><code>059d773</code></a> merge branch 'pr-3785' into release-1.1</li>
<li><a href="https://github.com/opencontainers/runc/commit/0abab45c9b97c113ff2cdc16f3a7388444c3fbec"><code>0abab45</code></a> Prohibit /proc and /sys to be symlinks</li>
<li><a href="https://github.com/opencontainers/runc/commit/0e6b818a2b0d24fdb6697614e5c5f115bbe8e3a5"><code>0e6b818</code></a> rootless: fix /sys/fs/cgroup mounts</li>
<li><a href="https://github.com/opencontainers/runc/commit/c6781d100a73d2dcef84e9376d85fff02235a2ed"><code>c6781d1</code></a> Merge pull request <a href="https://redirect.github.com/opencontainers/runc/issues/3721">#3721</a> from kinvolk/rata/nsfixes-backport</li>
<li><a href="https://github.com/opencontainers/runc/commit/f6e2cd3baf661e1f377088e13084ccb5aadf41e6"><code>f6e2cd3</code></a> nsexec: Check for errors in write_log()</li>
<li><a href="https://github.com/opencontainers/runc/commit/3775df9fcb7828594114866e1df346f44d22ad16"><code>3775df9</code></a> Merge pull request <a href="https://redirect.github.com/opencontainers/runc/issues/3731">#3731</a> from kolyshkin/1.1-fix-dev-null</li>
<li>Additional commits viewable in <a href="https://github.com/opencontainers/runc/compare/v1.1.4...v1.1.5">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/opencontainers/runc&package-manager=go_modules&previous-version=1.1.4&new-version=1.1.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

k8s-ci-robot: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our [release note process](https://git.k8s.io/community/contributors/guide/release-notes.md) to remove it.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
</details>
k8s-ci-robot: Hi @dependabot[bot]. Thanks for your PR.

I'm waiting for a [kubernetes-sigs](https://github.com/orgs/kubernetes-sigs/people) member to verify that this patch is reasonable to test. If it is, they should reply with `/ok-to-test` on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should [join the org](https://git.k8s.io/community/community-membership.md#member) to skip this step.

Once the patch is verified, the new status will be reflected by the `ok-to-test` label.

I understand the commands that are listed [here](https://go.k8s.io/bot-commands?repo=kubernetes-sigs%2Fsecurity-profiles-operator).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
</details>

k8s-ci-robot: [APPROVALNOTIFIER] This PR is **NOT APPROVED**

This pull-request has been approved by: *<a href="https://github.com/kubernetes-sigs/security-profiles-operator/pull/1582#" title="Author self-approved">dependabot[bot]</a>*
**Once this PR has been reviewed and has the lgtm label**, please assign pjbgf for approval. For more information see [the Kubernetes Code Review Process](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process).

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=kubernetes-sigs%2Fsecurity-profiles-operator).

<details open>
Needs approval from an approver in each of these files:

- **[OWNERS](https://github.com/kubernetes-sigs/security-profiles-operator/blob/main/OWNERS)**

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":["pjbgf"]} -->

Patch:
diff --git a/go.mod b/go.mod
index 0040ee3cf..2659f9a6a 100644
--- a/go.mod
+++ b/go.mod
@@ -15,7 +15,7 @@ require (
 	github.com/mogensen/kubernetes-split-yaml v0.4.0
 	github.com/nxadm/tail v1.4.8
 	github.com/opencontainers/image-spec v1.1.0-rc2
-	github.com/opencontainers/runc v1.1.4
+	github.com/opencontainers/runc v1.1.5
 	github.com/opencontainers/runtime-spec v1.1.0-rc.1
 	github.com/openshift/api v0.0.0-20221205111557-f2fbb1d1cd5e
 	github.com/pjbgf/go-apparmor v0.1.2
diff --git a/go.sum b/go.sum
index 98361546c..9f882f817 100644
--- a/go.sum
+++ b/go.sum
@@ -756,8 +756,8 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8
 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
 github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034=
 github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ=
-github.com/opencontainers/runc v1.1.4 h1:nRCz/8sKg6K6jgYAFLDlXzPeITBZJyX28DBVhWD+5dg=
-github.com/opencontainers/runc v1.1.4/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg=
+github.com/opencontainers/runc v1.1.5 h1:L44KXEpKmfWDcS02aeGm8QNTFXTo2D+8MYGDIJ/GDEs=
+github.com/opencontainers/runc v1.1.5/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg=
 github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
 github.com/opencontainers/runtime-spec v1.1.0-rc.1 h1:wHa9jroFfKGQqFHj0I1fMRKLl0pfj+ynAqBxo3v6u9w=
 github.com/opencontainers/runtime-spec v1.1.0-rc.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
diff --git a/internal/pkg/config/config.go b/internal/pkg/config/config.go
index 498230a3f..3dd9e6ef6 100644
--- a/internal/pkg/config/config.go
+++ b/internal/pkg/config/config.go
@@ -158,6 +158,10 @@ const (
 	// DefaultSpoProfilePath default path from where the security profiles are copied
 	// by non-root enabler.
 	DefaultSpoProfilePath = "/opt/spo-profiles"
+
+	// OCIProfilePrefix is the prefix used for specifying security profiles
+	// from OCI artifacts.
+	OCIProfilePrefix = "oci://"
 )
 
 // ProfileRecordingOutputPath is the path where the recorded profiles will be
diff --git a/internal/pkg/daemon/seccompprofile/seccompprofile.go b/internal/pkg/daemon/seccompprofile/seccompprofile.go
index f2bdc3c1f..30d625d26 100644
--- a/internal/pkg/daemon/seccompprofile/seccompprofile.go
+++ b/internal/pkg/daemon/seccompprofile/seccompprofile.go
@@ -192,15 +192,7 @@ func (r *Reconciler) handleAllowedSyscallsChanged(obj client.Object) []reconcile
 	reconcileRequests := []reconcile.Request{}
 	for i := range seccompProfileList.Items {
 		sp := &seccompProfileList.Items[i]
-		op := &OutputProfile{
-			DefaultAction:    sp.Spec.DefaultAction,
-			Architectures:    sp.Spec.Architectures,
-			ListenerPath:     sp.Spec.ListenerPath,
-			ListenerMetadata: sp.Spec.ListenerMetadata,
-			Flags:            sp.Spec.Flags,
-			Syscalls:         sp.Spec.Syscalls,
-		}
-		if err := allowProfile(op, spod.Spec.AllowedSyscalls, spod.Spec.AllowedSeccompActions); err != nil {
+		if err := allowProfile(sp, spod.Spec.AllowedSyscalls, spod.Spec.AllowedSeccompActions); err != nil {
 			r.log.Info(fmt.Sprintf("deleting not allowed seccomp profile %s/%s",
 				sp.GetNamespace(), sp.GetName()))
 			if err := r.client.Delete(ctx, sp, &client.DeleteOptions{}); err != nil {
@@ -285,30 +277,12 @@ func (r *Reconciler) Reconcile(ctx context.Context, req reconcile.Request) (reco
 	return r.reconcileSeccompProfile(ctx, seccompProfile, logger)
 }
 
-// OutputProfile represents the on-disk form of the SeccompProfile.
-type OutputProfile struct {
-	DefaultAction    seccomp.Action               `json:"defaultAction"`
-	Architectures    []seccompprofileapi.Arch     `json:"architectures,omitempty"`
-	ListenerPath     string                       `json:"listenerPath,omitempty"`
-	ListenerMetadata string                       `json:"listenerMetadata,omitempty"`
-	Syscalls         []*seccompprofileapi.Syscall `json:"syscalls,omitempty"`
-	Flags            []*seccompprofileapi.Flag    `json:"flags,omitempty"`
-}
-
 func (r *Reconciler) mergeBaseProfile(
 	ctx context.Context, sp *seccompprofileapi.SeccompProfile, l logr.Logger,
-) (OutputProfile, error) {
-	op := OutputProfile{
-		DefaultAction:    sp.Spec.DefaultAction,
-		Architectures:    sp.Spec.Architectures,
-		ListenerPath:     sp.Spec.ListenerPath,
-		ListenerMetadata: sp.Spec.ListenerMetadata,
-		Flags:            sp.Spec.Flags,
-	}
+) (*seccompprofileapi.SeccompProfile, error) {
 	baseProfileName := sp.Spec.BaseProfileName
 	if baseProfileName == "" {
-		op.Syscalls = sp.Spec.Syscalls
-		return op, nil
+		return sp, nil
 	}
 	baseProfile := &seccompprofileapi.SeccompProfile{}
 	if err := r.client.Get(
@@ -316,10 +290,10 @@ func (r *Reconciler) mergeBaseProfile(
 		l.Error(err, "cannot retrieve base profile "+baseProfileName)
 		r.metrics.IncSeccompProfileError(reasonInvalidSeccompProfile)
 		r.record.Event(sp, util.EventTypeWarning, reasonInvalidSeccompProfile, err.Error())
-		return op, fmt.Errorf("merging base profile: %w", err)
+		return nil, fmt.Errorf("merging base profile: %w", err)
 	}
-	op.Syscalls = util.UnionSyscalls(baseProfile.Spec.Syscalls, sp.Spec.Syscalls)
-	return op, nil
+	sp.Spec.Syscalls = util.UnionSyscalls(baseProfile.Spec.Syscalls, sp.Spec.Syscalls)
+	return sp, nil
 }
 
 func (r *Reconciler) reconcileSeccompProfile(
@@ -345,14 +319,14 @@ func (r *Reconciler) reconcileSeccompProfile(
 		return reconcile.Result{RequeueAfter: wait}, nil
 	}
 
-	if err := r.validateProfile(ctx, &outputProfile); err != nil {
+	if err := r.validateProfile(ctx, outputProfile); err != nil {
 		l.Error(err, "validate profile")
 		r.metrics.IncSeccompProfileError(reasonProfileNotAllowed)
 		r.record.Event(sp, util.EventTypeWarning, reasonProfileNotAllowed, err.Error())
 		return reconcile.Result{Requeue: false}, fmt.Errorf("validating profile: %w", err)
 	}
 
-	profileContent, err := json.Marshal(outputProfile)
+	profileContent, err := json.Marshal(outputProfile.Spec)
 	if err != nil {
 		l.Error(err, "cannot validate profile "+profileName)
 		r.metrics.IncSeccompProfileError(reasonInvalidSeccompProfile)
@@ -487,7 +461,7 @@ func (r *Reconciler) handleDeletion(sp *seccompprofileapi.SeccompProfile) error
 	return nil
 }
 
-func (r *Reconciler) validateProfile(ctx context.Context, profile *OutputProfile) error {
+func (r *Reconciler) validateProfile(ctx context.Context, profile *seccompprofileapi.SeccompProfile) error {
 	spod, err := common.GetSPOD(ctx, r.client)
 	if err != nil {
 		return fmt.Errorf("retrieving the SPOD configuration: %w", err)
@@ -515,9 +489,11 @@ func saveProfileOnDisk(fileName string, content []byte) (updated bool, err error
 	return true, nil
 }
 
-func allowProfile(profile *OutputProfile, allowedSyscalls []string, allowedActions []seccomp.Action) error {
+func allowProfile(
+	profile *seccompprofileapi.SeccompProfile, allowedSyscalls []string, allowedActions []seccomp.Action,
+) error {
 	syscalls := map[seccomp.Action]map[string]bool{}
-	for _, call := range profile.Syscalls {
+	for _, call := range profile.Spec.Syscalls {
 		if _, ok := syscalls[call.Action]; !ok {
 			syscalls[call.Action] = map[string]bool{}
 		}
@@ -542,7 +518,7 @@ func allowProfile(profile *OutputProfile, allowedSyscalls []string, allowedActio
 				}
 			}
 		}
-		if profile.DefaultAction == action && len(allowedSyscalls) > 0 {
+		if profile.Spec.DefaultAction == action && len(allowedSyscalls) > 0 {
 			return fmt.Errorf(errForbiddenProfile)
 		}
 	}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index be38cef97..582c09bb5 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -804,7 +804,7 @@ github.com/opencontainers/go-digest
 ## explicit; go 1.17
 github.com/opencontainers/image-spec/specs-go
 github.com/opencontainers/image-spec/specs-go/v1
-# github.com/opencontainers/runc v1.1.4
+# github.com/opencontainers/runc v1.1.5
 ## explicit; go 1.16
 github.com/opencontainers/runc/libcontainer/cgroups
 github.com/opencontainers/runc/libcontainer/configs


Test patch:
diff --git a/internal/pkg/daemon/seccompprofile/seccompprofile_test.go b/internal/pkg/daemon/seccompprofile/seccompprofile_test.go
index 5d03c6113..bcd4e1f37 100644
--- a/internal/pkg/daemon/seccompprofile/seccompprofile_test.go
+++ b/internal/pkg/daemon/seccompprofile/seccompprofile_test.go
@@ -278,25 +278,27 @@ func TestAllowProfile(t *testing.T) {
 		name                  string
 		allowedSyscalls       []string
 		allowedSeccompActions []seccomp.Action
-		profile               *OutputProfile
+		profile               *seccompprofileapi.SeccompProfile
 		want                  error
 	}{
 		{
 			name:                  "EmptyProfile",
 			allowedSyscalls:       []string{"a", "b", "c"},
 			allowedSeccompActions: []seccomp.Action{seccomp.ActAllow, seccomp.ActLog, seccomp.ActTrace},
-			profile:               &OutputProfile{},
+			profile:               &seccompprofileapi.SeccompProfile{},
 			want:                  nil,
 		},
 		{
 			name:                  "EmptyAllowedList",
 			allowedSyscalls:       []string{},
 			allowedSeccompActions: []seccomp.Action{},
-			profile: &OutputProfile{
-				Syscalls: []*seccompprofileapi.Syscall{
-					{
-						Action: seccomp.ActAllow,
-						Names:  []string{"a"},
+			profile: &seccompprofileapi.SeccompProfile{
+				Spec: seccompprofileapi.SeccompProfileSpec{
+					Syscalls: []*seccompprofileapi.Syscall{
+						{
+							Action: seccomp.ActAllow,
+							Names:  []string{"a"},
+						},
 					},
 				},
 			},
@@ -306,11 +308,13 @@ func TestAllowProfile(t *testing.T) {
 			name:                  "ProfileWithEmptySyscalls",
 			allowedSyscalls:       []string{"a", "b", "c"},
 			allowedSeccompActions: []seccomp.Action{seccomp.ActAllow, seccomp.ActLog, seccomp.ActTrace},
-			profile: &OutputProfile{
-				Syscalls: []*seccompprofileapi.Syscall{
-					{
-						Action: seccomp.ActAllow,
-						Names:  []string{},
+			profile: &seccompprofileapi.SeccompProfile{
+				Spec: seccompprofileapi.SeccompProfileSpec{
+					Syscalls: []*seccompprofileapi.Syscall{
+						{
+							Action: seccomp.ActAllow,
+							Names:  []string{},
+						},
 					},
 				},
 			},
@@ -320,11 +324,13 @@ func TestAllowProfile(t *testing.T) {
 			name:                  "AllowProfile",
 			allowedSyscalls:       []string{"a", "b", "c"},
 			allowedSeccompActions: []seccomp.Action{seccomp.ActAllow, seccomp.ActLog, seccomp.ActTrace},
-			profile: &OutputProfile{
-				Syscalls: []*seccompprofileapi.Syscall{
-					{
-						Action: seccomp.ActAllow,
-						Names:  []string{"b"},
+			profile: &seccompprofileapi.SeccompProfile{
+				Spec: seccompprofileapi.SeccompProfileSpec{
+					Syscalls: []*seccompprofileapi.Syscall{
+						{
+							Action: seccomp.ActAllow,
+							Names:  []string{"b"},
+						},
 					},
 				},
 			},
@@ -334,11 +340,13 @@ func TestAllowProfile(t *testing.T) {
 			name:                  "RejectProfile",
 			allowedSyscalls:       []string{"a", "b", "c"},
 			allowedSeccompActions: []seccomp.Action{seccomp.ActAllow, seccomp.ActLog, seccomp.ActTrace},
-			profile: &OutputProfile{
-				Syscalls: []*seccompprofileapi.Syscall{
-					{
-						Action: seccomp.ActAllow,
-						Names:  []string{"d"},
+			profile: &seccompprofileapi.SeccompProfile{
+				Spec: seccompprofileapi.SeccompProfileSpec{
+					Syscalls: []*seccompprofileapi.Syscall{
+						{
+							Action: seccomp.ActAllow,
+							Names:  []string{"d"},
+						},
 					},
 				},
 			},
@@ -348,19 +356,21 @@ func TestAllowProfile(t *testing.T) {
 			name:                  "AllAllowedActions",
 			allowedSyscalls:       []string{"a", "b", "c"},
 			allowedSeccompActions: []seccomp.Action{seccomp.ActAllow, seccomp.ActLog, seccomp.ActTrace},
-			profile: &OutputProfile{
-				Syscalls: []*seccompprofileapi.Syscall{
-					{
-						Action: seccomp.ActAllow,
-						Names:  []string{"a"},
-					},
-					{
-						Action: seccomp.ActLog,
-						Names:  []string{"b"},
-					},
-					{
-						Action: seccomp.ActTrace,
-						Names:  []string{"c"},
+			profile: &seccompprofileapi.SeccompProfile{
+				Spec: seccompprofileapi.SeccompProfileSpec{
+					Syscalls: []*seccompprofileapi.Syscall{
+						{
+							Action: seccomp.ActAllow,
+							Names:  []string{"a"},
+						},
+						{
+							Action: seccomp.ActLog,
+							Names:  []string{"b"},
+						},
+						{
+							Action: seccomp.ActTrace,
+							Names:  []string{"c"},
+						},
 					},
 				},
 			},
@@ -370,31 +380,33 @@ func TestAllowProfile(t *testing.T) {
 			name:                  "AllForbiddenActions",
 			allowedSyscalls:       []string{"a", "b", "c"},
 			allowedSeccompActions: []seccomp.Action{seccomp.ActAllow, seccomp.ActLog, seccomp.ActTrace},
-			profile: &OutputProfile{
-				Syscalls: []*seccompprofileapi.Syscall{
-					{
-						Action: seccomp.ActErrno,
-						Names:  []string{"a"},
-					},
-					{
-						Action: seccomp.ActTrap,
-						Names:  []string{"d"},
-					},
-					{
-						Action: seccomp.ActKillThread,
-						Names:  []string{"e"},
-					},
-					{
-						Action: seccomp.ActKillThread,
-						Names:  []string{"f"},
-					},
-					{
-						Action: seccomp.ActKillProcess,
-						Names:  []string{"g"},
-					},
-					{
-						Action: seccomp.ActKill,
-						Names:  []string{"b"},
+			profile: &seccompprofileapi.SeccompProfile{
+				Spec: seccompprofileapi.SeccompProfileSpec{
+					Syscalls: []*seccompprofileapi.Syscall{
+						{
+							Action: seccomp.ActErrno,
+							Names:  []string{"a"},
+						},
+						{
+							Action: seccomp.ActTrap,
+							Names:  []string{"d"},
+						},
+						{
+							Action: seccomp.ActKillThread,
+							Names:  []string{"e"},
+						},
+						{
+							Action: seccomp.ActKillThread,
+							Names:  []string{"f"},
+						},
+						{
+							Action: seccomp.ActKillProcess,
+							Names:  []string{"g"},
+						},
+						{
+							Action: seccomp.ActKill,
+							Names:  []string{"b"},
+						},
 					},
 				},
 			},
@@ -404,8 +416,10 @@ func TestAllowProfile(t *testing.T) {
 			name:                  "AllowedAll",
 			allowedSyscalls:       []string{"a"},
 			allowedSeccompActions: []seccomp.Action{seccomp.ActAllow, seccomp.ActLog, seccomp.ActTrace},
-			profile: &OutputProfile{
-				DefaultAction: seccomp.ActAllow,
+			profile: &seccompprofileapi.SeccompProfile{
+				Spec: seccompprofileapi.SeccompProfileSpec{
+					DefaultAction: seccomp.ActAllow,
+				},
 			},
 			want: fmt.Errorf(errForbiddenProfile),
 		},
@@ -413,8 +427,10 @@ func TestAllowProfile(t *testing.T) {
 			name:                  "DeniedAll",
 			allowedSyscalls:       []string{"a"},
 			allowedSeccompActions: []seccomp.Action{seccomp.ActAllow, seccomp.ActLog, seccomp.ActTrace},
-			profile: &OutputProfile{
-				DefaultAction: seccomp.ActErrno,
+			profile: &seccompprofileapi.SeccompProfile{
+				Spec: seccompprofileapi.SeccompProfileSpec{
+					DefaultAction: seccomp.ActErrno,
+				},
 			},
 			want: nil,
 		},
@@ -422,15 +438,17 @@ func TestAllowProfile(t *testing.T) {
 			name:                  "DeniedAction",
 			allowedSyscalls:       []string{"a", "b", "c"},
 			allowedSeccompActions: []seccomp.Action{seccomp.ActErrno},
-			profile: &OutputProfile{
-				Syscalls: []*seccompprofileapi.Syscall{
-					{
-						Action: seccomp.ActAllow,
-						Names:  []string{"a"},
-					},
-					{
-						Action: seccomp.ActTrace,
-						Names:  []string{"b"},
+			profile: &seccompprofileapi.SeccompProfile{
+				Spec: seccompprofileapi.SeccompProfileSpec{
+					Syscalls: []*seccompprofileapi.Syscall{
+						{
+							Action: seccomp.ActAllow,
+							Names:  []string{"a"},
+						},
+						{
+							Action: seccomp.ActTrace,
+							Names:  []string{"b"},
+						},
 					},
 				},
 			},
diff --git a/test/tc_default_profiles_test.go b/test/tc_default_profiles_test.go
index 630e13f3d..134d4c50d 100644
--- a/test/tc_default_profiles_test.go
+++ b/test/tc_default_profiles_test.go
@@ -25,7 +25,6 @@ import (
 	seccompprofileapi "sigs.k8s.io/security-profiles-operator/api/seccompprofile/v1beta1"
 	secprofnodestatusv1alpha1 "sigs.k8s.io/security-profiles-operator/api/secprofnodestatus/v1alpha1"
 	"sigs.k8s.io/security-profiles-operator/internal/pkg/config"
-	"sigs.k8s.io/security-profiles-operator/internal/pkg/daemon/seccompprofile"
 )
 
 func (e *e2e) testCaseDefaultAndExampleProfiles(nodes []string) {
@@ -96,10 +95,10 @@ func (e *e2e) verifyCRDProfileContent(node string, sp *seccompprofileapi.Seccomp
 	e.logf("Verifying %s profile on node %s", sp.Name, node)
 	profilePath := path.Join(e.nodeRootfsPrefix, sp.GetProfileOperatorPath())
 	catOutput := e.execNode(node, "cat", profilePath)
-	output := seccompprofile.OutputProfile{}
+	output := seccompprofileapi.SeccompProfileSpec{}
 	err := json.Unmarshal([]byte(catOutput), &output)
 	e.Nil(err)
-	expected := seccompprofile.OutputProfile{}
+	expected := seccompprofileapi.SeccompProfileSpec{}
 	spec, err := json.Marshal(sp.Spec)
 	e.Nil(err)
 	err = json.Unmarshal(spec, &expected)