github / github/codeql-cli-binaries
Running CodeQL within a Flask server silently interrupts connection
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 1k
- Fork
- 184
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
I have extended the [official CodeQL container](https://github.com/microsoft/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:
```python
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!
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Riproduci la richiesta Flask usando i tre comandi CodeQL CLI, in particolare database analyze, e ispeziona la chiamata Python execute_codeql_command e la gestione del relativo output. Confronta analyze con database create e database upgrade per isolare il motivo per cui il client non riceve alcuna risposta; il lavoro è completo quando l’interruzione è stata identificata e l’integrazione è stata documentata o corretta.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- docker, flask, python
- Ambito
- backend, cli, security
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100