Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #1622 DefectDojo integration reimport enhancement - Part 2 #1738

Merged
merged 4 commits into from
Jun 27, 2022
Merged

Issue #1622 DefectDojo integration reimport enhancement - Part 2 #1738

merged 4 commits into from
Jun 27, 2022

Conversation

yangsec888
Copy link

Add global reimport flag support per valentijnscholten suggestion. Note a separate PR on GUI will be sent in 'frontend' repo.

@yangsec888
Copy link
Author

Frontend code change is now in DependencyTrack/frontend#179

LOGGER.debug("Found existing test Id: " + testId);
if (testId.equals("")) {
client.uploadDependencyTrackFindings(apiKey.getPropertyValue(), engagementId.getPropertyValue(), payload);
} else {
client.reimportDependencyTrackFindings(apiKey.getPropertyValue(), engagementId.getPropertyValue(), payload, testId);
}
} else if (Boolean.parseBoolean(globalReimportEnabled.getPropertyValue())) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we merge the two branches of the if that perform REimport? The second one currently does not check for an empty test id.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point on make the code more readable - thank you. The change is now in @valentijnscholten

Sam Li2 and others added 4 commits June 23, 2022 14:33
Signed-off-by: Sam Li2 <[email protected]>
Signed-off-by: Sam Li2 <[email protected]>
…esponding frondend code change

Signed-off-by: Sam Li2 <[email protected]>
Signed-off-by: Sam Li2 <[email protected]>
…onstant DEFECTDOJO_REIMPORT_ENABLED

Signed-off-by: Sam Li2 <[email protected]>
Signed-off-by: Sam Li2 <[email protected]>
Copy link
Member

@nscuro nscuro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Let's get the frontend PR rebased, then we're ready to merge! 🚀

@nscuro nscuro added this to the 4.6 milestone Jun 27, 2022
@nscuro nscuro added the enhancement New feature or request label Jun 27, 2022
@nscuro nscuro merged commit 58dae19 into DependencyTrack:master Jun 27, 2022
@valentijnscholten
Copy link
Contributor

thanks @yangsec888

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants