-
Notifications
You must be signed in to change notification settings - Fork 1.9k
-
Hi all.
Is there any development guidelines on how to extend Codeql for supporting other programming languages?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 8 comments 3 replies
-
Hi @ruizrube, great to hear you're interested in expanding support for CodeQL 💪 What language(s) were you interested adding support for?
We don't have super detailed documentation on how to do this, but a good start would be to read this blog post on how we do extraction for Ruby: https://github.blog/2022-02-01-code-scanning-and-ruby-turning-source-code-into-a-queryable-database/
You should be able to use the same approach with using tree-sitter to get up and running with being able to query the raw AST produced by tree-sitter. Adding AST rewrite rules to get a clean API as well as data-flow support would take some effort.
I would strongly recommend that you join the GitHub Security Lab slack (request invite here) and join the #codeql-hacking channel, which was designed with this purpose of talking about CodeQL extensions and custom extractors (and has a few more resources).
Beta Was this translation helpful? Give feedback.
All reactions
-
Beta Was this translation helpful? Give feedback.
All reactions
-
👀 1
-
Beta Was this translation helpful? Give feedback.
All reactions
-
I think all our of supported languages are able to extract XML as well (with the right commands), so yes, that should be doable 👍
Beta Was this translation helpful? Give feedback.
All reactions
-
Are there any folks who have done any work for Perl with CodeQL? I know that it's fun to poke fun at the older langauges, but there's still a significant Perl codebase out there and the SAST tool support available for Perl code is not very well maintained.
Beta Was this translation helpful? Give feedback.
All reactions
-
I deal in the world(s) of "dead languages" [How many here have done Algol, Fortran [IV and 77], Ada, or so many more].... It would be GREAT if there was some formal supported documentation as an extensibility guide/tutorial as I do not ever see if being viable for the product team(s) to invest in these areas......
Beta Was this translation helpful? Give feedback.
All reactions
-
Oh no! You have flagged Ada as "dead language" 🥺.
In fact, it is still heavily used, but, in niche sectors, with industrial secrets / defense.
I support what you say. Documentation on support for new languages would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions
-
Is there by chance a Roadmap of soon to be supported language stacks with CodeQL?
Beta Was this translation helpful? Give feedback.
All reactions
-
The public roadmap can be seen at GitHub Public Roadmap (view)
Beta Was this translation helpful? Give feedback.
All reactions
-
Beta Was this translation helpful? Give feedback.
All reactions
-
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1