|
89 | 89 | BLACKDUCK_REPORT_MEDIATYPE = "application/vnd.blackducksoftware.report-4+json"
|
90 | 90 | blackduck_report_download_api = "/api/projects/{projectId}/versions/{projectVersionId}/reports/{reportId}/download"
|
91 | 91 | blackduck_link_component_ui_api = "/api/projects/{projectId}/versions/{projectVersionId}/components"
|
| 92 | +blackduck_link_snippet_ui_api = "/api/projects/{projectId}/versions/{projectVersionId}/source-trees" |
92 | 93 | # BD version details report
|
93 | 94 | blackduck_create_version_report_api = "/api/versions/{projectVersionId}/reports"
|
94 | 95 | blackduck_version_report_filename = "./blackduck_version_report_for_{projectVersionId}.zip"
|
|
105 | 106 | REPORT_COMPONENT_BOM = "/component_bom_report"
|
106 | 107 | REPORT_FILE_BOM = "/file_bom_report"
|
107 | 108 | REPORT_DISCOVERY = "/discovery"
|
| 109 | +BLACKDUCK_SNIPPET_FILTER = "?filter=bomMatchType%3Asnippet&offset=0&limit=100" |
108 | 110 | # Retries to wait for BD report creation. RETRY_LIMIT can be overwritten by the script parameter.
|
109 | 111 | RETRY_LIMIT = 30
|
110 | 112 | RETRY_TIMER = 30
|
|
115 | 117 | 'detectParameters': [],
|
116 | 118 | 'scanDateTime': '',
|
117 | 119 | 'blackDuckVersion': '',
|
118 |
| - 'linkToBlackDuckProjectVersionInUI': '' |
| 120 | + 'linkToBlackDuckProjectVersionInUI': '', |
| 121 | + 'linkToBlackDuckSnippetMatchInUI': '' |
119 | 122 | },
|
120 | 123 | 'fileInventory': {
|
121 | 124 | 'linkToUnmatchedOsFileData': "",
|
@@ -632,6 +635,9 @@ def generate_file_report(hub_client, project_id, version_id, codelocations, copy
|
632 | 635 | blackduck_link_component_ui_api.replace("{projectId}", project_id).replace("{projectVersionId}", version_id)
|
633 | 636 | report_content['configurationSettings']['linkToBlackDuckProjectVersionInUI'] = \
|
634 | 637 | hub_client.base_url + blackduck_link_component_ui_api.replace("{projectId}", project_id).replace("{projectVersionId}", version_id)
|
| 638 | + report_content['configurationSettings']['linkToBlackDuckSnippetMatchInUI'] = \ |
| 639 | + hub_client.base_url + blackduck_link_snippet_ui_api.replace("{projectId}", project_id).replace("{projectVersionId}", version_id) \ |
| 640 | + + BLACKDUCK_SNIPPET_FILTER |
635 | 641 |
|
636 | 642 | # Report body - Component BOM, file BOM with Discoveries data
|
637 | 643 | version_report_zip = get_version_detail_report(hub_client, project_id, version_id, retries)
|
|
0 commit comments