File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 4848
4949all_bom_component_vulns = []
5050
51- for bom_component_vuln in bd .get_resource ('vulnerable-components' , version ):
51+ # version of API to call
52+ api_version = 8
53+
54+ media_type = "application/vnd.blackducksoftware.bill-of-materials-" + str (api_version ) + "+json"
55+ #media_type = "application/json"
56+
57+ # lower case keys
58+ lc_keys = {}
59+ lc_keys ['accept' ] = media_type
60+ lc_keys ['content-type' ] = media_type
61+
62+ # keyword arguments to pass
63+ kwargs = {}
64+ kwargs ['headers' ] = lc_keys
65+
66+ for bom_component_vuln in bd .get_resource ('vulnerable-components' , version , ** kwargs ):
5267 vulnerabilities = bd .get_resource ('vulnerabilities' , bom_component_vuln )
5368 upgrade_guidance = bd .get_json (f"{ bom_component_vuln ['componentVersion' ]} /upgrade-guidance" )
5469 bom_component_vuln ['upgrade_guidance' ] = upgrade_guidance
You can’t perform that action at this time.
0 commit comments