-
Notifications
You must be signed in to change notification settings - Fork 1.9k
How to Continuously Install or Update CodeQL Coding Standards Query Packs Automatically? #19513
-
Hello,
I have previously installed the CodeQL Coding Standards using the .zip release artifacts for analyzing an open-source codebase which is on C. This method works, but it requires manually downloading and unpacking new releases every time there's an update.
Now, I want to transition to a setup where I receive the latest updates to the Coding Standards query packs automatically, without manual intervention. Ideally, I'd like to use the codeql pack download command or any other mechanism that allows continuous updating of the latest versions when they are released.
I referred this doc for the installation
Could you please guide me on:
- The mechanism that allows for continuous updating of the latest versions when they are released.
- The recommended way to keep the installed query packs up-to-date?
Thank you for your help
Beta Was this translation helpful? Give feedback.
All reactions
Hi @Beeram12, our documentations don't say this but the @version part of the command to download the pack is optional. When not provided, it will install the latest!
So, if you have a script that runs
codeql database analyze ... codeql/cert-cpp-coding-standards
Then you can change that to run the update immediately beforehand:
codeql pack download codeql/cert-cpp-coding-standards
codeql database analyze ... codeql/cert-cpp-coding-standards
Or you can run the update on any other schedule that you prefer!
Let me know if that answers your question!
Replies: 2 comments
-
Hi @Beeram12, our documentations don't say this but the @version part of the command to download the pack is optional. When not provided, it will install the latest!
So, if you have a script that runs
codeql database analyze ... codeql/cert-cpp-coding-standards
Then you can change that to run the update immediately beforehand:
codeql pack download codeql/cert-cpp-coding-standards
codeql database analyze ... codeql/cert-cpp-coding-standards
Or you can run the update on any other schedule that you prefer!
Let me know if that answers your question!
Beta Was this translation helpful? Give feedback.
All reactions
-
So it states that using codeql pack download codeql/cert-cpp-coding-standards downloads the CodeQL with the latest updates instead of using .zip files every time?
If that's the case, it would be very helpful while automating the installation and updating the tool using the command rather than installing it through the .zip method.
Great, Thank You
Beta Was this translation helpful? Give feedback.