Skip to content

Updates for v2.25.1-next.2 prerelease#204

Merged
data-douser merged 23 commits intomainfrom
dd/ql-mcp-sarif/1
Apr 1, 2026
Merged

Updates for v2.25.1-next.2 prerelease#204
data-douser merged 23 commits intomainfrom
dd/ql-mcp-sarif/1

Conversation

@data-douser
Copy link
Copy Markdown
Collaborator

@data-douser data-douser commented Apr 1, 2026

Closes #198.
Closes #201.
Closes #202.

Summary of Changes

This pull request introduces significant new SARIF analysis capabilities, improves caching and concurrency for key tools, and addresses several bugs and usability issues based on recent evaluations. The main highlights include the addition of new SARIF tools for rule-level extraction and alert comparison, enhancements to the cache model and prompt workflows, and multiple bug fixes to improve reliability and correctness.

Outline of Changes

Major new features and enhancements:

SARIF Analysis Tools and Cache Model:

  • Added new SARIF tools: sarif_list_rules, sarif_extract_rule, sarif_rule_to_markdown, sarif_compare_alerts, and sarif_diff_runs for advanced SARIF rule extraction, visualization, alert overlap analysis, and behavioral comparison. The cache model now includes rule_id and run_id columns, and all cache tools support a ruleId filter. SARIF output from database_analyze is auto-decomposed into per-rule cache entries. ([CHANGELOG.mdL23-R48])
  • Introduced the compare_overlapping_alerts prompt for multi-SARIF alert comparison workflows, with test coverage and documentation. [1]], [2]], [3]], [4]])

Tool and Workflow Improvements:

  • Enhanced codeql_bqrs_interpret with a database parameter mapped to --source-archive, validating the presence of src.zip or src. [1]], [2]])
  • Updated codeql_bqrs_info to use a file (string) parameter instead of files (array), matching CLI expectations and preventing errors. [1]], [2]], [3]])
  • Improved codeql_database_analyze to auto-cache results after SARIF output and serialize concurrent calls to the same database using a normalized per-database mutex. [1]], [2]])
  • annotation_search now matches the category field case-insensitively using COLLATE NOCASE. [1]], [2]])
  • audit_add_notes now prefers findingId as a lookup key, with other fields as optional fallbacks. [1]], [2]])
  • query_results_cache_compare only parses SARIF content for SARIF-format cache entries, improving efficiency and correctness. [1]], [2]])

VS Code Extension:

  • Added a new codeql-mcp.enableAnnotationTools setting (default: true), which auto-sets relevant environment variables for annotation tools. ([CHANGELOG.mdL57-R79])

Bug fixes:

  • Fixed issues where codeql_bqrs_interpret was unusable through the MCP interface, query_results_cache_compare reported incorrect result counts, annotation_search ignored the category field, audit_add_notes ignored findingId, and codeql_bqrs_info parameter mismatch caused CLI errors. Also, the database lock key is now normalized to prevent serialization bypass. ([CHANGELOG.mdR88-R93])

Integration and test updates:

  • Added and updated integration tests and documentation for new SARIF tools and prompts, including test SARIF files and monitoring state configurations. [1]], [2]], [3]], [4]], [5]], [6]], [7]])

References:
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

Copilot AI and others added 17 commits March 31, 2026 02:09
Bug 1: Improve bqrs_interpret -t parameter docs, add database param
Bug 2: Fix query_results_cache_compare to derive resultCount from SARIF
Bug 3: Include category field in annotation_search FTS matching
Bug 4: Add findingId as primary lookup for audit_add_notes
Bug 5: Change bqrs_info files param to single file string
Design 2: Serialize concurrent database_analyze on same database
Design 3: Already implemented (cacheKey/queryName in cache_lookup)
Design 5: Auto-enable annotation tools in VSIX with new setting

Agent-Logs-Url: https://github.com/advanced-security/codeql-development-mcp-server/sessions/0d52c27d-21be-49ea-bf90-c8fb6f50a3da

Co-authored-by: data-douser <70299490+data-douser@users.noreply.github.com>
Add cacheDatabaseAnalyzeResults() to auto-cache SARIF output from
database_analyze into the query results cache. Update README with
new enableAnnotationTools setting documentation.

Agent-Logs-Url: https://github.com/advanced-security/codeql-development-mcp-server/sessions/0d52c27d-21be-49ea-bf90-c8fb6f50a3da

Co-authored-by: data-douser <70299490+data-douser@users.noreply.github.com>
- Fix databaseLocks memory leak: clean up map entries on release
- Fix bqrs_interpret source-archive: prefer src.zip over src/
- Fix cacheDatabaseAnalyzeResults: use resolved database path
- Fix annotation category search: add COLLATE NOCASE
- Fix resultCount: use ?? 0 instead of ?? null (two locations)
- Fix VS Code tests: wrap mock mutations in try/finally
- Fix codeql_bqrs_info integration tests: files → file in test
  runner, monitoring runner, and test-config.json

Agent-Logs-Url: https://github.com/advanced-security/codeql-development-mcp-server/sessions/52936c89-89e6-4b1d-8c0e-12dcb9ad2388

Co-authored-by: data-douser <70299490+data-douser@users.noreply.github.com>
Prep for the v2.25.1-next.2 release as a hotfix for the v2.25.1-next.1
release.
…se metadata

When the `database` parameter is provided to `codeql_bqrs_interpret`, read
`codeql-database.yml` and extract `sourceLocationPrefix` to auto-set
`--source-location-prefix`. This fixes the "Missing required argument(s):
--source-location-prefix" error reported in v2.25.1-next.2 evaluation.

TDD: Added 2 handler behavior tests in cli-tool-registry.test.ts and
9 definition tests in bqrs-interpret.test.ts.

Agent-Logs-Url: https://github.com/advanced-security/codeql-development-mcp-server/sessions/6ff74bab-c637-4e18-a5dc-92e3065583f4

Co-authored-by: data-douser <70299490+data-douser@users.noreply.github.com>
…et handling

Some MCP clients send the file parameter as a JSON-encoded array string
like '["/path/to/file.bqrs"]' or as an actual array instead of a plain
string. The handler now defensively detects both cases and extracts the
clean file path.

TDD: Added 2 regression tests for JSON-encoded array strings and actual
array values passed as the file parameter.

Agent-Logs-Url: https://github.com/advanced-security/codeql-development-mcp-server/sessions/6ff74bab-c637-4e18-a5dc-92e3065583f4

Co-authored-by: data-douser <70299490+data-douser@users.noreply.github.com>
…ngId

- CHANGELOG: correct 'v2.25.1-next.1' → 'v2.25.1-next.2' evaluation ref
- audit-tools: use explicit `!= null` check for findingId clarity

Agent-Logs-Url: https://github.com/advanced-security/codeql-development-mcp-server/sessions/6ff74bab-c637-4e18-a5dc-92e3065583f4

Co-authored-by: data-douser <70299490+data-douser@users.noreply.github.com>
…limit; fix env-builder to not overwrite pre-existing vars

TDD tests for Design 3 (query_results_cache_lookup):
- Exact cacheKey lookup returns metadata including resultCount
- Non-existent cacheKey returns cached:false
- Language-only filter correctly returns matching entries
- databasePath filter returns matching entries
- limit parameter restricts returned entries

Environment builder fix (addresses PR review):
- Only set ENABLE_ANNOTATION_TOOLS when not already defined in env
- Only set MONITORING_STORAGE_LOCATION when not already defined in env
- Added test: additionalEnv MONITORING_STORAGE_LOCATION override is preserved

Agent-Logs-Url: https://github.com/advanced-security/codeql-development-mcp-server/sessions/97593c7f-7fd2-48f4-9f4c-0e97dfa47902

Co-authored-by: data-douser <70299490+data-douser@users.noreply.github.com>
…log clarity

- BQRS file param: check `file !== undefined` instead of truthiness,
  validate with `trim()` to catch whitespace-only strings
- bqrs_interpret database: always delete key from options regardless of
  value; fail fast on empty/whitespace-only string with clear error
- environment-builder: check `process.env` for inherited values instead
  of the freshly-constructed `env` object (which is always empty)
- result-processor: log "result count unknown" instead of "0 results"
  when resultCount is null
- Added tests: empty string file, whitespace file, empty database param,
  process.env ENABLE_ANNOTATION_TOOLS preservation

Agent-Logs-Url: https://github.com/advanced-security/codeql-development-mcp-server/sessions/f9deedbc-dbc0-4432-9d7b-775d1a9f624f

Co-authored-by: data-douser <70299490+data-douser@users.noreply.github.com>
Add sarif_extract_rule, sarif_rule_to_markdown, and sarif_compare_alerts
tools with shared library (sarif-utils.ts, 34 unit tests). Extend cache
model with rule_id/run_id columns and ruleId filter on all cache tools.
Decompose database_analyze SARIF into per-rule cache entries.

Add compare_overlapping_alerts prompt for classifying alert overlap as
redundant, complementary, or false. Add extensions to SarifRunSchema.

Include 3 client integration tests with shared SARIF fixture and test
runner support for SARIF tools. Update e2e assertion (14 → 17 opt-in
tools). Update server-tools.md and server-prompts.md documentation.
…odeQL CLI version

- Add public getCliVersion() to CliResolver with version parsing
- Add version-aware pack download to PackInstaller using codeql pack download
- Add CLI_VERSION_TO_PACK_VERSION mapping for backwards compatibility (v2.24.0 - v2.25.1)
- Add autoDownloadPacks extension config setting (default: true)
- Wire autoDownloadPacks config into extension activation
- Add comprehensive unit tests for new functionality
- Update extension settings documentation

Agent-Logs-Url: https://github.com/advanced-security/codeql-development-mcp-server/sessions/c79f4c66-0204-436a-85bb-014f590878a1

Co-authored-by: data-douser <70299490+data-douser@users.noreply.github.com>
@data-douser data-douser self-assigned this Apr 1, 2026
Copilot AI review requested due to automatic review settings April 1, 2026 14:00
@data-douser data-douser added bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request javascript Pull requests that update javascript code server labels Apr 1, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

Dependency Review

The following issues were found:
  • ✅ 0 vulnerable package(s)
  • ✅ 0 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ⚠️ 3 package(s) with unknown licenses.
See the Details below.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA a954543.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

License Issues

package-lock.json

PackageVersionLicenseIssue Type
client2.25.1-next.2NullUnknown License
extensions/vscode2.25.1-next.2NullUnknown License
server2.25.1-next.2NullUnknown License

OpenSSF Scorecard

Scorecard details
PackageVersionScoreDetails
npm/@hono/node-server 1.19.12 UnknownUnknown
npm/@modelcontextprotocol/sdk 1.29.0 UnknownUnknown
npm/@napi-rs/wasm-runtime 1.1.2 🟢 5.2
Details
CheckScoreReason
Maintained🟢 1030 commit(s) and 9 issue activity found in the last 90 days -- score normalized to 10
Security-Policy🟢 10security policy file detected
Code-Review⚠️ 2Found 2/10 approved changesets -- score normalized to 2
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Binary-Artifacts🟢 10no binaries found in the repo
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
License🟢 9license file detected
Packaging⚠️ -1packaging workflow not detected
Fuzzing⚠️ 0project is not fuzzed
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Signed-Releases⚠️ -1no releases found
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/@typescript-eslint/eslint-plugin 8.58.0 🟢 5.8
Details
CheckScoreReason
Code-Review🟢 7Found 21/27 approved changesets -- score normalized to 7
Packaging⚠️ -1packaging workflow not detected
Maintained🟢 1030 commit(s) and 18 issue activity found in the last 90 days -- score normalized to 10
Security-Policy🟢 10security policy file detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
License🟢 10license file detected
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Signed-Releases⚠️ -1no releases found
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Fuzzing⚠️ 0project is not fuzzed
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/@typescript-eslint/parser 8.58.0 🟢 5.8
Details
CheckScoreReason
Code-Review🟢 7Found 21/27 approved changesets -- score normalized to 7
Packaging⚠️ -1packaging workflow not detected
Maintained🟢 1030 commit(s) and 18 issue activity found in the last 90 days -- score normalized to 10
Security-Policy🟢 10security policy file detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
License🟢 10license file detected
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Signed-Releases⚠️ -1no releases found
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Fuzzing⚠️ 0project is not fuzzed
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/@typescript-eslint/project-service 8.58.0 🟢 5.8
Details
CheckScoreReason
Code-Review🟢 7Found 21/27 approved changesets -- score normalized to 7
Packaging⚠️ -1packaging workflow not detected
Maintained🟢 1030 commit(s) and 18 issue activity found in the last 90 days -- score normalized to 10
Security-Policy🟢 10security policy file detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
License🟢 10license file detected
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Signed-Releases⚠️ -1no releases found
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Fuzzing⚠️ 0project is not fuzzed
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/@typescript-eslint/scope-manager 8.58.0 🟢 5.8
Details
CheckScoreReason
Code-Review🟢 7Found 21/27 approved changesets -- score normalized to 7
Packaging⚠️ -1packaging workflow not detected
Maintained🟢 1030 commit(s) and 18 issue activity found in the last 90 days -- score normalized to 10
Security-Policy🟢 10security policy file detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
License🟢 10license file detected
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Signed-Releases⚠️ -1no releases found
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Fuzzing⚠️ 0project is not fuzzed
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/@typescript-eslint/tsconfig-utils 8.58.0 🟢 5.8
Details
CheckScoreReason
Code-Review🟢 7Found 21/27 approved changesets -- score normalized to 7
Packaging⚠️ -1packaging workflow not detected
Maintained🟢 1030 commit(s) and 18 issue activity found in the last 90 days -- score normalized to 10
Security-Policy🟢 10security policy file detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
License🟢 10license file detected
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Signed-Releases⚠️ -1no releases found
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Fuzzing⚠️ 0project is not fuzzed
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/@typescript-eslint/type-utils 8.58.0 🟢 5.8
Details
CheckScoreReason
Code-Review🟢 7Found 21/27 approved changesets -- score normalized to 7
Packaging⚠️ -1packaging workflow not detected
Maintained🟢 1030 commit(s) and 18 issue activity found in the last 90 days -- score normalized to 10
Security-Policy🟢 10security policy file detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
License🟢 10license file detected
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Signed-Releases⚠️ -1no releases found
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Fuzzing⚠️ 0project is not fuzzed
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/@typescript-eslint/types 8.58.0 🟢 5.8
Details
CheckScoreReason
Code-Review🟢 7Found 21/27 approved changesets -- score normalized to 7
Packaging⚠️ -1packaging workflow not detected
Maintained🟢 1030 commit(s) and 18 issue activity found in the last 90 days -- score normalized to 10
Security-Policy🟢 10security policy file detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
License🟢 10license file detected
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Signed-Releases⚠️ -1no releases found
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Fuzzing⚠️ 0project is not fuzzed
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/@typescript-eslint/typescript-estree 8.58.0 🟢 5.8
Details
CheckScoreReason
Code-Review🟢 7Found 21/27 approved changesets -- score normalized to 7
Packaging⚠️ -1packaging workflow not detected
Maintained🟢 1030 commit(s) and 18 issue activity found in the last 90 days -- score normalized to 10
Security-Policy🟢 10security policy file detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
License🟢 10license file detected
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Signed-Releases⚠️ -1no releases found
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Fuzzing⚠️ 0project is not fuzzed
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/@typescript-eslint/utils 8.58.0 🟢 5.8
Details
CheckScoreReason
Code-Review🟢 7Found 21/27 approved changesets -- score normalized to 7
Packaging⚠️ -1packaging workflow not detected
Maintained🟢 1030 commit(s) and 18 issue activity found in the last 90 days -- score normalized to 10
Security-Policy🟢 10security policy file detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
License🟢 10license file detected
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Signed-Releases⚠️ -1no releases found
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Fuzzing⚠️ 0project is not fuzzed
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/@typescript-eslint/visitor-keys 8.58.0 🟢 5.8
Details
CheckScoreReason
Code-Review🟢 7Found 21/27 approved changesets -- score normalized to 7
Packaging⚠️ -1packaging workflow not detected
Maintained🟢 1030 commit(s) and 18 issue activity found in the last 90 days -- score normalized to 10
Security-Policy🟢 10security policy file detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
License🟢 10license file detected
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Signed-Releases⚠️ -1no releases found
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Fuzzing⚠️ 0project is not fuzzed
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/adm-zip 0.5.17 🟢 3.6
Details
CheckScoreReason
Maintained⚠️ 00 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Code-Review🟢 3Found 6/19 approved changesets -- score normalized to 3
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Packaging⚠️ -1packaging workflow not detected
Binary-Artifacts🟢 10no binaries found in the repo
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Security-Policy⚠️ 0security policy file not detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
SAST🟢 7SAST tool detected but not run on all commits
npm/client 2.25.1-next.2 UnknownUnknown
npm/express-rate-limit 8.3.2 UnknownUnknown
npm/extensions/vscode 2.25.1-next.2 UnknownUnknown
npm/minimatch 10.2.5 🟢 6.2
Details
CheckScoreReason
Code-Review⚠️ 0Found 1/28 approved changesets -- score normalized to 0
Maintained🟢 1029 commit(s) and 9 issue activity found in the last 90 days -- score normalized to 10
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Binary-Artifacts🟢 10no binaries found in the repo
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 10security policy file detected
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/path-to-regexp 8.4.1 🟢 7.7
Details
CheckScoreReason
Binary-Artifacts🟢 10no binaries found in the repo
Branch-Protection⚠️ 1branch protection is not maximal on development and all release branches
CI-Tests🟢 925 out of 27 merged PRs checked by a CI test -- score normalized to 9
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Code-Review🟢 7found 7 unreviewed changesets out of 29 -- score normalized to 7
Contributors🟢 1025 different organizations found -- score normalized to 10
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Dependency-Update-Tool🟢 10update tool detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Maintained🟢 1011 commit(s) out of 30 and 2 issue activity out of 30 found in the last 90 days -- score normalized to 10
Packaging⚠️ -1no published package detected
Pinned-Dependencies🟢 3dependency not pinned by hash detected -- score normalized to 3
SAST🟢 9SAST tool detected but not run on all commits
Security-Policy🟢 9security policy file detected
Signed-Releases⚠️ -1no releases found
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Vulnerabilities🟢 10no vulnerabilities detected
npm/server 2.25.1-next.2 UnknownUnknown
npm/typescript-eslint 8.58.0 🟢 5.8
Details
CheckScoreReason
Code-Review🟢 7Found 21/27 approved changesets -- score normalized to 7
Packaging⚠️ -1packaging workflow not detected
Maintained🟢 1030 commit(s) and 18 issue activity found in the last 90 days -- score normalized to 10
Security-Policy🟢 10security policy file detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
License🟢 10license file detected
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Signed-Releases⚠️ -1no releases found
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Fuzzing⚠️ 0project is not fuzzed
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/undici 7.24.7 🟢 8.1
Details
CheckScoreReason
Code-Review🟢 8Found 22/26 approved changesets -- score normalized to 8
Maintained🟢 1030 commit(s) and 13 issue activity found in the last 90 days -- score normalized to 10
Dependency-Update-Tool🟢 10update tool detected
Security-Policy🟢 9security policy file detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Binary-Artifacts🟢 8binaries present in source code
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Pinned-Dependencies🟢 4dependency not pinned by hash detected -- score normalized to 4
Vulnerabilities🟢 100 existing vulnerabilities detected
Fuzzing🟢 10project is fuzzed
Signed-Releases⚠️ -1no releases found
Packaging🟢 10packaging workflow detected
SAST🟢 9SAST tool detected but not run on all commits
License🟢 10license file detected
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
CI-Tests🟢 1026 out of 26 merged PRs checked by a CI test -- score normalized to 10
Contributors🟢 10project has 83 contributing companies or organizations

Scanned Files

  • package-lock.json

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the v2.25.1-next.2 prerelease with multiple evaluation-driven fixes and feature additions across the MCP server, VS Code extension, and integration tests—most notably improved BQRS tool schemas, query-results caching enhancements (including database_analyze auto-caching + ruleId support), and new SARIF analysis tools/prompts.

Changes:

  • Fix/align several CodeQL CLI tool schemas and handlers (bqrs_interpret, bqrs_info, audit_add_notes) and extend cache tools (ruleId, exact cacheKey lookup, improved compare semantics).
  • Add SARIF analysis tools + a new workflow prompt (compare_overlapping_alerts) and wire them into server registration and test coverage.
  • Improve VS Code extension pack installation for mismatched CLI versions (autoDownloadPacks) and enable annotation/audit/cache tooling by default via environment builder behavior.

Reviewed changes

Copilot reviewed 107 out of 110 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
server/test/src/tools/codeql/bqrs-interpret.test.ts Adds schema-focused tests for codeql_bqrs_interpret (file/database/t/output/examples).
server/test/src/tools/codeql/bqrs-info.test.ts Updates tests for codeql_bqrs_info parameter rename filesfile.
server/test/src/tools/cache-tools.test.ts Adds coverage for cache lookup by cacheKey, filters, limits, and compare resultCount behavior.
server/test/src/tools/audit-tools.test.ts Adds schema and behavior tests for audit_add_notes supporting findingId and optional composite key.
server/test/src/prompts/workflow-prompts.test.ts Updates prompt count expectation for new workflow prompt registration.
server/test/src/lib/sqlite-store.test.ts Adds tests for annotation category search and new cache metadata fields (ruleId, runId) + filtering/clearing by ruleId.
server/test/src/lib/result-processor.test.ts Adds tests for deterministic cache keys and YAML parsing pattern coverage.
server/test/src/lib/database-resolver.test.ts Adds unit tests for database YAML metadata parsing (primaryLanguage, sourceLocationPrefix, etc.).
server/src/types/sarif.ts Extends SARIF schema to allow tool.extensions metadata.
server/src/tools/codeql/list-databases.ts Switches DB YAML parsing to shared readDatabaseMetadata() helper.
server/src/tools/codeql/bqrs-interpret.ts Adds optional database param and improves -t key/value documentation.
server/src/tools/codeql/bqrs-info.ts Fixes schema to accept a single file string (matches CLI).
server/src/tools/cache-tools.ts Adds ruleId filtering/clearing, cacheKey lookup, and updates compare output semantics.
server/src/tools/audit-tools.ts Implements findingId-based lookup for audit_add_notes with composite-key fallback.
server/src/resources/server-tools.md Documents new SARIF analysis tool suite and a results comparison workflow.
server/src/resources/server-queries.md Documents the additional bundled CallGraphFromTo tools query and updates support matrix.
server/src/resources/server-prompts.md Adds compare_overlapping_alerts prompt to prompt reference and describes updated SARIF workflows.
server/src/prompts/workflow-prompts.ts Registers compare_overlapping_alerts prompt + schema and adds it to WORKFLOW_PROMPT_NAMES.
server/src/prompts/sarif-rank-true-positives.prompt.md Adds recommended SARIF tool usage guidance.
server/src/prompts/sarif-rank-false-positives.prompt.md Adds recommended SARIF tool usage guidance.
server/src/prompts/run-query-and-summarize-false-positives.prompt.md Updates workflow to leverage cache lookup + SARIF rule extraction/markdown tooling.
server/src/prompts/prompt-loader.ts Registers the new compare-overlapping-alerts.prompt.md template.
server/src/prompts/compare-overlapping-alerts.prompt.md Adds new workflow prompt content for SARIF overlap comparison.
server/src/lib/sqlite-store.ts Adds safe migrations for rule_id/run_id, supports ruleId filtering/clearing, and includes category in annotation search.
server/src/lib/result-processor.ts Adds ruleId + resultCount capture at cache time, caches database_analyze SARIF outputs, and decomposes multi-rule SARIF into per-rule entries.
server/src/lib/database-resolver.ts Adds shared DB metadata reader/parser (readDatabaseMetadata, parseDatabaseYmlContent).
server/src/lib/cli-tool-registry.ts Fixes BQRS file coercion, adds bqrs_interpret database→source archive/prefix mapping, serializes concurrent database_analyze, and auto-caches analyze results.
server/src/codeql-development-mcp-server.ts Bumps server version to 2.25.1-next.2 and registers SARIF tools.
server/src/tools/sarif-tools.ts Adds SARIF tools registration and handlers (extract_rule, list_rules, markdown rendering, alert compare, run diff).
server/ql//tools//codeql-pack.yml Bumps tools pack versions from 2.25.1-next.1 to 2.25.1-next.2.
server/package.json Bumps server package version to 2.25.1-next.2.
package.json Bumps repo version to 2.25.1-next.2.
package-lock.json Updates lockfile versions for workspace packages to 2.25.1-next.2.
extensions/vscode/vitest.config.ts Excludes dist/** and node_modules/** from VS Code vitest runs.
extensions/vscode/test/suite/mcp-tool-e2e.integration.test.ts Extends E2E tool registration assertions to include SARIF tools.
extensions/vscode/test/server/pack-installer.test.ts Adds tests for version-aware pack download behavior and baseVersion helpers.
extensions/vscode/test/extension.test.ts Updates mocks to support CLI version + extension version queries.
extensions/vscode/test/codeql/cli-resolver.test.ts Adds tests for CLI version caching and parsing behavior.
extensions/vscode/test/bridge/environment-builder.test.ts Adds tests asserting annotation tools enabled-by-default behavior and env override rules.
extensions/vscode/src/server/pack-installer.ts Implements CLI-version-aware tool pack download via codeql pack download + version mapping utilities.
extensions/vscode/src/extension.ts Wires autoDownloadPacks setting into pack installer behavior.
extensions/vscode/src/codeql/cli-resolver.ts Adds CLI version caching (getCliVersion) and robust version parsing.
extensions/vscode/src/bridge/environment-builder.ts Enables annotation/audit/cache tools by default and sets default monitoring storage location.
extensions/vscode/README.md Documents new enableAnnotationTools setting in extension settings table.
extensions/vscode/package.json Bumps VSIX version and adds autoDownloadPacks + enableAnnotationTools settings.
docs/vscode/extension.md Documents autoDownloadPacks in settings table.
client/src/lib/monitoring-integration-test-runner.js Updates tool param wiring (bqrsfile) and adds SARIF tool argument wiring for integration tests.
client/src/lib/integration-test-runner.js Updates codeql_bqrs_info params (filesfile) and adds SARIF tool argument wiring.
client/package.json Bumps client package version to 2.25.1-next.2.
client/integration-tests/primitives/tools/sarif_rule_to_markdown/render_path_problem/** Adds new SARIF→markdown integration test fixture and expected state.
client/integration-tests/primitives/tools/sarif_list_rules/list_multi_rule/** Adds new SARIF rule listing integration test fixture and expected state.
client/integration-tests/primitives/tools/sarif_extract_rule/extract_sql_injection/** Adds new SARIF rule extraction integration test fixture and expected state.
client/integration-tests/primitives/tools/sarif_diff_runs/diff_changed_results/** Adds new SARIF diff integration test fixture and expected state.
client/integration-tests/primitives/tools/sarif_compare_alerts/sink_overlap/** Adds new alert overlap integration test fixture and expected state.
client/integration-tests/primitives/tools/codeql_bqrs_info/json_format/test-config.json Updates codeql_bqrs_info integration test args to use file string.
client/integration-tests/primitives/prompts/compare_overlapping_alerts/basic_comparison/** Adds integration test fixture for the new compare_overlapping_alerts prompt.

Copilot AI review requested due to automatic review settings April 1, 2026 16:35
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 107 out of 110 changed files in this pull request and generated 5 comments.

Comments suppressed due to low confidence (1)

extensions/vscode/README.md:52

  • The settings table doesn’t list the new codeql-mcp.autoDownloadPacks option added in this PR, and enableAnnotationTools now also gates SARIF analysis tools (sarif_*). Please update this table to include autoDownloadPacks and clarify the scope of enableAnnotationTools so the README matches the extension’s actual configuration surface.

Copilot AI review requested due to automatic review settings April 1, 2026 17:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 107 out of 110 changed files in this pull request and generated 3 comments.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Nathan Randall <70299490+data-douser@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 1, 2026 17:24
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 107 out of 110 changed files in this pull request and generated 4 comments.

Comments suppressed due to low confidence (2)

CHANGELOG.md:36

  • This tools table entry still links to an issue (.../issues/201) rather than the implementing PR, and the link format doesn’t match the changelog’s PR-link convention. Please update it to reference the PR that added these SARIF tools.
| `query_results_cache_lookup`, `query_results_cache_retrieve`, `query_results_cache_clear`, `query_results_cache_compare` | Query result cache tools for lookup, subset retrieval, cache clearing, and cross-database comparison. ([#169](https://github.com/advanced-security/codeql-development-mcp-server/pull/169))                                                       |
| `sarif_list_rules`, `sarif_extract_rule`, `sarif_rule_to_markdown`, `sarif_compare_alerts`, `sarif_diff_runs`            | SARIF analysis tools for rule discovery, per-rule extraction, Mermaid dataflow visualization, alert overlap comparison, and cross-run behavioral diffing. ([#201](https://github.com/advanced-security/codeql-development-mcp-server/issues/201)) |

CHANGELOG.md:48

  • This prompt table entry links to an issue (.../issues/201) instead of a PR. For consistency with the rest of the changelog and to keep the changelog as a merged-change log, please reference the PR that introduced compare_overlapping_alerts using the standard ([#NNN](.../pull/NNN)) format.
| Prompt                       | Description                                                                                                                                                                                                                                            |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `compare_overlapping_alerts` | Multi-SARIF alert comparison workflow: compares alerts across rules, files, runs, databases, or CodeQL versions with 8-step guided analysis using SARIF tools. ([#201](https://github.com/advanced-security/codeql-development-mcp-server/issues/201)) |

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 107 out of 110 changed files in this pull request and generated no new comments.

@data-douser data-douser marked this pull request as ready for review April 1, 2026 21:16
@data-douser data-douser requested review from a team and enyil as code owners April 1, 2026 21:16
@data-douser data-douser merged commit 16b96a1 into main Apr 1, 2026
33 checks passed
@data-douser data-douser deleted the dd/ql-mcp-sarif/1 branch April 1, 2026 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request javascript Pull requests that update javascript code server

Projects

None yet

4 participants