Interactive Playground
Experiment with the vulnerable code and security rule below. Edit the code to see how the rule detects different vulnerability patterns.
pathfinder scan --ruleset docker/DOCKER-AUD-003 --project .About This Rule
Understanding the vulnerability and how it is detected
This rule detects EXPOSE instructions for ports below 1024 (privileged ports). On Unix-like systems, binding to ports 1-1023 traditionally requires root privileges, which conflicts with the security best practice of running containers as non-root users. While this rule is informational (sometimes privileged ports are intentional), it highlights a potential privilege escalation requirement.
How to Fix
Recommended remediation steps
- 1Never run containers in privileged mode in production
- 2Use specific Linux capabilities (cap_add) instead of full privileges
- 3Use seccomp profiles to restrict system calls
References
External resources and documentation
Similar Rules
Explore related security rules for Docker
Frequently Asked Questions
Common questions about Privileged Port Exposed
New feature
Get these findings posted directly on your GitHub pull requests
The Privileged Port Exposed rule runs in CI and posts inline review comments on the exact lines — no dashboard, no SARIF viewer.