diff --git a/app/tests/test_snyk_scm_refresh.py b/app/tests/test_snyk_scm_refresh.py index 323ab46..b4a051d 100644 --- a/app/tests/test_snyk_scm_refresh.py +++ b/app/tests/test_snyk_scm_refresh.py @@ -157,7 +157,9 @@ def test_passes_manifest_filter(): path_fail_2 = "/node_modules/some/package.json" path_pass_1 = "package.json" path_pass_2 = "requirements-test.txt" + path_fail_3 = "tests/vuln-in-git/Gemfile.lock" assert passes_manifest_filter(path_fail_1) == False assert passes_manifest_filter(path_pass_1) == True assert passes_manifest_filter(path_fail_2) == False assert passes_manifest_filter(path_pass_2) == True + assert passes_manifest_filter(path_fail_3) == False diff --git a/common.py b/common.py index 4203b67..18c1791 100644 --- a/common.py +++ b/common.py @@ -15,7 +15,7 @@ MANIFEST_PATTERN_CONTAINER = '^.*(Dockerfile)$' MANIFEST_PATTERN_IAC = '.*[.](yaml|yml|tf)$' MANIFEST_PATTERN_CODE = '.*[.](js|cs|php|java|py)$' -MANIFEST_PATTERN_EXCLUSIONS = '^.*(fixtures|\/tests\/|\/__tests__\/|\/test\/|__test__|[.].*ci\/|.*ci[.].yml|\/node_modules\/|\/bower_components\/|variables[.]tf|outputs[.]tf).*$' +MANIFEST_PATTERN_EXCLUSIONS = '^.*(fixtures|tests\/|__tests__|test\/|__test__|[.].*ci\/|.*ci[.].yml|node_modules\/|bower_components\/|variables[.]tf|outputs[.]tf).*$' GITHUB_ENABLED = False GITHUB_ENTERPRISE_ENABLED = False