Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trivy client server mode not scanning secrets exposed in image, Trivy standalone works #6742

Open
chen-keinan opened this issue May 22, 2024 · 0 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/backlog Higher priority than priority/awaiting-more-evidence. target/container-image Issues relating to container image scanning

Comments

@chen-keinan
Copy link
Contributor

chen-keinan commented May 22, 2024

when scanning image for secret (in config) in standalone mode, I do get secret finding, for example:

trivy image gsingh737/nginxwithsecret:v1 --image-config-scanners secret --scanners secret

2024-05-22T08:50:16+03:00	INFO	Container image config scanners	scanners=[secret]
2024-05-22T08:50:16+03:00	INFO	Secret scanning is enabled
2024-05-22T08:50:16+03:00	INFO	If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-05-22T08:50:16+03:00	INFO	Please see also https://aquasecurity.github.io/trivy/v0.51/docs/scanner/secret/#recommendation for faster secret detection

gsingh737/nginxwithsecret:v1 (secrets)

Total: 2 (UNKNOWN: 0, LOW: 0, MEDIUM: 0, HIGH: 0, CRITICAL: 2)

CRITICAL: AWS (aws-secret-access-key)
═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
AWS Secret Access Key
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 gsingh737/nginxwithsecret:v1:132
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 130     "NJS_VERSION=0.8.2",
 131     "PKG_RELEASE=1~bookworm",
 132 [   "AWS_SECRET_ACCESS_KEY=****************************************"
 133     ],
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────


CRITICAL: AWS (aws-secret-access-key)
═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
AWS Secret Access Key
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 gsingh737/nginxwithsecret:v1:94
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  92     {
  93     "created": "2023-10-24T22:44:45Z",
  94 [   "created_by": "ENV AWS_SECRET_ACCESS_KEY=****************************************",
  95     "comment": "buildkit.dockerfile.v0",
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

however whenrunning same in client/server mode no results appear, example:

trivy image gsingh737/nginxwithsecret:v1 --image-config-scanners secret --scanners secret --server http://0.0.0.0:8081

2024-05-22T09:17:53+03:00	INFO	Container image config scanners	scanners=[secret]
2024-05-22T09:17:53+03:00	INFO	Secret scanning is enabled
2024-05-22T09:17:53+03:00	INFO	If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-05-22T09:17:53+03:00	INFO	Please see also https://aquasecurity.github.io/trivy/v0.51/docs/scanner/secret/#recommendation for faster secret detection
@chen-keinan chen-keinan added priority/backlog Higher priority than priority/awaiting-more-evidence. target/container-image Issues relating to container image scanning kind/bug Categorizes issue or PR as related to a bug. labels May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/backlog Higher priority than priority/awaiting-more-evidence. target/container-image Issues relating to container image scanning
Projects
None yet
Development

No branches or pull requests

1 participant