awslabs / automated-security-helper

https://awslabs.github.io/automated-security-helper/
Apache License 2.0
372 stars 44 forks source link

fix(ash): Use .gitignore during archive expansion to ignore archives not included in the git index #44

Open scrthq opened 6 months ago

scrthq commented 6 months ago

When running ASH in a repository that includes archives already gitignored, those archives are unexpectedly expanded and scanned. This includes archives within 3rd party dependencies like node_modules and .venv directory trees.

ASH should treat these locations the same as it does during a scan and ignore them as candidates for expansion if the scan is being triggered from within a git repository.