Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

codeql-action/init should explicitly delete an already present database (for self-hosted runners)

未关闭
#1,722 7 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
github-actions, typescript
领域
ci-cd, devops, security

调研方向

从 codeql-action/init 入口开始,跟踪 --overwrite 选项如何处理已报告的 database,init 调用中显示的数据库路径。如果可能,请在 self-hosted runner 上重现失败,并确定会触发该失败的现有目录条件。完成标准是 init 能够处理报告中的 workspace,而无需外部清理步骤,并且已针对所描述的场景验证其行为。

由索引模型根据 Issue 内容生成。

描述

enhancement

We are running CodeQL as an action on self-hosted runners and have enabled the 'over-write' option to clean the CodeQL database before each run.

However, some environments fail with the following message:

Failure invoking /__w/_tool/CodeQL/2.13.3-20230524/x64/codeql/codeql with arguments database,init,--db-cluster,/__w/_temp/codeql_databases,--source-root=/__w/a1_aggregation_mtf/a1_aggregation_mtf,--language=java,--begin-tracing,--trace-process-name=Runner.Worker.exe,--codescanning-config=/__w/_temp/user-config.yaml,--overwrite.
 
       Exit code 2 and error was:

       A fatal error occurred: Ran with database overwriting enabled, but the directory does not appear to be a CodeQL database or database cluster. Please check you do indeed wish to delete it, and do so manually.

As suggested in the error message, we can manually delete the directory, allowing for a successful run.

We do not understand what is causing CodeQL to believe the directory is not a CodeQL database. We are not explicitly altering the contents or structure. As the directories involved are created by CodeQL within the workflow, the hope is to have CodeQL able to clean up it's workspace from within the workflow as well.

Ideally, we want to avoid having to implement an external cleanup step for the process.

We are curious to see what logic is being used to determine the 'CodeQL database' status of the targeted directory.

Regards,
Richard Seeton

主要语言
TypeScript
星标
1.6k
派生
493
平均合并
1 天 13 小时
30 天内合并 PR
44

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

github/codeql-action 的其他 Issue

查看 github/codeql-action 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。