seccomp: reject --security-opt seccomp=profile when support is unavailable - #6960
Merged
TomSweeneyRedHat merged 1 commit intoJul 14, 2026
Conversation
Signed-off-by: Leonardo Moreira <leonardo.moreira.coutinho@gmail.com>
nalind
approved these changes
Jul 13, 2026
nalind
left a comment
Contributor
There was a problem hiding this comment.
This looks reasonable to me, since we're validating values passed at the command line and not hardwired library defaults.
LGTM, thanks!
| case "seccomp": | ||
| if !supportsSeccomp && con[1] != "unconfined" { | ||
| return fmt.Errorf("seccomp profile %q requested, but seccomp support is not enabled in this build", con[1]) | ||
| } |
Contributor
There was a problem hiding this comment.
It would be nice to have "unconfined" defined in a variable somewhere, but ¯_(ツ)_/¯
Contributor
|
LGTM |
Contributor
|
/lgtm |
TomSweeneyRedHat
merged commit Jul 14, 2026
a1c3b90
into
podman-container-tools:main
44 of 46 checks passed
Contributor
|
Oh, and thanks! @leonardomoreira00 ! |
| case "apparmor": | ||
| commonOpts.ApparmorProfile = con[1] | ||
| case "seccomp": | ||
| if !supportsSeccomp && con[1] != "unconfined" { |
Member
There was a problem hiding this comment.
From podman-container-tools/podman#29337: this check results in podman-remote build --security-opt seccomp=... erroring out because it's built without seccomp support despite the server having it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
/kind other
What this PR does / why we need it:
Ensures that Buildah doesn't silently ignore the explicitly specified seccomp policies when the software was built without the seccomp support.
How to verify it
See:
Which issue(s) this PR fixes:
Fixes #6959
Special notes for your reviewer:
Let me know if this implementation fits the core idea.
I had a look in the existing implementation and tried to adapt my solution.
There is no problem if this isn't considered something that needs fixing.
Does this PR introduce a user-facing change?