fix(security): harden Dockerfile and example terraform#178
fix(security): harden Dockerfile and example terraform#178oto-macenauer-absa wants to merge 1 commit into
Conversation
WalkthroughThe ChangesContainer and Network Security Hardening
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| } | ||
|
|
||
| resource "aws_vpc_security_group_egress_rule" "allow_all_traffic_ipv4" { | ||
| # Example only — these terraform_examples are illustrative and not used for |
There was a problem hiding this comment.
Should this comment be updated? I mean, it looks like you added the CIDR block by yourself, or no ? If no, how it will be updated?
Resolves three Trivy/AquaSec findings.
Changes
app(uid/gid 1000) directly in/etc/passwd+/etc/group(base image has no shadow-utils),chowntask root + cert/artifact dirs, addUSER 1000.dnf clean all(AVD-DS-0019, [SEC:HIGH][FP=30e50fde] 'dnf clean all' missing #175): clear dnf cache +/var/cache/dnfin the build RUN cleanup step.0.0.0.0/0/-1egress with a dummy restricted CIDR/port and a comment. These are example-only files; production egress is governed by org-managed policies in the target (internal, non-SEN) AWS account.Release notes
app(wasroot)clear dnf cacheafter the packages are installedTesting
docker build --platform=linux/arm64succeeds (exit 0).uid=1000(app)(verified viaid).ssl_ca_bundle: /path/to/ca-bundle.pem+ redacted IdP URL), unrelated to these changes.Closes #173, #175, #177
Summary by CodeRabbit