-
Notifications
You must be signed in to change notification settings - Fork 351
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
CodeQL won't run locally using act
#967
Comments
Unfortunately, the PR you linked to had to be reverted since it was too hard to maintain. The codeql-action will not work as a local action through |
@katelovescode Try this: act -s GITHUB_TOKEN=PAT_HERE --env GITHUB_RUN_ID=13371337 Except replace GITHUB_RUN_ID with a recent run ID, and insert a personal access token. You'll run into this though:
|
@katelovescode Did you manage to fix this? |
@Perdiga, no. Using |
Hi I'm creating a repository to help me solve problems in some projects that use CodeQL. codeql_troubleshoot_container I can execute some parts of the action, but in the last part it fails. Is there anything I can do to help make the action fully available? |
There's nothing that would be easy. There are certain internal APIs that the codeql-action uses that require a PAT generated by the actions runtime. Any attempt to run the codeql-action (in If you forked the codeql-action and made sure to avoid making API calls to github.com (eg- to upload telemetry or to upload SARIF), you might be able to avoid the errors. But this would be quite a hack. |
Even with GITHUB_TOKEN I am getting errors when it tries to upload the sarif file :( I am ok with not avoiding the telemetry or upload calls because what matters to me is that locally runs faster than waiting for the action to run |
As I mentioned, you cannot run the action outside of the actions runtime since it will fail for these specific API calls. A token generated by you will not work. It must be generated by github.com in the context of an action run. |
I get an HttpError when I run CodeQl locally using
act
. I opened an issue onact
and was pointed to this PR: #117 but adding the environment variable to the .env or to the workflow file isn't working for me, I still get the HttpError.Output:
command:
workflow file:
The text was updated successfully, but these errors were encountered: