Skip to content

chore(tests): add Kubernetes security requirements#851

Merged
RealAnna merged 40 commits intomainfrom
chore/add-security
Mar 18, 2026
Merged

chore(tests): add Kubernetes security requirements#851
RealAnna merged 40 commits intomainfrom
chore/add-security

Conversation

@RealAnna
Copy link
Contributor

@RealAnna RealAnna commented Feb 23, 2026

All tests use the following container security settings:

  • Capabilities.Drop: ALL
  • ReadOnlyRootFilesystem: true
  • AllowPrivilegeEscalation: false
  • RunAsNonRoot: true
  • RunAsUser: 10001
  • RunAsGroup: 10001
  • Privileged: false
  • SeccompProfile.Type: runtimeDefault

Updates helm deployment

Add Check Yaml action

To add an exempt test you can match namespace and add a separate rule like I have done for hostmetrics


  # Exempt all matching resources in this namespace
      exclude:
        resources:
          namespaces:
            - e2ehostmetrics

@RealAnna RealAnna added the Skip Changelog No changelog entry is needed label Feb 23, 2026
@RealAnna RealAnna marked this pull request as ready for review February 24, 2026 07:36
@RealAnna RealAnna requested a review from a team as a code owner February 24, 2026 07:36
@RealAnna RealAnna force-pushed the chore/add-security branch 2 times, most recently from 9e5cd84 to a7926dc Compare February 24, 2026 07:37
@RealAnna RealAnna marked this pull request as draft February 24, 2026 09:37
@RealAnna RealAnna marked this pull request as ready for review February 25, 2026 07:02
@RealAnna RealAnna force-pushed the chore/add-security branch 2 times, most recently from 127414d to a8b64ae Compare March 2, 2026 07:40
@RealAnna RealAnna requested review from mowies and odubajDT March 2, 2026 08:06
Copy link
Contributor

@evan-bradley evan-bradley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, wouldn't have thought to use Kyverno here.

@RealAnna RealAnna force-pushed the chore/add-security branch from 8b9083a to e7de191 Compare March 5, 2026 10:29
@RealAnna RealAnna requested a review from evan-bradley March 5, 2026 11:22
@RealAnna RealAnna force-pushed the chore/add-security branch from 0a398a2 to 8b9aef9 Compare March 11, 2026 06:51
Copy link
Contributor

@evan-bradley evan-bradley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good to me.

Not looking to hold this up longer than necessary, so I'm approving it, but I think we could achieve the same thing using the Go stdlib template module and cut out the extra dependency.

RealAnna and others added 27 commits March 18, 2026 09:33
Co-authored-by: Moritz Wiesinger <6901203+mowies@users.noreply.github.com>
# Conflicts:
#	internal/tools/go.mod
#	internal/tools/go.sum

# Conflicts:
#	internal/tools/go.mod
#	internal/tools/go.sum
Co-authored-by: Moritz Wiesinger <6901203+mowies@users.noreply.github.com>
Co-authored-by: odubajDT <93584209+odubajDT@users.noreply.github.com>
Co-authored-by: odubajDT <93584209+odubajDT@users.noreply.github.com>
Co-authored-by: Moritz Wiesinger <6901203+mowies@users.noreply.github.com>
Co-authored-by: Moritz Wiesinger <6901203+mowies@users.noreply.github.com>
@RealAnna RealAnna force-pushed the chore/add-security branch from ab89cd7 to eeb62d9 Compare March 18, 2026 08:45
@RealAnna RealAnna merged commit 4fbd402 into main Mar 18, 2026
41 checks passed
@RealAnna RealAnna deleted the chore/add-security branch March 18, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Skip Changelog No changelog entry is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants