CodeQL detected code written in `some language`, but not any written in GitHub Actions. Confirm that there is some source code for GitHub Actions in the project.
- Ngôn ngữ chính
- CodeQL
- Star
- 10.1k
- Fork
- 2.1k
- Merge trung bình
- 2 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 141
Mô tả
While investigating another problem involving CodeQL, I switched from the default setup to the advanced setup. This resulted in the creation of a [`.github/workflows/codeql.yml`](https://github.com/user-attachments/files/21353129/codeql.yml.txt).
Later, I switched back to the default setup, but found it impossible to push a commit that removed the `codeql.yml` because
> Error: Encountered a fatal error while running "/opt/hostedtoolcache/CodeQL/2.22.1/x64/codeql/codeql database finalize --finalize-dataset --threads=8 --ram=29878 /home/runner/work/_temp/codeql_databases/actions". Exit code was 32 and last log line was: CodeQL detected code written in JavaScript/TypeScript, but not any written in GitHub Actions. Confirm that there is some source code for GitHub Actions in the project. For more information, review our troubleshooting guide at https://gh.io/troubleshooting-code-scanning/no-source-code-seen-during-build . See the logs for more details.
Look, I don't want to confirm that there is some source code for GitHub Actions. I want to reassure CodeQL that there is no source code for GitHub Actions and everything is A-OK. Based on the troubleshooting guide, I set `strategy.matrix.language` to `['javascript-typescript']`, but of course this had no effect because CodeQL was now operating in default mode and ignoring the configuration.
Switching back to advanced mode should work, right? Nope, it tried to create another `codeql.yml`, and that failed because
> There was an error committing your changes: A file with the same name already exists. Please choose a different name and try again.
Now CodeQL is not working at all, so there's no way to merge anything into the main branch.
What's the right way to remove `codeql.yml` and reset CodeQL to default mode? How would one rescue this seemingly broken CodeQL setup?
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu với .github/workflows/codeql.yml được đính kèm và so sánh nó với thiết lập CodeQL mặc định và nâng cao hiện tại của repository. Đọc hướng dẫn khắc phục sự cố CodeQL được liên kết và kiểm tra các log của workflow để hiểu tại sao cơ sở dữ liệu actions vẫn đang được hoàn tất. Công việc được xem là hoàn tất khi CodeQL được khôi phục về thiết lập dự kiến và nhánh main có thể merge mà không gặp lỗi này.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- github-actions, yaml
- Lĩnh vực
- ci-cd, security
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100