-
Notifications
You must be signed in to change notification settings - Fork 6
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 not recognising IAC code #129
Comments
@akhiloscar To be able to use the CodeQL IaC Extractor, you will need to download the release archive, unzip it, and either do the following:
# same place
gh codeql resolve languages
# different place
gh codeql resolve languages --search-path ~/path/to/unzipped/archive You should see |
@GeekMasher , iac is showing up while resolving language ![]() |
@GeekMasher , If possible can you share the repo for advanced-security/iac-queries |
They are CodeQL Packs (they are public) https://github.com/orgs/advanced-security/packages?repo_name=codeql-extractor-iac You can install them using the following: gh codeql pack download advanced-security/iac-queries |
Thanks @GeekMasher , but getting cert error when downloading it |
Oh very interesting. That might be an issue with the You might have to login to github.com using |
@GeekMasher , Tried re-authenticating but facing the same error |
@akhiloscar Even more interesting. If you are using a Proxy, you might need to add your CA to the CodeQL's Java certificate store. If this fails, try cloning the repository and running the following: gh codeql pack install ./ql/src This will install the pack manually from the source code (will compile so might take 1-2mins). You might need to checkout a particular tag as I seem to have broken main in the latest commit 🤔 |
@GeekMasher , Installed advanced queries/iac using "gh codeql pack install ./ql/src" but it seems like missing linux64/extractor directory when tried to initialise database root@test-linux-01-IAC-POC:/home/adminuser/iac-codeql# gh codeql database create db1 --language=iac --source-root=/home/adminuser/iac-codeql Initializing database at /home/adminuser/iac-codeql/db1. root@test-linux-01-IAC-POC:/home/adminuser/iac-codeql# cd /root/.local/share/gh/extensions/gh-codeql/dist/release/v2.16.5/codeql-extractor-iac/tools/ root@test-linux-01-IAC-POC:~/.local/share/gh/extensions/gh-codeql/dist/release/v2.16.5/codeql-extractor-iac/tools# ls |
@akhiloscar Sorry for the delay. I found out what the issue is. When scanning configuration files, the extractor expects at least 1 HCL file (this is the main language supported). You can fix this but running a |
What happened?
I tried to initialise database for an iac code but it is not recognising the files eventhough there are .tf files within the directory
Version
0.1.0
Relevant log output
The text was updated successfully, but these errors were encountered: