-
Notifications
You must be signed in to change notification settings - Fork 1
Pluto 1390 semgrep installation and running #73
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
Pluto 1390 semgrep installation and running #73
Conversation
- Updated semgrep version in codacy.yaml from 1.33.2 to 1.78.0. - Added semgrep to the list of supported tools in tool-utils_test.go. - Implemented RunSemgrep function in semgrepRunner.go to execute Semgrep analysis. - Created tests for Semgrep functionality in semgrepRunner_test.go. - Added sample JavaScript file and expected SARIF output for testing.
- Implemented logic to check for the existence of a custom Semgrep configuration file (.semgrep.yml) and use it if available. - Default to using the 'auto' configuration only if no custom config file is found.
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferences |
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.
Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.
Files not reviewed (1)
- tools/testdata/repositories/semgrep/expected.sarif: Language not supported
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.
Minor comments, LGMT!
tools/semgrepRunner.go
Outdated
} | ||
|
||
// Check if a config file exists in the expected location and use it if present | ||
if configFile, exists := ConfigFileExists(config.Config, ".semgrep.yml"); exists { |
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.
While we improve this to rely on the API info, do you want to update this to receive a list of file config names?
configurationFilenames: [
".semgrep.yaml",
".semgrep.yml"
],
Just to check for the .yaml and .yml to avoid problems
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.
done, AI did this ...
version which is okish I think
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.
lgtm
config init will be added in another PR