Rule Information
Tags
dockerdockerfileportexposevalidationinput-validationcorrectnessnetworkingconfiguration
CWE References
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-COR-002 --project .Understanding the vulnerability and how it is detected
Detects EXPOSE instructions with invalid port numbers. Valid ports are 1-65535.
Recommended remediation steps
Explore related security rules for Docker
Common questions about Invalid Port Number
New feature
The Invalid Port Number rule runs in CI and posts inline review comments on the exact lines — no dashboard, no SARIF viewer.