image secret scanning does not adhere to global allow rules from secrets config file #4100
Labels
scan/secret
Issues relating to secret scanning
triage/support
Indicates an issue that is a support question.
Description
The scan matching of
fsvsimagesecret scanning is different.fscorrectly allows paths to be ignored,imagefails to use the same allow rules.What did you expect to happen?
I expected the results of scanning a filesystem for secrets to be the same as scanning an image layer for secrets.
What happened instead?
The
imagescan fails to adhere to the allow rules.Output of run with
--debug:With the filesystem:
Where the
key.pemfile is a secret generated withopenssl genrsa -des3 -passout pass:x -out key.pem 2048.And the secrets config file:
When I run the version
fslocally:But when I build a docker image using this Dockerfile:
This creates an image (
example:local) with the/key.pemfile that triggers as a secret.When I run the
imagescan using the same ignores file:The allow rules have not been applied.
Output of
trivy -v:Additional details (base image name, container registry info...):
https://github.com/aquasecurity/trivy/blob/main/pkg/scanner/local/scan.go#L163
This appears to be normalised after the allow rules have been used.
The text was updated successfully, but these errors were encountered: