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(detect): Add support for Detect 10 #5224

Merged
merged 10 commits into from
Jan 17, 2025
Merged

feat(detect): Add support for Detect 10 #5224

merged 10 commits into from
Jan 17, 2025

Conversation

jitendk
Copy link
Contributor

@jitendk jitendk commented Jan 8, 2025

Description

Added the detect 10 parameter, user can use useDetect10 field to use the detect version 10 in their scan.
Change the repo name from detect.synopsys.com to detect.blackduck.com as per vendor instruction.
Changed the failErrorLevel flag from true to false as by-default.

Checklist

  • Tests
  • Documentation
  • Inner source library needs updating

@jitendk jitendk requested a review from a team as a code owner January 8, 2025 10:00
@dimaste
Copy link
Member

dimaste commented Jan 8, 2025

/it-go

1 similar comment
@dimaste
Copy link
Member

dimaste commented Jan 8, 2025

/it-go

@vijayanjay
Copy link
Contributor

/it-go

@CCFenner CCFenner changed the title Changes for detect 10 and repo change from synopsys to blackduck feat(detect): Add support for Detect 10 Jan 16, 2025
pkg/whitesource/configHelper.go Show resolved Hide resolved
cmd/detectExecuteScan.go Outdated Show resolved Hide resolved
@CCFenner CCFenner self-assigned this Jan 16, 2025
pkg/whitesource/configHelper.go Show resolved Hide resolved
@@ -664,6 +664,17 @@ spec:
- STAGES
- STEPS
default: false
- name: useDetect9
description:
"This flag enables the use of the supported version 9 of the Detect Script instead of v8"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"This flag enables the use of the supported version 9 of the Detect Script instead of v8"
"This flag enables the use of the supported version 9 of the Detect Script instead of v10"

Default is v10 now, please also adjust comment on useDetect8

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@CCFenner Existing comment is right as we are moving from lower to upper detect version, so the comment "This flag enables the use of the supported version 9 of the Detect Script instead of v8" should be fine.

Copy link
Member

@CCFenner CCFenner Jan 17, 2025

Choose a reason for hiding this comment

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

Maybe we should just refer to it as "the default" instead of a specific version..

This flag will only trigger v9 if v8 is not set, so it will overwrite the use of v10.

Both useDetect9 and useDetect8 are by default false, so the step uses v10. By setting one of the parameter to true, this could be overwritten.

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 have changed the description now, default version is 10 now and user may use the detect 8 or detect 9 by setting particular field as True. I hope this is fine.

Copy link
Member

@CCFenner CCFenner Jan 17, 2025

Choose a reason for hiding this comment

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

You added a new parameter, that is however not used, I would asked to remove that please or explain what the use of that is.

Copy link
Contributor Author

@jitendk jitendk Jan 17, 2025

Choose a reason for hiding this comment

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

I have added useDetect10 now, without that there is no way use can use the detect 10 version.
if we not use useDetect10 then we need to set old one as default as go test was failing. If we make (useDetect8 or useDetect9 ) as default then user may not be able to use detect version 10 at all.

Now user has all three version 8,9 and 10 to used where 10 is default.

resources/metadata/detectExecuteScan.yaml Outdated Show resolved Hide resolved
Comment on lines 678 to 688
- name: useDetect10
description:
"This flag enables the use of the supported version 10 of the Detect Script"
aliases:
- name: detect/useDetect10
type: bool
scope:
- PARAMETERS
- STAGES
- STEPS
default: true
Copy link
Member

Choose a reason for hiding this comment

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

This is not used in code, why define it here? If you would like to document the default version, I suggest to do that in the initial step description.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if we make useDetect9 as default then user will not be able to use detect 10 version as by default 9 version will run as always if parameter is not passed.

resources/metadata/detectExecuteScan.yaml Outdated Show resolved Hide resolved
resources/metadata/detectExecuteScan.yaml Outdated Show resolved Hide resolved
cmd/detectExecuteScan_generated.go Outdated Show resolved Hide resolved
@CCFenner
Copy link
Member

/it-go

Copy link
Member

@CCFenner CCFenner left a comment

Choose a reason for hiding this comment

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

👍

@CCFenner CCFenner merged commit 64ae652 into SAP:master Jan 17, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants