Title: DefectDojo persistence provider error handling · Issue #618 · secureCodeBox/secureCodeBox · GitHub
Open Graph Title: DefectDojo persistence provider error handling · Issue #618 · secureCodeBox/secureCodeBox
X Title: DefectDojo persistence provider error handling · Issue #618 · secureCodeBox/secureCodeBox
Description: 🐞 Bug report Describe the bug Running a large-scale Amass scan, we noticed that the DefectDojo persistence provider was failing. With closer inspection, we found that DefectDojo crashes on importing some endpoints which it regards as inv...
Open Graph Description: 🐞 Bug report Describe the bug Running a large-scale Amass scan, we noticed that the DefectDojo persistence provider was failing. With closer inspection, we found that DefectDojo crashes on importin...
X Description: 🐞 Bug report Describe the bug Running a large-scale Amass scan, we noticed that the DefectDojo persistence provider was failing. With closer inspection, we found that DefectDojo crashes on importin...
Opengraph URL: https://github.com/secureCodeBox/secureCodeBox/issues/618
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"DefectDojo persistence provider error handling","articleBody":"## 🐞 Bug report\r\n\r\n### Describe the bug\r\nRunning a large-scale Amass scan, we noticed that the DefectDojo persistence provider was failing. With closer inspection, we found that DefectDojo crashes on importing some endpoints which it regards as invalid. These domain names generally include underscores.\r\n\r\nThe persistence provider then restarts and tries again (failing), and again, etc.. Each time it restarts, it creates a new duplicate DefectDojo test object.\r\n\r\nOn another note, since amass is officially supported by SCB, but not by the DefectDojo persistence provider (uses generic), is this issue something that SCB actively supports?\r\n\r\n### Steps To Reproduce\r\nRun the DefectDojo persistence provider and import list of findings with an invalid domain name.\r\n\r\n### Expected behavior\r\n1. The persistence provider should not crash.\r\n2. The persistence provider should be as atomic as possible (preventing duplicate imports).\r\n3. Discussion: how should DefectDojo and the persistence provider handle an improperly formatted generic findings?\r\n\r\n### System (please complete the following information):\r\n- secureCodeBox Version: 3.0.1\r\n- DefectDojo version 2.1.0\r\n\r\n### Screenshots / Logs\r\n```\r\n[30/Aug/2021 20:17:01] ERROR [django.request:224] Internal Server Error: /api/v2/reimport-scan/\r\nTraceback (most recent call last):\r\n File \"/app/./dojo/importers/reimporter/reimporter.py\", line 162, in process_parsed_findings\r\n endpoint.clean()\r\n File \"/app/./dojo/models.py\", line 1218, in clean\r\n raise ValidationError(errors)\r\ndjango.core.exceptions.ValidationError: ['Host \"_invalid._host.com\" has invalid format']\r\n[...]\r\n```\r\n```\r\n2021-08-30 20:14:21 INFO VersionedEngagementsStrategy:191 - Using ProductType Id: 1\r\nException in thread \"main\" org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 Internal Server Error: [\r\n\u003c!doctype html\u003e\r\n\u003chtml lang=\"en\"\u003e\r\n\u003chead\u003e\r\n \u003ctitle\u003eServer Error (500)\u003c/title\u003e\r\n\u003c/head\u003e\r\n\u003cbody\u003e\r\n \u003ch1\u003eServer Error (500)\u003c/h1\u003e\u003cp\u003e\u003c/p\u003e\r\n\u003c/body\u003e\r\n\u003c/html\u003e\r\n]\r\n\tat org.springframework.web.client.HttpServerErrorException.create(HttpServerErrorException.java:100)\r\n\tat org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:188)\r\n\tat org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:125)\r\n\tat org.springframework.web.client.ResponseErrorHandler.handleError(ResponseErrorHandler.java:63)\r\n\tat org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:819)\r\n\tat org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:777)\r\n\tat org.springframework.web.client.RestTemplate.execute(RestTemplate.java:711)\r\n\tat org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:602)\r\n\tat io.securecodebox.persistence.defectdojo.service.ImportScanService.createFindings(ImportScanService.java:100)\r\n\tat io.securecodebox.persistence.defectdojo.service.ImportScanService.reimportScan(ImportScanService.java:117)\r\n\tat io.securecodebox.persistence.strategies.VersionedEngagementsStrategy.run(VersionedEngagementsStrategy.java:90)\r\n\tat io.securecodebox.persistence.DefectDojoPersistenceProvider.main(DefectDojoPersistenceProvider.java:42)\r\n```\r\n","author":{"url":"https://github.com/EndPositive","@type":"Person","name":"EndPositive"},"datePublished":"2021-08-31T07:56:43.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":10},"url":"https://github.com/618/secureCodeBox/issues/618"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e66309ea-7010-f178-b8e1-18225afb5ac0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8B08:4BA57:740169:9A7FC9:697BEF9C |
| html-safe-nonce | 5fd7e70d452994eb0ed8511f148e5a9b85b214e1ba87386461bd601079f7d73d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QjA4OjRCQTU3Ojc0MDE2OTo5QTdGQzk6Njk3QkVGOUMiLCJ2aXNpdG9yX2lkIjoiMjA4NTQ5ODQ5NzA3MDI2NDIyMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b8ea8c0571a76600558506548ca440dfc3e54cad06aed7e53e2dbc562240d82e |
| hovercard-subject-tag | issue:983559061 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/secureCodeBox/secureCodeBox/618/issue_layout |
| twitter:image | https://opengraph.githubassets.com/755f1f71466663f46997de18ce7011bd941822ddfc554319b4ef8c710007058a/secureCodeBox/secureCodeBox/issues/618 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/755f1f71466663f46997de18ce7011bd941822ddfc554319b4ef8c710007058a/secureCodeBox/secureCodeBox/issues/618 |
| og:image:alt | 🐞 Bug report Describe the bug Running a large-scale Amass scan, we noticed that the DefectDojo persistence provider was failing. With closer inspection, we found that DefectDojo crashes on importin... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | EndPositive |
| hostname | github.com |
| expected-hostname | github.com |
| None | da4f0ee56809799586f8ee546b27f94fe9b5893edfbf87732e82be45be013b52 |
| turbo-cache-control | no-preview |
| go-import | github.com/secureCodeBox/secureCodeBox git https://github.com/secureCodeBox/secureCodeBox.git |
| octolytics-dimension-user_id | 34573705 |
| octolytics-dimension-user_login | secureCodeBox |
| octolytics-dimension-repository_id | 80711933 |
| octolytics-dimension-repository_nwo | secureCodeBox/secureCodeBox |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 80711933 |
| octolytics-dimension-repository_network_root_nwo | secureCodeBox/secureCodeBox |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 1491f56585cd699a89b9580003a35ac0ae1ea3af |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width