Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java/ql/src/Security/CWE/CWE-020/ExternalAPIsUsedWithUntrustedData.ql. Error was: Unknown kind "Table" when converting to analysis model. [UNSUPPORTED_KIND] #7494

Closed
hktalent opened this issue Dec 31, 2021 · 2 comments
Labels
acknowledged GitHub staff acknowledges this issue awaiting-response The CodeQL team is awaiting further input or clarification from the original reporter of this issue.

Comments

@hktalent
Copy link

codeql database analyze --threads 16 ./java-database ~/MyWork/codeql/java/ql/src/Security/CWE --format=csv --output=java-results.csv 
......
[80/81] No need to rerun /Users/51pwn/MyWork/codeql/java/ql/src/Security/CWE/CWE-079/XSS.ql.
[81/81] No need to rerun /Users/51pwn/MyWork/codeql/java/ql/src/Security/CWE/CWE-079/XSSLocal.ql.
Shutting down query evaluator.
Interpreting results.
A fatal error occurred: Could not process query metadata for /Users/51pwn/MyWork/codeql/java/ql/src/Security/CWE/CWE-020/ExternalAPIsUsedWithUntrustedData.ql.
Error was: Unknown kind "Table" when converting to analysis model. [UNSUPPORTED_KIND]


but

codeql database analyze --threads 16 ./java-database ~/MyWork/codeql/java/ql/src/experimental/Security/CWE --format=csv --output=java-results.csv


is ok
@hktalent hktalent added the question Further information is requested label Dec 31, 2021
@edoardopirovano
Copy link
Contributor

Greetings, many thanks for getting is touch with this question. Indeed the query ExternalAPIsUsedWithUntrustedData.ql is not intended to be run directly with database analyze since it does not produce a set of results within your code but rather produces a table of information. Queries like that are internal queries that we use for certain analytics rather than ones that are useful to you to find results within your code.

Running queries by specifying large directories as you have done is not a recommended way of choosing what queries to run as you are likely to pick up queries like the one above that do not produce desirable results. Instead, I would recommend that you run one of the built-in query suites, such as java-security-and-quality.qls or java-security-extended.qls. Your invocation would look something like this:

codeql database analyze --threads 16 ./java-database java-security-and-quality.qls --format=csv --output=java-results.csv

I hope the above information is helpful to you, and do let me know if we can be of further assistance!

@edoardopirovano edoardopirovano added acknowledged GitHub staff acknowledges this issue awaiting-response The CodeQL team is awaiting further input or clarification from the original reporter of this issue. and removed question Further information is requested labels Dec 31, 2021
@hktalent
Copy link
Author

hktalent commented Jan 1, 2022

@edoardopirovano thanks
codeql database analyze --threads 16 ./java-database /Users/51pwn/MyWork/codeql/java/ql/src/Security/CWE/CWE-020/ExternalAPIsUsedWithUntrustedData.ql --format=csv --output=java-results.csv
Running queries.
[1/1] No need to rerun /Users/51pwn/MyWork/codeql/java/ql/src/Security/CWE/CWE-020/ExternalAPIsUsedWithUntrustedData.ql.
Shutting down query evaluator.
Interpreting results.
A fatal error occurred: Could not process query metadata for /Users/51pwn/MyWork/codeql/java/ql/src/Security/CWE/CWE-020/ExternalAPIsUsedWithUntrustedData.ql.
Error was: Unknown kind "Table" when converting to analysis model. [UNSUPPORTED_KIND]

@hktalent hktalent closed this as completed Jan 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acknowledged GitHub staff acknowledges this issue awaiting-response The CodeQL team is awaiting further input or clarification from the original reporter of this issue.
Projects
None yet
Development

No branches or pull requests

2 participants