github / github/codeql

Windows: AccessDeniedException during `codeql database create` TRAP finalization (`pools/0` move fails)

Ouverte
#19,438 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
CodeQL
Étoiles
10.1k
Forks
2.1k
Merge moyen
2 j 15 h
PR mergées (30 j)
141

Description

**Title:**
**Windows: AccessDeniedException during `codeql database create` TRAP finalization (`pools/0` move fails)**

**Description:**

**❗ Summary**
On Windows 11, running `codeql database create` for a JavaScript project fails during TRAP import finalization with an `AccessDeniedException`. This occurs when attempting to move the final TRAP string pool into `pools\0`.

This happens even when:
- Using a short path (e.g. `C:\github\glob-ghas`)
- Running in an elevated PowerShell session
- Closing VS Code and other editors
- Disabling Windows Defender and indexing
- Running `codeql` from CLI (not extension)

**💻 Environment**
- OS: Windows 11 Pro (Build 26100+)
- CodeQL CLI version: 2.21.1
- Installed at: `C:\tools\codeql`
- Language: JavaScript
- Command:
`codeql database create my-db --language=javascript --source-root=. --overwrite`

**📄 Observed Output**
```
Finalizing database at C:\github\glob-ghas\my-db.
Running TRAP import for CodeQL database at C:\github\glob-ghas\my-db...
Importing TRAP files
Merging relations
A fatal error occurred: Failed to move pool from C:\github\glob-ghas\my-db\db-javascript\default\strings\0 to C:\github\glob-ghas\my-db\db-javascript\default\pools\0
(eventual cause: AccessDeniedException ...)
```

**🔄 Steps to Reproduce**
1. Create a minimal JS repo under `C:\github\glob-ghas`
2. Run the CLI command above
3. Observe failure during TRAP finalization

**✅ What I've Already Tried**
- Using short paths (`C:\github`)
- Deleting the target DB folder before each run
- Disabling antivirus and indexing services
- Running with `--no-autobuild`
- Setting TEMP to `C:\codeql-temp`
- Confirmed no VS Code or Language Server processes active

**📌 Expected Behavior**
The database should finalize cleanly without permission errors, especially in an elevated shell with a clean local path.

**🧩 Additional Help**
Happy to provide a zipped repro repo with dummy JavaScript files and a test script upon request.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Start with the `codeql database create` command and its TRAP import finalization step, then reproduce the `pools\0` move failure on Windows 11 using the command and paths in the report. Done means the JavaScript database finalizes successfully without an AccessDeniedException.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
javascript
Domaine
cli, databases, devtools
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.