Skip to content
Discussion options

You must be logged in to vote

Hi @Lslightly 👋🏻

I notice the --external option, but I don't know how to use it. So I'm asking here.

A relatively minimal example of how to use this feature is the following. In your query, you define the external predicate and use it (named foo here):

external predicate foo(string bar, string baz);

from string a, string b
where foo(a, b)
select a, b

You then create a CSV file with rows for the external predicate, with one column for each parameter. Let's call the following test.csv:

hello, world
goodbye, universe

Now you can run the query with codeql query run path-to-your-query.ql --external=foo=test.csv where foo is the name of the external predicate and test.csv the name of the CS…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Lslightly
Comment options

Answer selected by Lslightly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants