Find containers running as root
Apache 2.0Finds containers that run as root user (CIS Docker Benchmark 4.1). This includes explicit USER root or USER 0 instructions, and optionally containers with no USER instruction in the final stage (which default to root).
org. openrewrite. docker. search. FindRootUserOptional
includeMissingUserBoolean
When true, also marks the final stage if no USER instruction is present (defaults to root). When false, only marks explicit USER root/0 instructions.
mod run . --recipe= org. openrewrite. docker. search. FindRootUserInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.