Skip to content

Commit

Permalink
revert github namespace selection + add more trigger conditions (#358)
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Goodman <[email protected]>
  • Loading branch information
wagoodman authored Oct 24, 2023
1 parent bedd42b commit 12893d3
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 15 deletions.
5 changes: 5 additions & 0 deletions tests/quality/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ tests:
# we need to convert GHSAs to CVEs so that we can filter based on date
- name: nvd
use_cache: true
# note: the base images for most of the github test images are alpine and we are including the NVD namespace.
- name: alpine
use_cache: true
- name: wolfi
use_cache: true
images:
- docker.io/anchore/test_images:java-56d52bc@sha256:10008791acbc5866de04108746a02a0c4029ce3a4400a9b3dad45d7f2245f9da
- docker.io/anchore/test_images:npm-56d52bc@sha256:ba42ded8613fc643d407a050faf5ab48cfb405ad3ef2015bf6feeb5dff44738d
Expand Down
39 changes: 25 additions & 14 deletions tests/quality/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,24 +333,35 @@ def select_providers(cfg: Config, output_json: bool):
changed_files = changes()

selected_providers = set()
for test in cfg.tests:
if not test.provider:
continue

search_globs = [f"src/vunnel/providers/{test.provider}/**"]
# look for gate changes, if any, then run all providers
gate_globs = ["tests/quality/*.py", "tests/quality/*.yaml", "tests/quality/vulnerability-match-labels/**"]

for search_glob in gate_globs:
for changed_file in changed_files:
if fnmatch.fnmatch(changed_file, search_glob):
selected_providers = {test.provider for test in cfg.tests}

if not selected_providers:
# there are no gate changes, so look for provider-specific changes
for test in cfg.tests:
if not test.provider:
continue

search_globs = [f"src/vunnel/providers/{test.provider}/**"]

for additional_provider in test.additional_providers:
search_globs.append(f"src/vunnel/providers/{additional_provider.name}/**")
for additional_provider in test.additional_providers:
search_globs.append(f"src/vunnel/providers/{additional_provider.name}/**")

for g in test.additional_trigger_globs:
search_globs.append(g)
for g in test.additional_trigger_globs:
search_globs.append(g)

for search_glob in search_globs:
for changed_file in changed_files:
if fnmatch.fnmatch(changed_file, search_glob):
logging.debug(f"provider {test.provider} is affected by file change {changed_file}")
selected_providers.add(test.provider)
break
for search_glob in search_globs:
for changed_file in changed_files:
if fnmatch.fnmatch(changed_file, search_glob):
logging.debug(f"provider {test.provider} is affected by file change {changed_file}")
selected_providers.add(test.provider)
break

sorted_providers = sorted(selected_providers)

Expand Down
2 changes: 1 addition & 1 deletion tests/quality/vulnerability-match-labels
Submodule vulnerability-match-labels updated 88 files
+1 −0 ...:7536ee345532f674ec9e448e3768db4e546c48220ba2b6ec9bc9cfbfb3b7b74a/235af1d6-8e15-4a86-82ed-cc7e86be47e7.json
+1 −0 ...:7536ee345532f674ec9e448e3768db4e546c48220ba2b6ec9bc9cfbfb3b7b74a/3f670fa6-b2de-43cc-9ce7-709d7bd622a9.json
+1 −0 ...:7536ee345532f674ec9e448e3768db4e546c48220ba2b6ec9bc9cfbfb3b7b74a/44845f72-4920-42c8-b4bd-a4d08aabff3c.json
+1 −0 ...:7536ee345532f674ec9e448e3768db4e546c48220ba2b6ec9bc9cfbfb3b7b74a/76fa377d-9486-4600-af3e-024412395003.json
+1 −0 ...:7536ee345532f674ec9e448e3768db4e546c48220ba2b6ec9bc9cfbfb3b7b74a/846f128e-dd39-4676-a513-f1ee726484af.json
+1 −0 ...:7536ee345532f674ec9e448e3768db4e546c48220ba2b6ec9bc9cfbfb3b7b74a/ab506bd9-c6f7-44ff-94c7-1d3740a17978.json
+1 −0 ...:7536ee345532f674ec9e448e3768db4e546c48220ba2b6ec9bc9cfbfb3b7b74a/df120cc5-abf6-4704-8223-4b96b95d0a8a.json
+1 −0 ...:cf742eca189b02902a0a7926ac3fbb423e799937bf4358b0d2acc6cc36ab82aa/13e5f7db-6675-4e94-8cef-25ecc9049204.json
+1 −0 ...:cf742eca189b02902a0a7926ac3fbb423e799937bf4358b0d2acc6cc36ab82aa/14b78570-127d-4a2c-916b-f08345d1eb26.json
+1 −0 ...:cf742eca189b02902a0a7926ac3fbb423e799937bf4358b0d2acc6cc36ab82aa/1a738113-159a-43f5-9129-a1a7c8238dc8.json
+1 −0 ...:cf742eca189b02902a0a7926ac3fbb423e799937bf4358b0d2acc6cc36ab82aa/2c223457-a0cc-492f-b01c-41aa537ed825.json
+1 −0 ...:cf742eca189b02902a0a7926ac3fbb423e799937bf4358b0d2acc6cc36ab82aa/5b7546e5-b159-4d57-9487-6328bd645f2f.json
+1 −0 ...:cf742eca189b02902a0a7926ac3fbb423e799937bf4358b0d2acc6cc36ab82aa/631c7687-22e8-4b2d-979e-8da3f3f3e8c4.json
+1 −0 ...:cf742eca189b02902a0a7926ac3fbb423e799937bf4358b0d2acc6cc36ab82aa/8e8a6aed-93f9-448e-adef-78ed282837e7.json
+1 −0 ...:cf742eca189b02902a0a7926ac3fbb423e799937bf4358b0d2acc6cc36ab82aa/91b651a4-7fdf-4919-aeaa-8e302a73ee06.json
+1 −0 ...:cf742eca189b02902a0a7926ac3fbb423e799937bf4358b0d2acc6cc36ab82aa/9d2b7f77-4232-44b3-9dc3-812a65087842.json
+1 −0 ...:cf742eca189b02902a0a7926ac3fbb423e799937bf4358b0d2acc6cc36ab82aa/b69d38cd-5267-48e4-835d-ce67f50a344c.json
+1 −0 ...:cf742eca189b02902a0a7926ac3fbb423e799937bf4358b0d2acc6cc36ab82aa/d1446008-1d1e-431b-a232-3d82eea8be3f.json
+1 −0 ...:d1819e59e89e8ea90073460acb4ebb2ee18ccead9fa880dae91e8fc61b19ca1c/07c1794a-5b93-43aa-bb78-0d3de9446bcf.json
+1 −0 ...:d1819e59e89e8ea90073460acb4ebb2ee18ccead9fa880dae91e8fc61b19ca1c/14941755-ef97-41c5-b100-0dc31520dd99.json
+1 −0 ...:d1819e59e89e8ea90073460acb4ebb2ee18ccead9fa880dae91e8fc61b19ca1c/1b50d3c2-4da1-4318-ba0b-f4b58acfef7b.json
+1 −0 ...:d1819e59e89e8ea90073460acb4ebb2ee18ccead9fa880dae91e8fc61b19ca1c/33a31e83-273a-4c9d-ba06-d25834b03706.json
+1 −0 ...:d1819e59e89e8ea90073460acb4ebb2ee18ccead9fa880dae91e8fc61b19ca1c/7519189b-57f7-490d-98a8-1fe11e647c18.json
+1 −0 ...:d1819e59e89e8ea90073460acb4ebb2ee18ccead9fa880dae91e8fc61b19ca1c/ad59e62b-4e99-4e7e-957f-bf6bd5431dde.json
+1 −0 ...:d1819e59e89e8ea90073460acb4ebb2ee18ccead9fa880dae91e8fc61b19ca1c/c35f22a9-937c-40af-84e2-a9eef568f74b.json
+1 −0 ...:d1819e59e89e8ea90073460acb4ebb2ee18ccead9fa880dae91e8fc61b19ca1c/c5db3a24-7d4b-4ec0-8504-8b761794f7e7.json
+1 −0 ...:d1819e59e89e8ea90073460acb4ebb2ee18ccead9fa880dae91e8fc61b19ca1c/f9217c4d-5c4a-4878-a131-891203e6b584.json
+1 −0 ...:d48f0546b4cf5ef4626136242ce302f94a42751156b7be42f4b1b75a66608880/0060747f-0808-4863-a985-d9d0cc12a500.json
+1 −0 ...:d48f0546b4cf5ef4626136242ce302f94a42751156b7be42f4b1b75a66608880/035ed740-6e7c-4248-98d4-6f7f8847f4bd.json
+1 −0 ...:d48f0546b4cf5ef4626136242ce302f94a42751156b7be42f4b1b75a66608880/062631a2-e7ae-4c43-8b3f-43af99081e8d.json
+1 −0 ...:d48f0546b4cf5ef4626136242ce302f94a42751156b7be42f4b1b75a66608880/0d9e295f-8789-4121-9cad-3aeebd08a7f0.json
+1 −0 ...:d48f0546b4cf5ef4626136242ce302f94a42751156b7be42f4b1b75a66608880/1456b137-becc-4db4-8280-10ab304c9f25.json
+1 −0 ...:d48f0546b4cf5ef4626136242ce302f94a42751156b7be42f4b1b75a66608880/151ecf88-0586-41f2-aaf7-1fcd2802f21c.json
+1 −0 ...:d48f0546b4cf5ef4626136242ce302f94a42751156b7be42f4b1b75a66608880/276e9bf5-8c1c-43bb-be6f-694fe77f6227.json
+1 −0 ...:d48f0546b4cf5ef4626136242ce302f94a42751156b7be42f4b1b75a66608880/33e34cc8-cc6d-48d1-9594-778a01e04543.json
+1 −0 ...:d48f0546b4cf5ef4626136242ce302f94a42751156b7be42f4b1b75a66608880/37735f5a-b1f4-4931-8eb5-6abd884907b9.json
+1 −0 ...:d48f0546b4cf5ef4626136242ce302f94a42751156b7be42f4b1b75a66608880/3a8a4ec0-71dc-465b-bb3e-d9d9f86e4bf6.json
+1 −0 ...:d48f0546b4cf5ef4626136242ce302f94a42751156b7be42f4b1b75a66608880/5965db4e-8c0a-4b8e-9ef0-73ab4d67509a.json
+1 −0 ...:d48f0546b4cf5ef4626136242ce302f94a42751156b7be42f4b1b75a66608880/7d76c7a9-3f41-4d75-9234-ebc726f67e84.json
+1 −0 ...:d48f0546b4cf5ef4626136242ce302f94a42751156b7be42f4b1b75a66608880/8d196e08-80df-45c0-9c1b-632cc6266eea.json
+1 −0 ...:d48f0546b4cf5ef4626136242ce302f94a42751156b7be42f4b1b75a66608880/9dd56212-a39a-4816-8743-49df98e32a21.json
+1 −0 ...:d48f0546b4cf5ef4626136242ce302f94a42751156b7be42f4b1b75a66608880/d73fe185-48f6-4fdd-9202-8a5295dc2177.json
+1 −0 ...:d48f0546b4cf5ef4626136242ce302f94a42751156b7be42f4b1b75a66608880/fea42223-4701-4fc3-8992-5fe8b092b992.json
+1 −0 ...:d48f0546b4cf5ef4626136242ce302f94a42751156b7be42f4b1b75a66608880/fffee64f-cf35-40b8-9fdc-c2e50358df86.json
+1 −0 ...:4c564f473d38f23da1caa48c4ef53b958ef03d279232007ad3319b1f38584bdb/18de2729-a278-4ebc-9208-e89d5a35d880.json
+1 −0 ...:4c564f473d38f23da1caa48c4ef53b958ef03d279232007ad3319b1f38584bdb/247ff71c-ddb2-42d6-a88f-5dc1921ee913.json
+1 −0 ...:4c564f473d38f23da1caa48c4ef53b958ef03d279232007ad3319b1f38584bdb/285b2631-b136-4964-853a-1cd5fc64b1ce.json
+1 −0 ...:4c564f473d38f23da1caa48c4ef53b958ef03d279232007ad3319b1f38584bdb/2b9f722e-27da-4204-88b5-bb11fd800cf9.json
+1 −0 ...:4c564f473d38f23da1caa48c4ef53b958ef03d279232007ad3319b1f38584bdb/4d451153-9fda-4e28-ae0b-830c4deec3a7.json
+1 −0 ...:4c564f473d38f23da1caa48c4ef53b958ef03d279232007ad3319b1f38584bdb/54bb6d61-244e-4e6f-a576-4ad16e75b9d4.json
+1 −0 ...:4c564f473d38f23da1caa48c4ef53b958ef03d279232007ad3319b1f38584bdb/5507485c-fc19-4aad-a504-1f2bab5bffde.json
+1 −0 ...:4c564f473d38f23da1caa48c4ef53b958ef03d279232007ad3319b1f38584bdb/5617e288-b444-49f3-9182-be157e87df6f.json
+1 −0 ...:4c564f473d38f23da1caa48c4ef53b958ef03d279232007ad3319b1f38584bdb/6c3aca26-4bf6-4059-96bf-68ee6a146001.json
+1 −0 ...:4c564f473d38f23da1caa48c4ef53b958ef03d279232007ad3319b1f38584bdb/7253ff82-900e-4bfd-8915-a99a174c4576.json
+1 −0 ...:4c564f473d38f23da1caa48c4ef53b958ef03d279232007ad3319b1f38584bdb/74880128-dcd8-4683-90ca-a9cad8022eaf.json
+1 −0 ...:4c564f473d38f23da1caa48c4ef53b958ef03d279232007ad3319b1f38584bdb/768bb56c-b76d-4a15-a59d-6a2535b4f82f.json
+1 −0 ...:4c564f473d38f23da1caa48c4ef53b958ef03d279232007ad3319b1f38584bdb/80ea7ebb-351c-4e1e-8674-6223605494b9.json
+1 −0 ...:4c564f473d38f23da1caa48c4ef53b958ef03d279232007ad3319b1f38584bdb/811d21e3-44b9-4c01-9204-d78593f0d428.json
+1 −0 ...:4c564f473d38f23da1caa48c4ef53b958ef03d279232007ad3319b1f38584bdb/822217f7-0bce-4180-9bf3-0362f702f5d1.json
+1 −0 ...:4c564f473d38f23da1caa48c4ef53b958ef03d279232007ad3319b1f38584bdb/8453c61d-98de-4ce5-8d66-4a5f9268b975.json
+1 −0 ...:4c564f473d38f23da1caa48c4ef53b958ef03d279232007ad3319b1f38584bdb/8a6fef8b-f86a-4389-85a0-da1f3a9434d4.json
+1 −0 ...:4c564f473d38f23da1caa48c4ef53b958ef03d279232007ad3319b1f38584bdb/9b23c218-772d-4c1f-88bf-2f8aafce7dab.json
+1 −0 ...:4c564f473d38f23da1caa48c4ef53b958ef03d279232007ad3319b1f38584bdb/9f806670-0447-43d5-8d5c-e79699fea684.json
+1 −0 ...:4c564f473d38f23da1caa48c4ef53b958ef03d279232007ad3319b1f38584bdb/a09357c4-5939-4637-b069-24b7468b3d30.json
+1 −0 ...:4c564f473d38f23da1caa48c4ef53b958ef03d279232007ad3319b1f38584bdb/a372a1e8-fa75-4e41-aab0-9f7e68cb7bf4.json
+1 −0 ...:4c564f473d38f23da1caa48c4ef53b958ef03d279232007ad3319b1f38584bdb/aad3852e-2359-4719-8cff-68f5f872d570.json
+1 −0 ...:4c564f473d38f23da1caa48c4ef53b958ef03d279232007ad3319b1f38584bdb/b06c75a5-91cd-4ba9-b0af-9e7253adef61.json
+1 −0 ...:4c564f473d38f23da1caa48c4ef53b958ef03d279232007ad3319b1f38584bdb/b6fd1e05-a860-4a04-a72e-d368f8c01df7.json
+1 −0 ...:4c564f473d38f23da1caa48c4ef53b958ef03d279232007ad3319b1f38584bdb/bf8df238-287e-43c9-8266-b200f8c2a806.json
+1 −0 ...:4c564f473d38f23da1caa48c4ef53b958ef03d279232007ad3319b1f38584bdb/c11bd835-922f-40ef-971f-fc5bd4399b10.json
+1 −0 ...:4c564f473d38f23da1caa48c4ef53b958ef03d279232007ad3319b1f38584bdb/ce8c01dd-2331-40d4-b9d4-4a5daae8d7c4.json
+1 −0 ...:4c564f473d38f23da1caa48c4ef53b958ef03d279232007ad3319b1f38584bdb/d6698150-1fff-4c19-bbec-4c40c757b5ee.json
+1 −0 ...:4c564f473d38f23da1caa48c4ef53b958ef03d279232007ad3319b1f38584bdb/d94dd02f-0f5c-4dc6-9c19-f8c9e83e2922.json
+1 −0 ...:4c564f473d38f23da1caa48c4ef53b958ef03d279232007ad3319b1f38584bdb/d9c33926-e27a-414f-a907-4f7e1aee9cb6.json
+1 −0 ...:4c564f473d38f23da1caa48c4ef53b958ef03d279232007ad3319b1f38584bdb/da934fce-34f2-4fe3-a14c-6514f22ce7e6.json
+1 −0 ...:4c564f473d38f23da1caa48c4ef53b958ef03d279232007ad3319b1f38584bdb/db44c189-a899-43c6-b043-5194ae002765.json
+1 −0 ...:4c564f473d38f23da1caa48c4ef53b958ef03d279232007ad3319b1f38584bdb/dba48e42-d867-447c-97cf-7b27da063108.json
+1 −0 ...:4c564f473d38f23da1caa48c4ef53b958ef03d279232007ad3319b1f38584bdb/de1c8f65-e238-4f8c-80cc-1385f0ea9536.json
+1 −0 ...:4c564f473d38f23da1caa48c4ef53b958ef03d279232007ad3319b1f38584bdb/dfdbf234-7549-4757-b729-6e5cc6646526.json
+1 −0 ...:4c564f473d38f23da1caa48c4ef53b958ef03d279232007ad3319b1f38584bdb/e38c0fbd-b8b2-4169-b521-50f9f6d97601.json
+1 −0 ...:4c564f473d38f23da1caa48c4ef53b958ef03d279232007ad3319b1f38584bdb/f196cd45-bfab-4918-8372-c8482445c2a6.json
+1 −0 ...:347a0d748d05a050dc64b92de2246d2240db6eb38afbc17c3c08d0acb0db1b50/7ed197d5-2da0-4d60-9bdf-38375e819c88.json
+1 −0 ...:5e96e03a493a54904aa8be573fc0414431afb4f47ac58fbffd03b2a725005364/5b628033-8927-4678-a143-d19de4d26a16.json
+1 −0 ...:5e96e03a493a54904aa8be573fc0414431afb4f47ac58fbffd03b2a725005364/629b50a8-2f45-4f3f-8c7f-71faf6b8630c.json
+1 −0 ...:5e96e03a493a54904aa8be573fc0414431afb4f47ac58fbffd03b2a725005364/72a9d252-240b-479a-a02d-83b7b00ec9ae.json
+1 −0 ...:5e96e03a493a54904aa8be573fc0414431afb4f47ac58fbffd03b2a725005364/a5da3682-455f-4b5f-8815-b1a8cbb41ba9.json
+1 −1 ...:5e96e03a493a54904aa8be573fc0414431afb4f47ac58fbffd03b2a725005364/ccc54377-9c34-4c87-bea6-8717f9085440.json
+1 −0 ...:5e96e03a493a54904aa8be573fc0414431afb4f47ac58fbffd03b2a725005364/cdb1cb10-8602-4c08-a697-74910352cec7.json

0 comments on commit 12893d3

Please sign in to comment.