[PR #38] Auto-download CodeQL query packs before analysis #45

Open
opened 2026-03-02 04:08:01 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/gadievron/raptor/pull/38
Author: @AndrewMohawk
Created: 12/22/2025
Status: 🔄 Open

Base: mainHead: fix/codeql-auto-download-packs


📝 Commits (1)

  • f08f80a Auto-download CodeQL query packs before analysis

📊 Changes

1 file changed (+45 additions, -0 deletions)

View changed files

📝 packages/codeql/query_runner.py (+45 -0)

📄 Description

Summary

  • Fixes "Query pack cannot be found" errors by automatically downloading required query packs before running analysis
  • Adds _ensure_pack_downloaded() method to QueryRunner
  • Caches downloaded packs to avoid redundant downloads

Problem

When running CodeQL analysis, the query packs need to be downloaded first:

A fatal error occurred: Query pack codeql/javascript-queries:codeql-suites/javascript-security-and-quality.qls cannot be found.

Solution

Automatically download query packs before analysis by extracting the pack name from the suite reference and calling codeql pack download.

Test plan

  • Run CodeQL analysis on TypeScript project
  • Verify pack is downloaded automatically
  • Verify analysis completes with findings

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/gadievron/raptor/pull/38 **Author:** [@AndrewMohawk](https://github.com/AndrewMohawk) **Created:** 12/22/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/codeql-auto-download-packs` --- ### 📝 Commits (1) - [`f08f80a`](https://github.com/gadievron/raptor/commit/f08f80a2635b2ed202539c6af3c9b9ed85210b58) Auto-download CodeQL query packs before analysis ### 📊 Changes **1 file changed** (+45 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/codeql/query_runner.py` (+45 -0) </details> ### 📄 Description ## Summary - Fixes "Query pack cannot be found" errors by automatically downloading required query packs before running analysis - Adds `_ensure_pack_downloaded()` method to QueryRunner - Caches downloaded packs to avoid redundant downloads ## Problem When running CodeQL analysis, the query packs need to be downloaded first: ``` A fatal error occurred: Query pack codeql/javascript-queries:codeql-suites/javascript-security-and-quality.qls cannot be found. ``` ## Solution Automatically download query packs before analysis by extracting the pack name from the suite reference and calling `codeql pack download`. ## Test plan - [x] Run CodeQL analysis on TypeScript project - [x] Verify pack is downloaded automatically - [x] Verify analysis completes with findings 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/raptor#45
No description provided.