Skip to content

Harden Kubernetes IaC for vote, worker, result (Sysdig Best Practices) #411

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

Open
wants to merge 73 commits into
base: main
Choose a base branch
from

Conversation

higakikeita
Copy link

This pull request applies security best practices to the Kubernetes deployment manifests for the vote, worker, and result components of the example-voting-app.

These changes are part of the Sysdig Technical Assessment – Phase A/B and are informed by the IaC scanning results via sysdig-cli-scanner.

✅ Improvements made:

  • Set runAsNonRoot: true and dropped all capabilities
  • Enabled readOnlyRootFilesystem for all containers
  • Added resources.limits and resources.requests for CPU and memory
  • Introduced runAsUser, runAsGroup, and fsGroup to improve security context isolation

🛡️ Benefit:

These changes reduce container privileges and follow the Sysdig Best Practices for Kubernetes workloads. As a result, future IaC scans are expected to PASS or show reduced high-risk controls.


Tested with:

  • sysdig-cli-scanner v1.22.3 (Docker) + v1.23.x (IaC)
  • GitHub Actions (see workflow .github/workflows/sysdig-scan.yml)

Let me know if further adjustments are needed. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant