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

Running CodeQL within a Flask server silently interrupts connection #132

Open
cmcdougall opened this issue Sep 5, 2022 · 0 comments
Open
Labels

Comments

@cmcdougall
Copy link

I have extended the official CodeQL container to run CodeQL analysis during a Python Flask HTTP request.

Throughout the request, three codeql CLI commands are executed:

codeql database create
codeql database upgrade
codeql database analyze

create and upgrade do not interrupt the connection, but I find that when the analyze command occurs, Flask will respond as normal but the client never receives the response. Leading me to believe something within the analyze command is silently interrupting the connection.

The python code I'm using uses the Python code found in the official CodeQL Docker container. Here is the code I'm running within the request:

database_update_command = f"database upgrade {database_directory}"
database_analyze_command = f"database analyze {database_directory} --threads=0 --format=sarifv2.1.0 --output=output.json {database_lang}-security-and-quality.qls"
run_result = self.codeql.execute_codeql_command(
    database_update_command)
run_result = self.codeql.execute_codeql_command(
    database_analyze_command)

Any help would be appreciated!

@github-actions github-actions bot added the CLI label Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant