-
Notifications
You must be signed in to change notification settings - Fork 443
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
Add CodeQL Security Scan #770
Conversation
Codecov Report
@@ Coverage Diff @@
## main #770 +/- ##
=======================================
Coverage 95.95% 95.95%
=======================================
Files 176 176
Lines 7172 7172
=======================================
Hits 6882 6882
Misses 290 290 |
rename workflow update changelog update format update format
@KKelvinLo - could you please take a look why the check hasn't been showing in the list of successful checks? You may want to adjust the template a bit for the results to show under the Template that's been missing the setup parts: |
Maybe it's all good already. Perhaps it'd show the results after merge?... 🤷 |
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.
Thank you for adding this. Will the CodeQL workflow fails if there are any security vulnerabilities, or it just uploads the result somewhere and we need to periodically keep checking it?
@@ -0,0 +1,36 @@ | |||
name: "CodeQL Code Scan" |
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.
name: "CodeQL Code Scan" | |
name: "CodeQL" |
That should show the code scan result under Security
tab?
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.
Yep it if is enabled in the security tab, the action will post to the alerts
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.
Do we need to click on that in the Security
tab or do we need to rename it to CodeQL
?
This workflow will post the results under the security tab, the workflow will pass |
It should be good now - changed it from a cron schedule to on pull request and on push |
It got crashed on recursive submodules?! 😀 I guess we need to exclude |
😀 @KKelvinLo can you please exclude the third-party directories. Let's make sure the workflow is robust. Thanks! Thanks @maxgolov @ThomsonTan @lalitb for reviewing and merging! |
After digging through GitHub Actions documentation it doesn't look like there's an explicit exclude directory option, so I added a bash command to remove the third_party directory after checking out the code. |
Thanks. Instead of removing the |
Rebased! |
Motivation
This PR is a follow-up to issue open-telemetry/oteps#144
CodeQL is GitHub's static analysis engine which scans repos for security vulnerabilities. As the project grows and we near GA it might be useful to have a workflow which checks for security vulnerabilities to ensure that every incremental change is following best development practices. Also passing basic security checks will also make sure that there aren't any glaring issues for our users.
Changes
Workflow Triggers
CHANGELOG.md
updated for non-trivial changes