Skip to content

Commit cb56da8

Browse files
committed
Update grype db as part of installation
1 parent ced66a2 commit cb56da8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

setup/unix-ci.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,9 @@ def install_grype() -> str:
160160
data = download_with_retry(url)
161161
with tarfile.open(fileobj=io.BytesIO(data), mode='r') as tf:
162162
tf.extract('grype', path=dest, filter='fully_trusted')
163-
return os.path.join(dest, 'grype')
163+
exe = os.path.join(dest, 'grype')
164+
subprocess.run([exe, 'db', 'update'])
165+
return exe
164166

165167

166168
IGNORED_DEPENDENCY_CVES = [
@@ -222,7 +224,7 @@ def check_dependencies() -> None:
222224
print('Testing against the SBOM', flush=True)
223225
import runpy
224226
orig = sys.argv, sys.stdout
225-
sys.argv = ['bypy', 'sbom', 'myproject', '1.0.0']
227+
sys.argv = ['bypy', 'sbom', 'calibre', '1.0.0']
226228
buf = io.StringIO()
227229
sys.stdout = buf
228230
runpy.run_path('bypy-src')

0 commit comments

Comments
 (0)