Skip to content

Commit 83543f8

Browse files
Merge pull request #55 from interlynk-io/fix/2098-download
Fix/2098 download
2 parents ce4c4f3 + 669d753 commit 83543f8

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

.tool-versions

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
python 3.13.2
2+
golang 1.21.5

lynkctx.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,11 @@
8888
download(
8989
sbomId: $sbomId
9090
includeVulns: $includeVulns
91-
)
92-
__typename
91+
){
92+
content
93+
contentType
94+
filename
95+
}
9396
}
9497
}
9598
"""
@@ -318,12 +321,13 @@ def download(self):
318321
logging.error(error["message"])
319322
return None
320323

321-
sbom = data.get('data', {}).get('sbom', {})
324+
sbom = data.get('data', {}).get('sbom', {}).get('download', {})
325+
322326
if sbom is None:
323327
print('No SBOM matched with the given ID')
324328
logging.debug(data)
325329
return None
326-
b64data = sbom.get('download')
330+
b64data = sbom.get('content')
327331
decoded_content = base64.b64decode(b64data)
328332
logging.debug('Completed download and decoding')
329333
return decoded_content.decode('utf-8')

0 commit comments

Comments
 (0)