Skip to content

feat(resources): improve CodeQL MaD extensions support#266

Draft
data-douser wants to merge 16 commits intomainfrom
dd/mad-ql/1
Draft

feat(resources): improve CodeQL MaD extensions support#266
data-douser wants to merge 16 commits intomainfrom
dd/mad-ql/1

Conversation

@data-douser
Copy link
Copy Markdown
Collaborator

Closes #261.

Summary of Changes

Implements changes required for resolution of issue #261 and first-class support for CodeQL Models-as-Data (MaD) extensions as part of agentic CodeQL development.

Add per-language library-modeling resources, a common data-extensions overview, and a procedural MCP prompt for data extension development workflows.

Resources:

  • Add library-modeling for cpp, csharp, java, javascript, python, ruby (from template PR Add deterministic release version updater and pack fixes #42)
  • Add data-extensions-overview.md covering MaD tuple and API Graph formats (codeql://learning/data-extensions)
  • Update Go library-modeling with barrierModel and barrierGuardModel (CodeQL 2.25.2+)
  • Register 6 new language resources in language-types.ts

Prompt:

Docs:

  • Update server-overview.md, server-prompts.md, server-queries.md with new URIs and references

Outline of Changes

TODO

Implements changes required for resolution of issue #261
and first-class support for CodeQL Models-as-Data (MaD)
extensions as part of agentic CodeQL development.

Add per-language library-modeling resources, a common
data-extensions overview, and a procedural MCP prompt
for data extension development workflows.

Resources:
- Add library-modeling for cpp, csharp, java,
  javascript, python, ruby (from template PR #42)
- Add data-extensions-overview.md covering MaD tuple
  and API Graph formats (codeql://learning/data-extensions)
- Update Go library-modeling with barrierModel and
  barrierGuardModel (CodeQL 2.25.2+)
- Register 6 new language resources in language-types.ts

Prompt:
- Add data_extension_development MCP prompt with 8-step
  procedural workflow (from template PR #48)

Docs:
- Update server-overview.md, server-prompts.md,
  server-queries.md with new URIs and references
@data-douser data-douser self-assigned this Apr 24, 2026
@data-douser data-douser added the documentation Improvements or additions to documentation label Apr 24, 2026
Copilot AI review requested due to automatic review settings April 24, 2026 18:39
@data-douser data-douser added enhancement New feature or request server testing labels Apr 24, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 24, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails
actions/actions/setup-go 4a3601121dd01d1626a1e23e37211e3254c1c06c 🟢 5.7
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Maintained🟢 67 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 6
Binary-Artifacts🟢 10no binaries found in the repo
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Packaging⚠️ -1packaging workflow not detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 9security policy file detected
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
SAST🟢 10SAST tool is run on all commits

Scanned Files

  • .github/workflows/lint-and-format.yml

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

Adds first-class Models-as-Data (MaD) / data extensions documentation and workflow support to the CodeQL Development MCP Server, enabling agentic development of library models via new learning resources, per-language guides, and a dedicated MCP prompt.

Changes:

  • Added a new codeql://learning/data-extensions resource plus per-language library-modeling resources for multiple languages.
  • Introduced a new data_extension_development workflow prompt (template + registration + schema) for end-to-end MaD authoring/testing.
  • Updated server documentation and tests to account for newly registered resources/prompts and expanded Go library-modeling docs with barrierModel / barrierGuardModel.
Show a summary per file
File Description
server/test/src/resources/language-resources.test.ts Updates expectations for additional language resources registration.
server/test/src/prompts/workflow-prompts.test.ts Updates prompt-name count expectation for the new workflow prompt.
server/src/types/language-types.ts Registers new per-language library-modeling markdown resources via additionalResources.
server/src/tools/codeql-resources.ts Registers new learning resource codeql://learning/data-extensions.
server/src/resources/server-queries.md Table formatting adjustments in bundled queries documentation.
server/src/resources/server-prompts.md Documents the newly added data_extension_development prompt.
server/src/resources/server-overview.md Adds references to the new data extensions resource and library-modeling resources; updates prompt count/category list.
server/src/resources/languages/cpp_library_modeling.md Adds C/C++ library-modeling (MaD) guidance resource.
server/src/resources/languages/csharp_library_modeling.md Adds C# library-modeling (MaD) guidance resource.
server/src/resources/languages/java_library_modeling.md Adds Java/Kotlin library-modeling (MaD) guidance resource.
server/src/resources/languages/javascript_library_modeling.md Adds JavaScript/TypeScript library-modeling (API graph format) guidance resource.
server/src/resources/languages/python_library_modeling.md Adds Python library-modeling (API graph format) guidance resource.
server/src/resources/languages/ruby_library_modeling.md Adds Ruby library-modeling (API graph format) guidance resource.
server/src/resources/languages/go_library_modeling.md Extends Go library-modeling docs with barrierModel / barrierGuardModel (2.25.2+).
server/src/resources/data-extensions-overview.md Adds shared overview doc covering MaD formats, predicates, packs, and workflow.
server/src/prompts/workflow-prompts.ts Registers data_extension_development prompt, schema, and handler.
server/src/prompts/data-extension-development.prompt.md Adds the procedural workflow prompt template for data extension development.
server/src/lib/resources.ts Adds getDataExtensionsOverview() for serving the new learning resource.
server/dist/codeql-development-mcp-server.js Updates the built server bundle to include new resources/prompt wiring.

Copilot's findings

  • Files reviewed: 18/20 changed files
  • Comments generated: 5

Comment thread server/src/prompts/data-extension-development.prompt.md Outdated
Comment thread server/src/resources/server-overview.md Outdated
Comment thread server/src/resources/data-extensions-overview.md Outdated
Comment thread server/src/resources/server-prompts.md
Comment thread server/src/prompts/workflow-prompts.ts
Copilot AI review requested due to automatic review settings April 24, 2026 20:05
@data-douser data-douser review requested due to automatic review settings April 24, 2026 20:05
Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 24, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh gh pr view 266 --json title,body,files la/Security_Communication_Root_CA.crt e be18160abc6298begrep cat /usr/local/.ghcu(create|run) git rtif�� ��s��tv��ny.pem la/vTrus_ECC_Root_CA.crt e git@github.com/ runtime-runc/mobdiff 5352433d1b4b2693main /usr/sbin/iptablHEAD (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI review requested due to automatic review settings April 24, 2026 20:32
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5.6.0 to 6.4.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](actions/setup-go@40f1582...4a36011)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-version: 6.4.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nathan Randall <70299490+data-douser@users.noreply.github.com>
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.

Copilot's findings

  • Files reviewed: 20/22 changed files
  • Comments generated: 1

Comment thread server/src/resources/data-extensions-overview.md Outdated
data-douser and others added 8 commits April 24, 2026 15:20
* Initial plan

* Fix invalid JSON Schema for query_results_cache_retrieve (use z.object for lineRange/resultIndices)

Agent-Logs-Url: https://github.com/advanced-security/codeql-development-mcp-server/sessions/950558d1-9e5d-4eec-bdd3-0668c904dd1f

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

* Add server tool-schema-validation.test.ts

Adds tests to generically avoid regressions due to invalid schema
for any MCP tool.

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Nathan Randall <70299490+data-douser@users.noreply.github.com>

* Address PR review feedback

---------

Signed-off-by: Nathan Randall <70299490+data-douser@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: data-douser <70299490+data-douser@users.noreply.github.com>
Co-authored-by: Nathan Randall <data-douser@github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 6.3.0 to 6.4.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](actions/setup-node@53b8394...48b55a0)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: 6.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Implements changes required for resolution of issue #261
and first-class support for CodeQL Models-as-Data (MaD)
extensions as part of agentic CodeQL development.

Add per-language library-modeling resources, a common
data-extensions overview, and a procedural MCP prompt
for data extension development workflows.

Resources:
- Add library-modeling for cpp, csharp, java,
  javascript, python, ruby (from template PR #42)
- Add data-extensions-overview.md covering MaD tuple
  and API Graph formats (codeql://learning/data-extensions)
- Update Go library-modeling with barrierModel and
  barrierGuardModel (CodeQL 2.25.2+)
- Register 6 new language resources in language-types.ts

Prompt:
- Add data_extension_development MCP prompt with 8-step
  procedural workflow (from template PR #48)

Docs:
- Update server-overview.md, server-prompts.md,
  server-queries.md with new URIs and references
Copilot AI review requested due to automatic review settings April 24, 2026 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request server testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integrate and improve CodeQL Models-as-Data (MaD) extension support in ql-mcp

3 participants