diff --git a/.flake8 b/.flake8 index ea7e49a44bd..9a41e5a0be5 100644 --- a/.flake8 +++ b/.flake8 @@ -25,6 +25,8 @@ ignore = E128 # line break after binary operator W504 + # Line break occurred before a binary operator (conflicting with black) + W503 # undefined file name excpetion F821 diff --git a/docs/content/en/integrations/parsers.md b/docs/content/en/integrations/parsers.md index e463331b160..a31b1307b87 100644 --- a/docs/content/en/integrations/parsers.md +++ b/docs/content/en/integrations/parsers.md @@ -120,6 +120,18 @@ Import Brakeman Scanner findings in JSON format. Import Bugcrowd results in CSV format. +### Bugcrowd API + +Import Bugcrowd submissions directly from the API using the API token. +Set your API key directly in the format `username:password` in the API Token input, it will be added to the header `'Authorization': 'Token {}'.format(self.api_token),` +For each product, you can configure 2 things: +- Service key 1: the bugcrowd program code (it's the slug name in the url for the program, url safe) +- Service key 2: the bugcrowd target name (the full name, it will be url-encoded, you can find it in https://tracker.bugcrowd.com//settings/scope/target_groups) + - It can be left empty so that all program submissions are imported + +That way, per product, you can use the same program but separate by target, which is a fairly common way of filtering/grouping Bugcrowd. +Adding support for a 3rd filtering would be possible with Service Key 3, feel free to make a PR. + ### Bundler-Audit Import the text output generated with bundle-audit check diff --git a/dojo/settings/settings.dist.py b/dojo/settings/settings.dist.py index d64efd7dab7..4133c14d939 100644 --- a/dojo/settings/settings.dist.py +++ b/dojo/settings/settings.dist.py @@ -1183,6 +1183,7 @@ def saml2_attrib_map_format(dict): 'Solar Appscreener Scan': ['title', 'file_path', 'line', 'severity'], 'pip-audit Scan': ['vuln_id_from_tool', 'component_name', 'component_version'], 'Edgescan Scan': ['unique_id_from_tool'], + 'Bugcrowd API': ['unique_id_from_tool'], 'Rubocop Scan': ['vuln_id_from_tool', 'file_path', 'line'], 'JFrog Xray Scan': ['title', 'description', 'component_name', 'component_version'], 'CycloneDX Scan': ['vuln_id_from_tool', 'component_name', 'component_version'], @@ -1234,6 +1235,7 @@ def saml2_attrib_map_format(dict): 'Semgrep JSON Report': True, 'Generic Findings Import': True, 'Edgescan Scan': True, + 'Bugcrowd API': True, 'Veracode SourceClear Scan': True, 'Twistlock Image Scan': True } @@ -1340,6 +1342,7 @@ def saml2_attrib_map_format(dict): 'Gitleaks Scan': DEDUPE_ALGO_HASH_CODE, 'pip-audit Scan': DEDUPE_ALGO_HASH_CODE, 'Edgescan Scan': DEDUPE_ALGO_HASH_CODE, + 'Bugcrowd API': DEDUPE_ALGO_UNIQUE_ID_FROM_TOOL, 'Rubocop Scan': DEDUPE_ALGO_HASH_CODE, 'JFrog Xray Scan': DEDUPE_ALGO_HASH_CODE, 'CycloneDX Scan': DEDUPE_ALGO_HASH_CODE, diff --git a/dojo/templates/dojo/add_product_api_scan_configuration.html b/dojo/templates/dojo/add_product_api_scan_configuration.html index ec3e6b42ba7..fc020f96ce1 100644 --- a/dojo/templates/dojo/add_product_api_scan_configuration.html +++ b/dojo/templates/dojo/add_product_api_scan_configuration.html @@ -18,6 +18,8 @@

Add {{ product.name }} API Scan Configuration

API Scan Configurations are supported for the test types SonarQube API, Cobalt.io API and Edgescan API.