Skip to content

CLI-77 Auto-install sonar-secrets during sonar integrate claude#114

Open
kirill-knize-sonarsource wants to merge 2 commits intomasterfrom
feature/kk/CLI-77-auto-install-secrets-on-integrate
Open

CLI-77 Auto-install sonar-secrets during sonar integrate claude#114
kirill-knize-sonarsource wants to merge 2 commits intomasterfrom
feature/kk/CLI-77-auto-install-secrets-on-integrate

Conversation

@kirill-knize-sonarsource
Copy link
Member

No description provided.

@sonar-review-alpha
Copy link

sonar-review-alpha bot commented Mar 17, 2026

Summary

Removes the standalone sonar install secrets command and automatically installs sonar-secrets during sonar integrate claude. This simplifies the integration flow by making the tool installation an implicit part of the setup process rather than requiring a separate manual step.

What reviewers should know

Review focus: The core change is in src/cli/commands/integrate/claude/index.ts where performSecretInstall() is now called early in the integration workflow. The InstallSecretsOptions type and installSecrets() function still exist (in src/cli/commands/install/secrets.ts) but are no longer exposed as a CLI command—they're now only used internally. Tests have been updated to reflect this: the standalone install tests are deleted, and existing integrate tests now mock the binary as pre-installed. Two new test cases verify the auto-install behavior (downloads when missing, skips when already present). The imports in command-tree.ts have been simplified accordingly.


  • Generate Walkthrough
  • Generate Diagram

🗣️ Give feedback

@hashicorp-vault-sonar-prod
Copy link

hashicorp-vault-sonar-prod bot commented Mar 17, 2026

CLI-77

Copy link

@sonar-review-alpha sonar-review-alpha bot left a comment

Choose a reason for hiding this comment

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

Conclusion: Two real bugs introduced by the call to performSecretInstall in the integrate flow: an unhandled failure path that can block the entire integration, and a stale user-facing message that references a command that no longer exists.

🗣️ Give feedback

@kirill-knize-sonarsource kirill-knize-sonarsource force-pushed the feature/kk/CLI-77-auto-install-secrets-on-integrate branch from 1542544 to e376d65 Compare March 19, 2026 16:42
Copy link

@sonar-review-alpha sonar-review-alpha bot left a comment

Choose a reason for hiding this comment

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

Conclusion

The auto-install idea is solid, but there are two bugs that need fixing before merge: a misleading phase label and several stale error messages pointing users to a command that no longer exists.

SonarCloud recommendations

None.

SonarCloud false positives

None.

🗣️ Give feedback

@kirill-knize-sonarsource kirill-knize-sonarsource force-pushed the feature/kk/CLI-77-auto-install-secrets-on-integrate branch from fe34f23 to 8cdf293 Compare March 19, 2026 17:56
Copy link

@sonar-review-alpha sonar-review-alpha bot left a comment

Choose a reason for hiding this comment

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

Conclusion

Three of the four previously flagged issues are now resolved, but the stale sonar install secrets references remain unfixed across both install/secrets.ts and analyze/secrets.ts.

🗣️ Give feedback

@sonarqubecloud
Copy link

Copy link

@sonar-review-alpha sonar-review-alpha bot left a comment

Choose a reason for hiding this comment

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

LGTM! ✅

🗣️ Give feedback

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.

1 participant