Fix problem that we write warning every each binary file larger than 10MB.
Before:
➜ ./trivy fs --scanners secret ./trivy
2024-07-09T12:19:09+06:00 INFO Secret scanning is enabled
2024-07-09T12:19:09+06:00 INFO If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-07-09T12:19:09+06:00 INFO Please see also https://aquasecurity.github.io/trivy/dev/docs/scanner/secret#recommendation for faster secret detection
2024-07-09T12:19:09+06:00 WARN [secret] The size of the scanned file is too large. It is recommended to use `--skip-files` for this file to avoid high memory consumption. file_path="trivy" size (MB)=240
After:
➜ ./trivy fs --scanners secret ./trivy
2024-07-09T12:21:13+06:00 INFO Secret scanning is enabled
2024-07-09T12:21:13+06:00 INFO If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-07-09T12:21:13+06:00 INFO Please see also https://aquasecurity.github.io/trivy/dev/docs/scanner/secret#recommendation for faster secret detection
Description
Fix problem that we write warning every each binary file larger than 10MB.
Before:
After:
Checklist