-
Notifications
You must be signed in to change notification settings - Fork 674
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 workflow #1721
Add CodeQL workflow #1721
Conversation
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
@jorgectf Thanks for starting us on this! I took a brief look at the scan output and notices some things that I'd like to make sure we're able to do before moving forward on the PR. I tried to look for answers in the docs, but didn't see how to make the appropriate configurations, so I'm coming back to you.
|
What do we gain here over Sonatype Lift? We are already using Lift, which is a PR based workflow to existing static analyzers like Errorprone, FindSecBugs, and Infer. https://help.sonatype.com/lift/configuring-lift |
# The branches below must be a subset of the branches above | ||
branches: [ 'main' ] | ||
schedule: | ||
- cron: '27 21 * * 4' |
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.
Why does this need to be a cron job?
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.
CodeQL libraries and queries are open-sourced in https://github.com/github/codeql. They are heavily contributed to by CodeQL engineers and the security/development community. By running CodeQL weekly, we make sure you have the most up-to-date alerts in the Security tab regardless when the last change was made to Solr.
You can use
That is what we call "Sanitizers". You are welcome to contribute to https://github.com/github/codeql or open a False Positive Issue so we can take a look and improve the query!
That would be technically possible, but not comfortable for the PR author IMO. The pull request alerts should be easily actionable so the author knows what to do, and when they succeeded fixing the alert.
The alerts will be visible in the |
@dsmiley I think this produces a different set of results than our other scanning tools. At least, it produces results that I have not personally reviewed before. It took a bit of work to figure out, but you can preview what CodeQL would generate over at https://github.com/apache/solr/security/code-scanning?query=is%3Aopen+branch%3Amain+pr%3A1721 |
@dsmiley Also relevant, I just saw that Lift is going away, so we'll need some replacement anyway. |
FYI I requested removal of Lift https://issues.apache.org/jira/browse/INFRA-24802 |
I merged main into this to get the latest results. |
This PR had no visible activity in the past 60 days, labeling it as stale. Any new activity will remove the stale label. To attract more reviewers, please tag someone or notify the [email protected] mailing list. Thank you for your contribution! |
This PR is now closed due to 60 days of inactivity after being marked as stale. Re-opening this PR is still possible, in which case it will be marked as active again. |
Hello from GitHub Security Lab!
Your repository is critical to the security of the Open Source Software (OSS) ecosystem and as part of our mission to make OSS safer, we are contributing a CodeQL configuration for code scanning to your repository. By enabling code scanning with CodeQL, you will be able to continuously analyze your code and surface potential vulnerabilities before they can even reach your codebase. In fact, you may have seen some alerts already appearing on this pull request!
We’ve tested the configuration manually before opening this pull request and adjusted it to the needs of your particular repository, but feel free to tweak it further! Check this page for detailed documentation.
Questions? Check out the FAQ below!
FAQ
Click here to expand the FAQ section
How often will the code scanning analysis run?
By default, code scanning will trigger a scan with the CodeQL engine on the following events:
What will this cost?
Nothing! The CodeQL engine will run inside GitHub Actions, making use of your unlimited free compute minutes for public repositories.
What types of problems does CodeQL find?
By default, code scanning runs the
default
query suite.How do I upgrade my CodeQL engine?
No need! New versions of the CodeQL analysis are constantly deployed on GitHub.com; your repository will automatically benefit from the most recently released version.
The analysis doesn’t seem to be working
If you get an error in GitHub Actions that indicates that CodeQL wasn’t able to analyze your code, please follow the instructions here to debug the analysis.
Which source code hosting platforms does code scanning support?
GitHub code scanning is deeply integrated within GitHub itself. If you’d like to scan source code that is hosted elsewhere, we suggest that you create a mirror of that code on GitHub.