-
Notifications
You must be signed in to change notification settings - Fork 19
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
fix: semgrep installation + runtime arguments now work #94
Conversation
src/configs/sastconfig.c4m
Outdated
func find_semgrep(ignore) { | ||
result := find_exe("semgrep", []) | ||
semgrep_path := "/tmp/semgrep.env/bin/semgrep" | ||
result := find_exe(semgrep_path, []) |
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.
find_exe() IIRC searches the $PATH too, even if you call it with a full path. I don't know why we'd prioritize looking in /tmp if it's already installed on the system??
I guess if we don't like the version installed?
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.
mixed up the argument order here which should be fixed now, but yes we want to ensure we have the right version
return true | ||
|
||
trace("semgrep could not be installed") | ||
return false | ||
} | ||
|
||
func get_semgrep_args(artifact) { |
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.
Since we're touching this stuff should we make it more configurable? Tho I guess a semgrep component might be better for that?
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.
I think a separate pr for that would be best
Issue
closes #92
Description
find_semgrep
so semgrep can be found even if it's not in $PATHon
to work withconfig=auto
Testing
tests need to be added to ensure that semgrep run returns correct sast json: #95