-
Notifications
You must be signed in to change notification settings - Fork 59
CM-48559 - Add commit history scan and pre-commit hook for SAST #314
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
Conversation
Co-authored-by: elsapet <[email protected]>
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)