fix: check if product_type exist, than dont try to create the product…#149
Open
hektor1966 wants to merge 1 commit intotelekom-mms:mainfrom
Open
fix: check if product_type exist, than dont try to create the product…#149hektor1966 wants to merge 1 commit intotelekom-mms:mainfrom
hektor1966 wants to merge 1 commit intotelekom-mms:mainfrom
Conversation
Author
schurzi
reviewed
Feb 22, 2026
| "scan_type": "Trivy Operator Scan", | ||
| "engagement_name": _DEFECT_DOJO_ENGAGEMENT_NAME, | ||
| "product_name": _DEFECT_DOJO_PRODUCT_NAME, | ||
| "product_type_name": _DEFECT_DOJO_PRODUCT_TYPE_NAME, |
Contributor
There was a problem hiding this comment.
I think here is a confusion of product_name and product_type_name. Can you clarify which is relevant here? Either the API call is on the wrong endpoint or this variable is mixed up.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We are organizing our findings with product_type's.
On reimports, the operator try to set the product_type_name. When the product_type in DD is other than as in the operator defined, you will get the following error.
With the fix, the operator looks when a product exists. When it exists, the operator will not try to set the product_type.
So we can use different product_types.
I tested the change in our development environment, and it works as expected. Product_type will not try to create, new product will create with the default product_type.