github / github/codeql-cli-binaries
Running CodeQL within a Flask server silently interrupts connection
- Vorherrschende Sprache
- Keine Sprachdaten
- Sterne
- 1k
- Forks
- 184
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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!
Beitragsleitfaden
Rechercherichtung
Reproduziere die Flask-Anfrage mit den drei CodeQL CLI-Befehlen, insbesondere database analyze, und untersuche den Python-Aufruf execute_codeql_command sowie die Verarbeitung seiner Ausgabe. Vergleiche analyze mit database create und database upgrade, um einzugrenzen, warum der Client keine Antwort erhält; abgeschlossen ist die Aufgabe, wenn die Unterbrechung identifiziert und die Integration dokumentiert oder behoben wurde.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- docker, flask, python
- Bereich
- backend, cli, security
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100