Skip to content

Handle config profiles with 0 or 2+ modules gracefully#1351

Open
orto17 wants to merge 1 commit into
jfrog:v3_erfrom
orto17:config-profile-validation
Open

Handle config profiles with 0 or 2+ modules gracefully#1351
orto17 wants to merge 1 commit into
jfrog:v3_erfrom
orto17:config-profile-validation

Conversation

@orto17

@orto17 orto17 commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Instead of erroring when a profile has 0 modules, log a warning and inject a default SCA-only module so scanning can proceed. When a profile has 2+ modules, log a warning and continue with the first module.

  • All tests passed. If this feature is not already covered by the tests, I added new tests.
  • This pull request is on the dev branch.
  • I used gofmt for formatting the code before submitting the pull request.
  • Update documentation about new features / new supported technologies

Instead of erroring when a profile has 0 modules, log a warning and inject
a default SCA-only module so scanning can proceed. When a profile has 2+
modules, log a warning and continue with the first module.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Comment thread utils/getconfiguration.go
Comment on lines +545 to +546
if len(configProfile.Modules) > 1 {
log.Warn(fmt.Sprintf("%s config profile returned with %d modules. Only the first module will be used", configProfile.ProfileName, len(configProfile.Modules)))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

a bit tricky, I don't think its a good Idea to use only one

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.

2 participants