Unable to run custom queries against GitHub Actions
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Bắt đầu bằng cách so sánh các lệnh CodeQL độc lập với lệnh gọi GitHub Actions và cấu hình codescanning được tạo. Kiểm tra actions-queries/pull_request_target.ql và workflow được hiển thị trong pull request được liên kết, sau đó chạy lại workflow sau khi xác định lý do không có truy vấn Actions nào được định nghĩa. Được xem là hoàn tất khi truy vấn tùy chỉnh chạy thông qua Actions mà không gặp lỗi fatal.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I've been trying to use codeql to check my GitHub Actions workflows. I've got it kinda working here:
https://github.com/billnapier/github-actions-check-workflow/pulls
I can test things, and when I run codeql standalone, stuff works just fine:
codeql database create --force-overwrite --db-cluster /workspaces/c
--source-root=/workspaces/github-actions-check-workflow --calculate-language-specific-baseline --extractor-include-aliases --sublanguage-file-
coverage --language=actions --search-path /workspaces/codeql-action --build-mode=none
and then run the query:
codeql query run --database /workspaces/c/actions -- actions-queries/pull_request_target.ql
So my query is well formed, and I can generate the DB. But when I try and run it via Actions, I get this output instead (also in the PR):
Encountered a fatal error while running "/opt/hostedtoolcache/CodeQL/2.20.3/x64/codeql/codeql database init --force-overwrite --db-cluster /home/runner/work/_temp/codeql_databases --source-root=/home/runner/work/github-actions-check-workflow/github-actions-check-workflow --calculate-language-specific-baseline --extractor-include-aliases --sublanguage-file-coverage --language=actions --search-path /home/runner/work/_actions/github/codeql-action/v3/actions-extractor --codescanning-config=/home/runner/work/_temp/user-config.yaml --build-mode=none". Exit code was 2 and error was: A fatal error occurred: No queries defined for actions. See the logs for more details.
I've been trying to debug the "No queries defined for actions", but I'm stumped. I'm guessing that I'm missing something specifying what language my query is used for, but I have no idea what I'm missing.
- Ngôn ngữ chính
- TypeScript
- Star
- 1.6k
- Fork
- 493
- Merge trung bình
- 1 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 44
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của github/codeql-action
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
github/codeql-action#4052 · 4 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
github/codeql-action#4078 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
github/codeql-action#4008 · 9 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
github/codeql-action#3978 · 4 bình luận · 1 reaction ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
github/codeql-action#3915 · 6 bình luận · 3 reaction ·
Tất cả issue của github/codeql-action
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
safetrustcr/dApp-SafeTrust#426 ·
-
area:workflow bug ready-for-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
fil-donadoni/tolaria#4409 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Fission-AI/OpenSpec#1960 ·
-
Add dependabot Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
corsairdev/corsair#1764 ·