-
Notifications
You must be signed in to change notification settings - Fork 330
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
The repo on which this action is running is not opted-in to CodeQL code scanning. #416
Comments
Hi @wsugarman Apologize for the inconvenience. This might be related to https://www.githubstatus.com/incidents/d24w1hd9cc8x; could you please let us know if this happens again? Thanks |
Hey there, I'm experiencing this two, in multiple repos. Examples: |
Oh, just merged another PR and it's building fine now! 🎉 |
Thanks @hvitved I haven't seen the issue again so far. If I don't see it today, I'll close the issue and continue to monitor. Thanks again! |
I experienced the same issues across several of my repositories two days ago, and again ~1hr ago. I re-ran the action a few minutes ago and it appears to be working okay again. |
Nothing much to add but I've opened an issue internally so this will get investigated at some point. If the same workflow is working sometimes and not working other times on the same repository, then it seems like an intermittent internal bug or race condition. |
Thanks! I am also continuing to see this issue intermittently |
@robertbrignull is it known if more repros are needed? Any eta? Our latest hit - https://github.com/microsoft/dicom-server/runs/2124256428 |
@KnicKnic, thanks for the link. We're looking into it now. Shouldn't need any more explicit links as we should be able to find them from our side. |
In #424 we changed the error messages so that the errors are more explicit. |
Worth noting that the above change won't stop the error happening, so don't be alarmed if it still does. It's just the error message will not be incorrect anymore. We're still working on the lower level fix. |
Is there any workaround to this issue? |
This happens for me a while ago, now it's showing |
The change in error message is expected and it's now showing a more correct error. The repository is still enrolled in code scanning, but there's another bug that has happened. What's actually going on here is that workflows run on branches or pull requests made by dependabot only receive a token with read access by default. This is causing code scanning workflows to fail because they require the We are working to find an easy and secure way around this so that code scanning works by default when used alongside dependabot. In the meantime it appears if you retry one of these failed analyses then the new workflow run will be given write access so it will succeed. So if you do need the results from that analysis you can retry the workflow run and it should succeed then. |
We have now worked out precisely what the problem is and what can be done about it. Unfortunately we can't easily or safely make the existing workflows work, however there are simple workarounds that'll let you still get code scanning results in all cases. What is the problemA recent change to dependabot means that workflows triggered by dependabot run with read-only permissions as if they were run from a fork. Unfortunately this has impacted code scanning workflows that run on Code scanning workflows that run on the Unfortunately pretty much the only thing we can do is to change the error message to be more clear what's going on. In #435 the error message will change to explain the problem and link to some documentation. That change will go live next week. Unfortunately an error message like that is not enough space to explain it fully, so we will also publish a more detailed explanation in the documentation and link to that once it's available. Only use the
|
For further details visit: github/codeql-action#416 Signed-off-by: Alex Szakaly <[email protected]>
I'm going to tentatively close this issue as we've done as much of a fix as we can for now and the above comment explains the context and workarounds. |
(Maybe leave this open until documentation is updated? it took awhile to find this since the error message points to documentation that doesn't mention this problem or how to fix it while still using dependabot. The error message is especially missing details wrt to |
I think pinning this issue would make more sense |
See: https://github.com/scality/changelog-binder/runs/2744790882#step:3:9 See: https://github.com/scality/changelog-binder/runs/2744790882#step:3:56 See: https://docs.github.com/en/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#scanning-on-push See: github/codeql-action#416 (comment)
Some official docs on this issue are now available at https://docs.github.com/en/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/troubleshooting-the-codeql-workflow#error-403-resource-not-accessible-by-integration-when-using-dependabot |
Hi,
Our repository microsoft/dicom-server has code scanning alerts enabled with a CodeQL job that looks over both our C# and Javascript code. However, occasionally our CI and PR CodeQL actions will fail with the error: "The repo on which this action is running is not opted-in to CodeQL code scanning."
This is clearly not the case, as it succeeds most of the time. Is something misconfigured on our end, or is there an issue with the CodeQL action?
Example: https://github.com/microsoft/dicom-server/actions/runs/636934044
The text was updated successfully, but these errors were encountered: