-
Notifications
You must be signed in to change notification settings - Fork 509
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
Does not detect use of CodeQL (SAST) #3817
Comments
The CodeQL detection can work without a workflow file, depending on if it still runs the scan on the PR. Right now the code:
It seems like the CodeQL runs in your repo, take place once the commits are pushed to |
Ok thanks for the explanation, strange thing is there are PRs, example: secureIO-GmbH/VulnerabilityHeatmap#11 If the other issues already address this, feel free to close here. |
Specifically it evaluates the last 30 commits in main, and the PRs which they came from. Since that PR is still open, it's not being considered. |
For GitHub+CodeQL specifically, I think scorecard could also consider this API endpoint: https://docs.github.com/en/rest/code-scanning/code-scanning?apiVersion=2022-11-28#get-a-code-scanning-default-setup-configuration--status-codes The downside is that it needs Disabled:{
"state": "not-configured",
"languages": [
],
"query_suite": "default",
"updated_at": null,
"schedule": null
} Enabled:{
"state": "configured",
"languages": [
"ruby"
],
"query_suite": "default",
"updated_at": "2024-04-15T14:22:53Z",
"schedule": "weekly"
} |
As @thepwagner mentioned, GitHub also has an API that lists Actions workflows that have run on the repository. This includes dynamic workflows like the default setup workflow for CodeQL. Here's an example from a test repo of mine, which lists both the CodeQL and Dependabot updates workflows (slightly redacted). The path for those workflows is consistent and you can count on that as an indicator that the analysis is enabled. {
"total_count": 2,
"workflows": [
{
"id": ...,
"node_id": "...",
"name": "Dependabot Updates",
"path": "dynamic/dependabot/dependabot-updates",
"state": "active",
"created_at": "2024-05-01T10:10:17.000-07:00",
"updated_at": "2024-05-01T10:10:17.000-07:00",
"url": "...",
"html_url": "...",
"badge_url": "..."
},
{
"id": ...,
"node_id": "...",
"name": "CodeQL",
"path": "dynamic/github-code-scanning/codeql",
"state": "active",
"created_at": "2024-01-23T09:14:42.000-08:00",
"updated_at": "2024-01-23T09:14:42.000-08:00",
"url": "...",
"html_url": "...",
"badge_url": "..."
}
]
} |
Describe the bug
This repo is using CodeQL for SAST scanning:
https://github.com/secureIO-GmbH/VulnerabilityHeatmap/actions/workflows/github-code-scanning/codeql
Reproduction steps
Steps to reproduce the behavior:
1.
Expected behavior
Docs say:
Maybe it is missing to detect the direct actions? (without a workflow file?)
Am I doing smt wrong?
The text was updated successfully, but these errors were encountered: