Windows: AccessDeniedException during `codeql database create` TRAP finalization (`pools/0` move fails)
- 主要语言
- CodeQL
- 星标
- 10.1k
- 派生
- 2.1k
- 平均合并
- 2 天 15 小时
- 30 天内合并 PR
- 141
描述
**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.
贡献指南
调研方向
从 `codeql database create` 命令及其 TRAP 导入最终处理步骤开始,然后使用报告中的命令和路径,在 Windows 11 上重现移动 `pools\0` 失败的问题。JavaScript 数据库能够在没有 AccessDeniedException 的情况下成功完成最终处理,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- cli, databases, devtools
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100