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. |
Answered by
intrigus-lgtm
Sep 6, 2022
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 |
3 replies
Answer selected by
r4k3-sh
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(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
externalpredicate 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…