Skip to content

Use the "runtime default" seccomp profile #3629

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

Merged
merged 1 commit into from
Mar 14, 2023

Conversation

sigv
Copy link
Contributor

@sigv sigv commented Mar 9, 2023

Proposed changes

seccomp profiles allow sandboxing processes, in particular to restrict allowed syscalls from applications to the kernel. Kubernetes default in current release is Unconfined seccomp profile, which is essentially privileged. It is preferred for security purposes to restrict this.

KEP-2413 proposes that RuntimeDefault will become the new default for Kubernetes. With Kubernetes v1.25, this is in Beta, and available with SeccompDefault feature gate and --seccomp-default CLI flag.

nginx-ingress should switch to this new default, in order to ensure compatibility down the line, as well as enable enhanced security on older Kubernetes versions.

This improves on #3544 as reported by @blurpy.

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

@sigv sigv requested a review from a team as a code owner March 9, 2023 10:07
@github-actions github-actions bot added the helm_chart Pull requests that update the Helm Chart label Mar 9, 2023
@sigv sigv force-pushed the runtime-default-seccomp-profile branch from e3d2428 to 41795ce Compare March 9, 2023 18:45
@codecov-commenter
Copy link

codecov-commenter commented Mar 9, 2023

Codecov Report

Merging #3629 (dee411a) into main (388b730) will increase coverage by 0.02%.
The diff coverage is n/a.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main    #3629      +/-   ##
==========================================
+ Coverage   52.21%   52.23%   +0.02%     
==========================================
  Files          59       59              
  Lines       16877    16877              
==========================================
+ Hits         8812     8816       +4     
+ Misses       7768     7766       -2     
+ Partials      297      295       -2     

see 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@sigv sigv force-pushed the runtime-default-seccomp-profile branch 2 times, most recently from 62f1e1d to 23d3df0 Compare March 10, 2023 14:24
@sigv sigv force-pushed the runtime-default-seccomp-profile branch 3 times, most recently from 04131cc to 0ad9840 Compare March 14, 2023 03:44
@sigv sigv force-pushed the runtime-default-seccomp-profile branch from 0ad9840 to 7213349 Compare March 14, 2023 08:47
seccomp profiles allow sandboxing processes, in particular to restrict
allowed syscalls from applications to the kernel. Kubernetes default in
current release is Unconfined seccomp profile, which is essentially
privileged. It is preferred for security purposes to restrict this.

KEP-2413 proposes that RuntimeDefault will become the new default for
Kubernetes. With Kubernetes v1.25, this is in Beta, and available with
`SeccompDefault` feature gate and `--seccomp-default` CLI flag.

`nginx-ingress` should switch to this new default, in order to ensure
compatibility down the line, as well as enable enhanced security on
older Kubernetes versions.

Co-authored-by: Christian Ihle <blurpy@users.noreply.github.com>
@sigv sigv force-pushed the runtime-default-seccomp-profile branch from 7213349 to dee411a Compare March 14, 2023 18:01
@lucacome lucacome self-assigned this Mar 14, 2023
@lucacome lucacome added the enhancement Pull requests for new features/feature enhancements label Mar 14, 2023
@lucacome lucacome added this to the v3.1.0 milestone Mar 14, 2023
@lucacome lucacome merged commit f16d851 into nginx:main Mar 14, 2023
@sigv sigv deleted the runtime-default-seccomp-profile branch March 15, 2023 09:36
@jasonwilliams14
Copy link
Contributor

@sigv This looks good. Tested the PR against edge with success!
🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Pull requests for new features/feature enhancements helm_chart Pull requests that update the Helm Chart
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants