CM-48559 - Add commit history scan and pre-commit hook for SAST#314
CM-48559 - Add commit history scan and pre-commit hook for SAST#314
Conversation
Co-authored-by: elsapet <elizabeth@cycode.com>
| return git_head_documents, pre_committed_documents, diff_documents | ||
|
|
||
|
|
||
| def parse_commit_range_sca(commit_range: str, path: str) -> tuple[Optional[str], Optional[str]]: |
There was a problem hiding this comment.
@MarshalX can we have a proper fix for this now?
The logic breaks especially when the A in A..B is a merge commit.
Using the logic implemented in SAST should be correct
My use-case is running SCA scan from CLI on a Merge Request, so A is the branch point and B is the head of the feature branch. Most of the commits in A are merge commits especially if rebased to latest
Please let me know if you require any contribution for fixing this issue or testing other usecases
There was a problem hiding this comment.
@as1605 hi! Today is my last day at Cycode. I will let my colleagues know about your message. Thank you!
There was a problem hiding this comment.
Hello @as1605.
We have noted the issue and we will work on it in the foreseeable future.
We will attempt to use the logic from SAST for SCA scans here, but we need to test it thoroughly to maintain backwards compatibility.
Notes:
code_scanner.pyfinally is easy to read)