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

feat: Check for snippet matching when upload source is specified. #52

Merged
merged 1 commit into from Jul 15, 2019

Conversation

taikuukaits
Copy link
Contributor

Description

Addresses IDETECT-1522 which complains that detect silently suppresses upload source if the snippet matching enum is not set. Now we throw an user friendly configuration error if snippet matching is not set but upload source is.

@taikuukaits taikuukaits requested a review from ekerwin July 12, 2019 22:58
@BlackDuckCoPilot
Copy link

Black Duck Security Report

Merging #52 into master will not change security risk.

Click here to see full report

@@ -169,9 +171,23 @@ public BlackDuckSignatureScannerOptions createBlackDuckSignatureScannerOptions()

final String userProvidedScannerInstallUrl = detectConfiguration.getProperty(DetectProperty.DETECT_BLACKDUCK_SIGNATURE_SCANNER_HOST_URL, PropertyAuthority.None);

String snippetMatchingString = detectConfiguration.getProperty(DetectProperty.DETECT_BLACKDUCK_SIGNATURE_SCANNER_SNIPPET_MATCHING, PropertyAuthority.None).trim().toUpperCase();
Copy link
Contributor

Choose a reason for hiding this comment

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

Sigh. This is fine but extremely unfortunate that the library doesn't do a better job of supporting this. I think what we'd want is something that validates the scanner configuration in the library so that detect could make use of that. Can you create a ticket to build that feature?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I created a PR for doing the validation check on upload source and snippet matching.
blackducksoftware/blackduck-common#264

@taikuukaits taikuukaits merged commit 7d967ec into master Jul 15, 2019
@taikuukaits taikuukaits deleted the throw-on-upload-no-snippet branch July 15, 2019 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants