CLI-9 integrate pre commit hook#99
Conversation
ca83232 to
b44e384
Compare
b44e384 to
c68d27d
Compare
be1ea58 to
4ea863a
Compare
f7aee28 to
fc08790
Compare
be1d6b8 to
27ce37f
Compare
3ba842d to
1b5f707
Compare
cefb202 to
cea4744
Compare
cea4744 to
386b586
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 16 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
bd50c6b to
f6ed4f9
Compare
da7cfc9 to
dcd6d4a
Compare
SummaryThis PR adds a new
The implementation reuses existing secret-scanning logic, adds comprehensive test coverage (integration + unit tests), and updates CI/CD to install libsecret dependency on Linux. What reviewers should knowStart here:
Hook installation strategies (review in order of implementation complexity):
Key decisions to watch:
Test coverage:
Gotchas:
|
22d8634 to
b56dff3
Compare
There was a problem hiding this comment.
Conclusion: The production-code fix for the global-cancellation exit-code bug is correct, but the test rewrite in this commit is broken — it silently discards the assertion and always passes. That needs to be corrected before merge. The shell-fragments duplication flagged in the previous review also remains open.
damien-urruty-sonarsource
left a comment
There was a problem hiding this comment.
A first round of comments, I will try the feature now
269b8e4 to
d44fbcc
Compare
There was a problem hiding this comment.
Conclusion: Two of the three previously flagged issues remain unaddressed — the broken test that never evaluates its assertion, and the shell-fragment logic duplication. The cancellation exit-code fix is in.
SonarCloud recommendations: The token at index.ts:154 (sqp_b4556a16fa2d28519d2451a911d2e073024010bc) is intentionally embedded as example content to help users verify the hook, so SonarCloud is technically right to flag its format — but the concern here is whether this token was ever live. If it was generated from a real SonarQube instance, it must be revoked before this PR merges. If it was hand-crafted to look realistic, a comment on the constant saying so would both document intent and allow SonarCloud to be silenced as a false positive.
d44fbcc to
bf737d0
Compare
There was a problem hiding this comment.
Conclusion: The two issues from the previous review cycle remain unaddressed, and there is one additional broken test in the same describe block.
SonarCloud false positives: Both BLOCKERs flagging VERIFY_SECRET_CONTENT at src/cli/commands/integrate/git/index.ts:154 (AZz8eIuNoQXjdzAOWUm_ and AZzhihFTz7LVxbNF1k5G) are false positives. The sqp_b4556a16... string is a deliberately synthetic token used in the verification guide so users can confirm the hook catches secrets. It is not a real credential — dismiss both in SonarCloud.
bf737d0 to
598fceb
Compare
There was a problem hiding this comment.
Conclusion: Solid implementation overall — the framework detection and three-path install strategy (pre-commit, Husky, raw git hooks) are well-structured and the test coverage looks thorough. Two logic duplication issues need fixing before merge.
SonarCloud recommendations: Even though index.ts:154 and index.ts are not failing the quality gate, I strongly recommend fixing them because VERIFY_SECRET_CONTENT embeds sqp_b4556a16fa2d28519d2451a911d2e073024010bc — a string that matches the real SonarQube token format. If this value was ever a real token it must be revoked immediately. Even if it was generated purely for this demo, shipping it in source means every downstream clone will contain it, and tools like truffleHog or GitHub secret scanning will flag it in perpetuity. Replace it with a clearly non-scannable placeholder (e.g. sqp_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX) or instruct the verification guide to generate the test file at runtime.
598fceb to
1281605
Compare
1281605 to
eac5d17
Compare
SonarQube reviewer guide
|




No description provided.