René's URL Explorer Experiment


Title: "product with this name already exists." error when sending trivy image scan results to DefectDojo · Issue #2285 · secureCodeBox/secureCodeBox · GitHub

Open Graph Title: "product with this name already exists." error when sending trivy image scan results to DefectDojo · Issue #2285 · secureCodeBox/secureCodeBox

X Title: "product with this name already exists." error when sending trivy image scan results to DefectDojo · Issue #2285 · secureCodeBox/secureCodeBox

Description: 🐞 Bug report Describe the bug We scan Docker image using trivy image command and the hook secureCodeBox/persistence-defectdojo fails with the following error: 2024-02-13 14:29:33 INFO DefectDojoPersistenceProvider:25 - Starting DefectDoj...

Open Graph Description: 🐞 Bug report Describe the bug We scan Docker image using trivy image command and the hook secureCodeBox/persistence-defectdojo fails with the following error: 2024-02-13 14:29:33 INFO DefectDojoPer...

X Description: 🐞 Bug report Describe the bug We scan Docker image using trivy image command and the hook secureCodeBox/persistence-defectdojo fails with the following error: 2024-02-13 14:29:33 INFO DefectDojoPer...

Opengraph URL: https://github.com/secureCodeBox/secureCodeBox/issues/2285

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"\"product with this name already exists.\" error when sending trivy image scan results to DefectDojo","articleBody":"## 🐞 Bug report\r\n\u003c!--\r\nThank you for reporting an issue in our project 🙌\r\n\r\nBefore opening a new issue, please make sure that we do not have any duplicates already open. You can ensure this by searching the issue list for this repository. If there is a duplicate, please close your issue and add a comment to the existing issue instead.\r\n--\u003e\r\n\r\n### Describe the bug\r\n\r\nWe scan Docker image using `trivy image` command and the hook `secureCodeBox/persistence-defectdojo` fails with the following error:\r\n\r\n```\r\n2024-02-13 14:29:33 INFO  DefectDojoPersistenceProvider:25 - Starting DefectDojo persistence provider\r\n2024-02-13 14:29:40 INFO  DefectDojoPersistenceProvider:36 - Downloading Scan Result\r\n2024-02-13 14:29:45 INFO  DefectDojoPersistenceProvider:40 - Uploading Findings to DefectDojo at: https://defectdojo.infra.mana.wtf\r\n2024-02-13 14:29:46 INFO  VersionedEngagementsStrategy:85 - Running with DefectDojo User Id: 1\r\n2024-02-13 14:29:46 INFO  VersionedEngagementsStrategy:203 - Looking for ID of ProductType 'Application'\r\n2024-02-13 14:29:47 INFO  VersionedEngagementsStrategy:206 - ProductType 'Application' didn't already exists creating now\r\n2024-02-13 14:29:47 INFO  VersionedEngagementsStrategy:210 - Using ProductType Id: 3\r\n2024-02-13 14:29:47 INFO  VersionedEngagementsStrategy:229 - Creating Product: 'mana-game-service'\r\nException in thread \"main\" org.springframework.web.client.HttpClientErrorException$BadRequest: 400 Bad Request: \"{\"name\":[\"product with this name already exists.\"],\"message\":\"{'name': [ErrorDetail(string='product with this name already exists.', code='unique')]}\"}\"\r\n\tat org.springframework.web.client.HttpClientErrorException.create(HttpClientErrorException.java:101)\r\n\tat org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:168)\r\n\tat org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:122)\r\n\tat org.springframework.web.client.ResponseErrorHandler.handleError(ResponseErrorHandler.java:63)\r\n\tat org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:825)\r\n\tat org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:783)\r\n\tat org.springframework.web.client.RestTemplate.execute(RestTemplate.java:717)\r\n\tat org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:608)\r\n\tat io.securecodebox.persistence.defectdojo.service.GenericDefectDojoService.create(GenericDefectDojoService.java:221)\r\n\tat io.securecodebox.persistence.strategies.VersionedEngagementsStrategy.lambda$ensureProductExistsForScan$5(VersionedEngagementsStrategy.java:230)\r\n\tat java.base/java.util.Optional.orElseGet(Optional.java:364)\r\n\tat io.securecodebox.persistence.strategies.VersionedEngagementsStrategy.ensureProductExistsForScan(VersionedEngagementsStrategy.java:228)\r\n\tat io.securecodebox.persistence.strategies.VersionedEngagementsStrategy.run(VersionedEngagementsStrategy.java:87)\r\n\tat io.securecodebox.persistence.DefectDojoPersistenceProvider.main(DefectDojoPersistenceProvider.java:43)\r\n```\r\n\r\n(We do have the product in DefectDojo and we want to reuse it for this scan results.)\r\n\r\n### Steps To Reproduce\r\n\r\n1. Create a product \"name-of-the-product\" in DefectDojo\r\n\r\n2. Run trivy scan with the following yaml:\r\n```\r\napiVersion: \"execution.securecodebox.io/v1\"\r\nkind: Scan\r\nmetadata:\r\n  name: \"trivy-image\"\r\n  annotations:\r\n    defectdojo.securecodebox.io/product-type-name: Application\r\n    defectdojo.securecodebox.io/product-name: name-of-the-product\r\n    defectdojo.securecodebox.io/engagement-name: \"Trivy image scan\"\r\n    defectdojo.securecodebox.io/test-title: \"Trivy image @ tag\"\r\nspec:\r\n  scanType: \"trivy-image\"\r\n  parameters:\r\n    - \"registry.domain.tld/image:tag\"\r\n```\r\n\r\n### Expected behavior\r\n\r\nCheck if the hook `persistence-defectdojo` succeeds.\r\n\r\n### System (please complete the following information):\r\n\r\n- operator-4.3.0\r\n- trivy-4.3.0\r\n- persistence-defectdojo-4.3.0\r\n\r\nGoogle Kubernetes Engine\r\n\r\n```\r\nClient Version: version.Info{Major:\"1\", Minor:\"25\", GitVersion:\"v1.25.4\", GitCommit:\"872a965c6c6526caa949f0c6ac028ef7aff3fb78\", GitTreeState:\"clean\", BuildDate:\"2022-11-09T13:28:30Z\", GoVersion:\"go1.19.3\", Compiler:\"gc\", Platform:\"darwin/arm64\"}\r\nKustomize Version: v4.5.7\r\nServer Version: version.Info{Major:\"1\", Minor:\"26\", GitVersion:\"v1.26.10-gke.1101000\", GitCommit:\"375ed214cfa092ed25d2472c1709db5d7dcda078\", GitTreeState:\"clean\", BuildDate:\"2023-11-06T09:23:17Z\", GoVersion:\"go1.20.10 X:boringcrypto\", Compiler:\"gc\", Platform:\"linux/amd64\"}\r\n```\r\n\r\n### Screenshots / Logs\r\n\u003c!-- If applicable, add screenshots to help explain your problem. --\u003e\r\n\r\n### Additional context\r\n\u003c!-- Add any other context about the problem here. --\u003e\r\n","author":{"url":"https://github.com/danil-smirnov","@type":"Person","name":"danil-smirnov"},"datePublished":"2024-02-13T14:53:34.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/2285/secureCodeBox/issues/2285"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:a62d3988-0b17-b964-2f56-ae0d9d3b624e
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA018:BED69:575E12:740C33:698F96A4
html-safe-nonce6d3480d943c82cb9bef2737d3472f48316a89e1f830d41ac41ce77fe87b3c032
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMDE4OkJFRDY5OjU3NUUxMjo3NDBDMzM6Njk4Rjk2QTQiLCJ2aXNpdG9yX2lkIjoiMzAxODc4MDk0MDQzODU3NDc1NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac9496b2958abdcafd91b3356d19da5d784e53e7d4edbb65adee3a22b3d82a58a4
hovercard-subject-tagissue:2132510170
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/secureCodeBox/secureCodeBox/2285/issue_layout
twitter:imagehttps://opengraph.githubassets.com/64d9ad07fd0b2ec9c2925da8ac2fe22af37af4f92c0df6bb292a5bb3082e5f79/secureCodeBox/secureCodeBox/issues/2285
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/64d9ad07fd0b2ec9c2925da8ac2fe22af37af4f92c0df6bb292a5bb3082e5f79/secureCodeBox/secureCodeBox/issues/2285
og:image:alt🐞 Bug report Describe the bug We scan Docker image using trivy image command and the hook secureCodeBox/persistence-defectdojo fails with the following error: 2024-02-13 14:29:33 INFO DefectDojoPer...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedanil-smirnov
hostnamegithub.com
expected-hostnamegithub.com
None5f47eb8d0aaafbfcb6a8220a40bd81431acf688857c575e6489670c394cfa36f
turbo-cache-controlno-preview
go-importgithub.com/secureCodeBox/secureCodeBox git https://github.com/secureCodeBox/secureCodeBox.git
octolytics-dimension-user_id34573705
octolytics-dimension-user_loginsecureCodeBox
octolytics-dimension-repository_id80711933
octolytics-dimension-repository_nwosecureCodeBox/secureCodeBox
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id80711933
octolytics-dimension-repository_network_root_nwosecureCodeBox/secureCodeBox
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release09a8136f6e8f8fd3078d54ce5f8b7adb493d44a7
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/secureCodeBox/secureCodeBox/issues/2285#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FsecureCodeBox%2FsecureCodeBox%2Fissues%2F2285
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FsecureCodeBox%2FsecureCodeBox%2Fissues%2F2285
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=secureCodeBox%2FsecureCodeBox
Reloadhttps://github.com/secureCodeBox/secureCodeBox/issues/2285
Reloadhttps://github.com/secureCodeBox/secureCodeBox/issues/2285
Reloadhttps://github.com/secureCodeBox/secureCodeBox/issues/2285
secureCodeBox https://github.com/secureCodeBox
secureCodeBoxhttps://github.com/secureCodeBox/secureCodeBox
Notifications https://github.com/login?return_to=%2FsecureCodeBox%2FsecureCodeBox
Fork 179 https://github.com/login?return_to=%2FsecureCodeBox%2FsecureCodeBox
Star 955 https://github.com/login?return_to=%2FsecureCodeBox%2FsecureCodeBox
Code https://github.com/secureCodeBox/secureCodeBox
Issues 71 https://github.com/secureCodeBox/secureCodeBox/issues
Pull requests 4 https://github.com/secureCodeBox/secureCodeBox/pulls
Discussions https://github.com/secureCodeBox/secureCodeBox/discussions
Actions https://github.com/secureCodeBox/secureCodeBox/actions
Projects 1 https://github.com/secureCodeBox/secureCodeBox/projects
Security 1 https://github.com/secureCodeBox/secureCodeBox/security
Insights https://github.com/secureCodeBox/secureCodeBox/pulse
Code https://github.com/secureCodeBox/secureCodeBox
Issues https://github.com/secureCodeBox/secureCodeBox/issues
Pull requests https://github.com/secureCodeBox/secureCodeBox/pulls
Discussions https://github.com/secureCodeBox/secureCodeBox/discussions
Actions https://github.com/secureCodeBox/secureCodeBox/actions
Projects https://github.com/secureCodeBox/secureCodeBox/projects
Security https://github.com/secureCodeBox/secureCodeBox/security
Insights https://github.com/secureCodeBox/secureCodeBox/pulse
New issuehttps://github.com/login?return_to=https://github.com/secureCodeBox/secureCodeBox/issues/2285
New issuehttps://github.com/login?return_to=https://github.com/secureCodeBox/secureCodeBox/issues/2285
"product with this name already exists." error when sending trivy image scan results to DefectDojohttps://github.com/secureCodeBox/secureCodeBox/issues/2285#top
bugBugshttps://github.com/secureCodeBox/secureCodeBox/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com/danil-smirnov
https://github.com/danil-smirnov
danil-smirnovhttps://github.com/danil-smirnov
on Feb 13, 2024https://github.com/secureCodeBox/secureCodeBox/issues/2285#issue-2132510170
bugBugshttps://github.com/secureCodeBox/secureCodeBox/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.