parse: honor containers.conf seccomp_profile#6908
Open
jiwahn wants to merge 1 commit into
Open
Conversation
Fixes: podman-container-tools#6498 Signed-off-by: Jiwoo Ahn <ikwydls1314@gmail.com>
nalind
reviewed
Jun 15, 2026
nalind
left a comment
Contributor
There was a problem hiding this comment.
Generally looks good, one nit, nothing dramatic.
| func TestCommonBuildOptionsSeccompFromConfig(t *testing.T) { | ||
| configPath := filepath.Join(t.TempDir(), "containers.conf") | ||
| originalConfig, configWasSet := os.LookupEnv("CONTAINERS_CONF") | ||
| require.NoError(t, os.Setenv("CONTAINERS_CONF", configPath)) |
Contributor
There was a problem hiding this comment.
Calling t.Setenv("CONTAINERS_CONF", configPath) would probably narrow the cleanup block down to the config.Reload() call.
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 bug
What this PR does / why we need it:
Buildah was already loading
containers.conf, but it was not applying theSeccompProfilefield toCommonBuildOptions. This patch wires that field into the existing security opt parsing path. If the user explicitly provides a CLI seccomp option, CLI values take precedence.How to verify it
go test ./pkg/parseI added a config parsing test that verifies:
Which issue(s) this PR fixes:
Fixes: #6498
Special notes for your reviewer:
Does this PR introduce a user-facing change?