Repository navigation
feat: add security-focused container image flavor - #86
Conversation
Add containers/Containerfile.security with Red Hat Hardened Images base, bundling code scanning, vulnerability detection, and supply chain security tools (trivy, gosec, semgrep, gitleaks, grype, cosign, etc.). Three-stage build: Go compile, tool download (UBI9), hardened runtime assembly. All tools version-pinned via ARGs. Runs as non-root (uid 65532) with writable cache dirs for trivy/grype. Add Makefile targets: image-security, image-security-push. Closes #85 Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Pavel Anni <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis pull request adds a security-focused container image variant to DocsClaw. A new ChangesSecurity-focused Container Image Flavor
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Address review findings: - Verify SHA256 checksums for all 7 downloaded tool binaries (trivy, gosec, gitleaks, trufflehog, grype, syft, cosign). Build fails if any checksum mismatches. - Pin semgrep==1.164.0 and bandit==1.9.4 for reproducible builds, matching the version-pinning pattern used for binary tools. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Pavel Anni <[email protected]>
Red Hat Hardened Images use :latest intentionally to receive continuous CVE fixes. Document this trade-off per review feedback (Kimi-2.6). Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Pavel Anni <[email protected]>
Summary
containers/Containerfile.security— a three-stage build using Red Hat Hardened Images that bundles 13 security tools (code scanning, secrets detection, vulnerability/SBOM analysis, supply chain verification)make image-securityandmake image-security-pushMakefile targetscontainers/directory for future image flavors (Specialized Dockerfiles for agent flavors (docs, media, data, presentations, content) #7)Tools included
Design decisions
%sysusersscriptlet that fails in the hardened runtime; a no-op stub is created before dnf and removed after:latestbase images: Intentional — Red Hat Hardened Images receive continuous CVE fixes; pinning digests would freeze those updates. Trade-off documented in Containerfile.Test plan
podman -c rhel build--entrypoint sh)Follow-up
Closes #85
Summary by CodeRabbit
New Features
Chores