| Property | Value |
|---|---|
| Severity | Warning |
| Category | Security |
| Default | Enabled |
Description
While it is common to pass secrets to running processes through environment variables during local development, setting secrets in a Dockerfile usingENV
or ARG is insecure because they persist in the final image. This rule reports
violations where ENV and ARG keys indicate that they contain sensitive data.
Instead of ARG or ENV, you should use secret mounts, which expose secrets
to your builds in a secure manner and do not persist in the final image or its
metadata.