Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spoc: only include abstract policy in recorded apparmor profiles #2428

Merged
merged 1 commit into from
Sep 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions internal/pkg/cli/recorder/recorder.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,16 +401,6 @@ func (r *Recorder) buildProfileCRD(writer io.Writer, spec *seccompprofileapi.Sec
}

func (r *Recorder) buildAppArmorProfileCRD(writer io.Writer, spec *apparmorprofileapi.AppArmorProfileSpec) error {
programName, err := filepath.Abs(r.options.commandOptions.Command())
if err != nil {
return fmt.Errorf("get program name: %w", err)
}
// Raw apparmor profile is expected in the required policy field.
policy, err := crd2armor.GenerateProfile(programName, &spec.Abstract)
if err != nil {
return fmt.Errorf("generating raw apparmor profile: %w", err)
}
spec.Policy = policy
profile := &apparmorprofileapi.AppArmorProfile{
TypeMeta: metav1.TypeMeta{
Kind: "AppArmorProfile",
Expand Down
Loading