Accepting configuration information from user in a CodeQL query #10307
-
Is there a way in CodeQL to get user input inside a CodeQL query (e.g. read from a configuration file)? It may required in case we want to setup a particular threshold value for a rule and seek that value from the user via a configuration file. I couldn't find a way to do it from my searches around this topic. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
(The CodeQL language does not provide any way to read files that are not included in a database as far as I'm aware) You could consider using an external string getAThreshold();
(Adapted from #9758 (comment) by @aibaars) I don't think there is currently another way besides editing the CodeQL query itself or using an |
Beta Was this translation helpful? Give feedback.
(The CodeQL language does not provide any way to read files that are not included in a database as far as I'm aware)
You could consider using an
external
predicate and supply a CSV file with the threshold value(s) for that predicate when running the query.(Adapted from #9758 (comment) by @aibaars)
I don't think there is current…