Docker Secrets and Security Best Practices
Description
Detects hardcoded secrets in ENV/ARG and piping curl/wget to shell.
What Shoulder detects
How to fix
Use BuildKit secrets instead of hardcoding credentials.
```dockerfile
RUN --mount=type=secret,id=token \
cat /run/secrets/token
```
Learn more: https://shoulder.dev/learn/docker/cwe-798/secrets-security
Applies to
Languages
Frameworks
docker
References
Scan for this issue
Detect with Shoulder CLI
npx @shoulderdev/cli trust --rule=docker-secrets-security .