Skip to content

Add CallGraphFromTo queries for all supported languages#168

Merged
data-douser merged 11 commits intomainfrom
dd/call-graph-from-to
Mar 27, 2026
Merged

Add CallGraphFromTo queries for all supported languages#168
data-douser merged 11 commits intomainfrom
dd/call-graph-from-to

Conversation

@data-douser
Copy link
Copy Markdown
Collaborator

@data-douser data-douser commented Mar 25, 2026

Related to parent #163.

📝 Update Information

Primitive Details

  • Type: Tool
  • Name: codeql_query_run (new CallGraphFromTo query support across all 8 call-graph-enabled languages)
  • Update Category: Feature Enhancement, Bug Fix, Code Quality

⚠️ CRITICAL: PR SCOPE VALIDATION

This PR is for updating an existing MCP server primitive and must ONLY include these file types:

ALLOWED FILES:

  • Server implementation files (server/src/**/*.ts)
  • Updated primitive implementations
  • Modified registration files (server/src/tools/*.ts)
  • Updated or new test files (server/test/**/*.ts)
  • Documentation updates (README.md, server docs)
  • Updated type definitions (server/src/types/*.ts)
  • Modified supporting library files (server/src/lib/*.ts)
  • Configuration updates if needed (package.json, tsconfig.json)

🚫 FORBIDDEN FILES:

  • Files unrelated to the primitive update
  • Temporary or test output files
  • IDE configuration files
  • Log files or debug output
  • Analysis or summary files

Rationale: This PR should contain only the files necessary to update and test the primitive.

🚨 PRs that include forbidden files will be rejected and must be revised.


🛑 MANDATORY PR VALIDATION CHECKLIST

BEFORE SUBMITTING THIS PR, CONFIRM:

  • ONLY server implementation files are included
  • NO temporary or output files are included
  • NO unrelated configuration files are included
  • ALL existing tests continue to pass
  • NEW functionality is properly tested

  • Impact Scope: Extensive changes

Update Metadata

  • Breaking Changes: No
  • API Compatibility: Enhanced — new sourceFunction and targetFunction parameters for codeql_query_run when invoking CallGraphFromTo queries
  • Performance Impact: Neutral

🎯 Changes Description

Current Behavior

The codeql_query_run tool supported CallGraphFrom and CallGraphTo queries for 8 languages, but had no CallGraphFromTo query to find call sites on paths between a specified source and target function. Comma-separated inputs (sourceFiles, sourceFunction, targetFunction) were not filtered for empty entries, which could produce extension rows with empty strings. The --model-packs selector used a broad @* version wildcard, risking ambiguous pack resolution if a pack with the same name already existed on the search path.

Updated Behavior

  • A new CallGraphFromTo.ql query is available for all 8 supported languages (cpp, csharp, go, java, javascript, python, ruby, swift), enabling transitive call reachability analysis constrained by both a source and target function.
  • Comma-separated inputs are now filtered to remove empty entries (e.g. trailing commas) before being written into the data extension pack, preventing empty-string extension rows.
  • The --model-packs selector now uses the exact version @0.0.0 instead of @*, making pack resolution deterministic and avoiding collisions with user-supplied packs of the same name.
  • All CallGraphFromTo.md documentation files correctly describe sourceFunction/targetFunction as extensible predicates populated via CodeQL data extensions / model packs (see ExternalPredicates.qll).
  • Comments in server/src/lib/cli-tool-registry.ts consistently refer to codeql-pack.yml (not qlpack.yml), matching both the code and repo convention.

Motivation

Users needed a way to find all call sites on any transitive call path between a named source function and a named target function. The existing CallGraphFrom and CallGraphTo queries only supported one-sided constraints. Additional robustness fixes address edge cases in pack resolution and input handling that could silently produce wrong or empty results.

🔄 Before vs. After Comparison

Functionality Changes

// BEFORE: no CallGraphFromTo query; only CallGraphFrom / CallGraphTo available
// sourceFunction / targetFunction inputs not filtered for empty entries
// --model-packs used @* (broad wildcard)

// AFTER: CallGraphFromTo available for all 8 languages
// empty entries filtered from comma-split inputs before writing extension YAML
// --model-packs uses exact @0.0.0 version for deterministic resolution

API Changes

// No schema changes — sourceFunction and targetFunction were already defined.
// CallGraphFromTo is now a supported queryName that honours both parameters.

Output Format Changes

// CallGraphFromTo results follow the same format as CallGraphFrom / CallGraphTo:
// Each result row: { message: "Reachable call from `<source>` to `<intermediate>`", location: ... }

🧪 Testing & Validation

Test Coverage Updates

  • Existing Tests: All existing tests continue to pass
  • New Test Cases: Added unit test suites (.ql + .expected) for all 8 CallGraphFromTo queries
  • Regression Tests: Existing CallGraphFrom/CallGraphTo/PrintAST/PrintCFG tests unaffected
  • Edge Case Tests: Empty-entry filtering tested; exact version pin tested

Validation Scenarios

  1. Backward Compatibility: All 1043 server unit tests pass; existing query tools unchanged
  2. New Functionality: All 8 CallGraphFromTo queries compile and pass codeql test run
  3. Error Handling: Empty/whitespace-only comma-separated inputs no longer produce empty-string extension rows
  4. Performance: Neutral — no performance regressions

Test Results

  • Unit Tests: All pass (1043/1043 server unit tests)
  • Integration Tests: Pre-existing codeql_pack_install failure unrelated to these changes
  • Manual Testing: All 8 CallGraphFromTo queries validated via codeql test run
  • Performance Testing: No regressions detected

📋 Implementation Details

Files Modified

  • Core Implementation: server/ql/{cpp,csharp,go,java,javascript,python,ruby,swift}/tools/src/CallGraphFromTo/CallGraphFromTo.ql
  • Supporting Libraries: server/src/lib/cli-tool-registry.ts
  • Tests: server/ql/{cpp,csharp,go,java,javascript,python,ruby,swift}/tools/test/CallGraphFromTo/
  • Documentation: server/ql/{cpp,csharp,go,java,javascript,python,ruby,swift}/tools/src/CallGraphFromTo/CallGraphFromTo.md

Code Changes Summary

  • Algorithm Improvements: New CallGraphFromTo transitive reachability logic for all 8 languages
  • Error Handling: Empty-entry filtering prevents silent empty-string extension rows
  • Input Validation: Improved input validation — only non-empty values written to data extension pack
  • Code Quality: Comments in cli-tool-registry.ts corrected to say codeql-pack.yml; documentation corrected to say "extensible predicates"

Dependencies

  • No New Dependencies: Update uses existing dependencies only

🔍 Quality Improvements

Bug Fixes (if applicable)

  • Issue: --model-packs used broad @* wildcard, risking wrong pack resolution if a same-named pack existed on the user's search path

  • Root Cause: Version selector was not pinned to the exact version written by the code

  • Solution: Changed to exact @0.0.0 to match the version written in the generated codeql-pack.yml

  • Prevention: Exact version pins are now the standard for runtime-generated extension packs

  • Issue: Trailing commas in sourceFiles/sourceFunction/targetFunction inputs produced empty-string extension rows

  • Root Cause: split(',').map(trim) did not filter empty strings

  • Solution: Added .filter(f => f.length > 0) and a guard to skip adding the predicate key if all values are empty

  • Prevention: All comma-split input processing now consistently filters empty entries

Code Quality Enhancements

  • Readability: Documentation and comments now accurately describe the extensible-predicate mechanism
  • Maintainability: Consistent use of codeql-pack.yml naming in comments and code
  • Testability: All 8 new query unit test suites exercise the full query logic

🔗 References

Related Issues/PRs

Validation Materials

  • Test Cases: codeql test run on all 8 CallGraphFromTo test suites
  • Performance Benchmarks: N/A

🚀 Compatibility & Migration

Backward Compatibility

  • Fully Compatible: No breaking changes

API Evolution

  • Enhanced Parameters: sourceFunction and targetFunction now also honoured by CallGraphFromTo
  • Improved Responses: New CallGraphFromTo result set available
  • Maintained Contracts: Core API contracts preserved

👥 Review Guidelines

For Reviewers

Please verify:

  • ⚠️ SCOPE COMPLIANCE: PR contains only server implementation files
  • ⚠️ NO UNRELATED FILES: No temporary, output, or unrelated files
  • ⚠️ BACKWARD COMPATIBILITY: Existing functionality preserved
  • Functionality: CallGraphFromTo queries work as described for all 8 languages
  • Test Coverage: All existing tests pass, new test suites comprehensive
  • Performance: No performance regressions
  • Code Quality: Maintains or improves code quality
  • Documentation: Updated documentation accurate
  • Error Handling: Improved input validation and pack resolution
  • Type Safety: TypeScript types properly updated

Testing Instructions

# Full test suite
npm install
npm run build
npm test

# Server unit tests only
cd server && npm test

# CodeQL query unit tests (requires CodeQL CLI)
codeql test run server/ql/cpp/tools/test/CallGraphFromTo/
codeql test run server/ql/csharp/tools/test/CallGraphFromTo/
codeql test run server/ql/go/tools/test/CallGraphFromTo/
codeql test run server/ql/java/tools/test/CallGraphFromTo/
codeql test run server/ql/javascript/tools/test/CallGraphFromTo/
codeql test run server/ql/python/tools/test/CallGraphFromTo/
codeql test run server/ql/ruby/tools/test/CallGraphFromTo/
codeql test run server/ql/swift/tools/test/CallGraphFromTo/

# Code quality checks
npm run lint
npm run format

Validation Checklist

  1. Regression Testing: Verify no existing functionality is broken
  2. New Feature Testing: Validate CallGraphFromTo returns correct results for all 8 languages
  3. Performance Testing: Confirm no performance regressions
  4. Error Testing: Test trailing-comma inputs and empty-only inputs
  5. Integration Testing: Verify integration with rest of server
  6. Documentation Review: Ensure documentation correctly describes extensible predicates

📊 Impact Assessment

Performance Impact

  • Memory Usage: Neutral
  • Execution Time: Neutral
  • Throughput: Neutral

Server Impact

  • Startup Time: No significant impact on server startup
  • Runtime Stability: No impact on server stability
  • Resource Usage: Reasonable resource consumption
  • Concurrent Usage: Safe for concurrent access

AI Assistant Impact

  • Enhanced Accuracy: AI assistants can now find call paths between two specific functions
  • Better Coverage: Expanded call-graph use case support (bidirectional constraint)
  • Improved Reliability: Deterministic pack resolution; no empty-string extension rows
  • Enhanced User Experience: Better AI assistant workflows for call graph analysis

🔄 Deployment Strategy

Rollout Considerations

  • Safe Deployment: Can be deployed safely to production
  • Monitoring: Standard server monitoring applies
  • Rollback Plan: Standard git revert

Post-Deployment Validation

  • Monitoring: Monitor codeql_query_run calls for CallGraphFromTo queries
  • Error Tracking: Watch for pack resolution errors in server logs

Update Methodology: This update follows best practices:

  1. ✅ Comprehensive backward compatibility analysis
  2. ✅ Thorough testing of all changes
  3. ✅ Performance impact assessment
  4. ✅ Clear documentation of changes
  5. ✅ Robust error handling improvements
  6. ✅ Maintained code quality standards

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI review requested due to automatic review settings March 25, 2026 11:52
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 25, 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
  • ✅ 0 package(s) with unknown licenses.
  • ⚠️ 2 packages with OpenSSF Scorecard issues.
See the Details below.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA 129b496.
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.

OpenSSF Scorecard

Scorecard details
PackageVersionScoreDetails
npm/brace-expansion 5.0.2 🟢 6.3
Details
CheckScoreReason
Packaging⚠️ -1packaging workflow not detected
Maintained🟢 1015 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10
Security-Policy🟢 10security policy file detected
Binary-Artifacts🟢 10no binaries found in the repo
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Code-Review⚠️ 2Found 7/25 approved changesets -- score normalized to 2
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🟢 9license file detected
Signed-Releases⚠️ -1no releases found
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/@azure/core-rest-pipeline 1.23.0 🟢 7.2
Details
CheckScoreReason
Maintained🟢 1030 commit(s) and 22 issue activity found in the last 90 days -- score normalized to 10
Code-Review🟢 10all changesets reviewed
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Packaging⚠️ -1packaging workflow not detected
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions🟢 9detected GitHub workflow tokens with excessive permissions
Signed-Releases⚠️ -1no releases found
Branch-Protection🟢 5branch protection is not maximal on development and all release branches
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies🟢 5dependency not pinned by hash detected -- score normalized to 5
Fuzzing⚠️ 0project is not fuzzed
npm/@azure/identity 4.13.1 🟢 7.2
Details
CheckScoreReason
Maintained🟢 1030 commit(s) and 22 issue activity found in the last 90 days -- score normalized to 10
Code-Review🟢 10all changesets reviewed
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Packaging⚠️ -1packaging workflow not detected
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions🟢 9detected GitHub workflow tokens with excessive permissions
Signed-Releases⚠️ -1no releases found
Branch-Protection🟢 5branch protection is not maximal on development and all release branches
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies🟢 5dependency not pinned by hash detected -- score normalized to 5
Fuzzing⚠️ 0project is not fuzzed
npm/@azure/msal-browser 5.6.2 UnknownUnknown
npm/@azure/msal-common 16.4.0 🟢 6.5
Details
CheckScoreReason
Maintained🟢 1030 commit(s) and 8 issue activity found in the last 90 days -- score normalized to 10
Code-Review🟢 10all changesets reviewed
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Security-Policy🟢 9security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
License🟢 10license file detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Signed-Releases⚠️ -1no releases found
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies⚠️ 2dependency not pinned by hash detected -- score normalized to 2
Branch-Protection🟢 9branch protection is not maximal on development and all release branches
Fuzzing⚠️ 0project is not fuzzed
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/@azure/msal-node 5.1.1 🟢 6.5
Details
CheckScoreReason
Maintained🟢 1030 commit(s) and 8 issue activity found in the last 90 days -- score normalized to 10
Code-Review🟢 10all changesets reviewed
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Security-Policy🟢 9security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
License🟢 10license file detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Signed-Releases⚠️ -1no releases found
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies⚠️ 2dependency not pinned by hash detected -- score normalized to 2
Branch-Protection🟢 9branch protection is not maximal on development and all release branches
Fuzzing⚠️ 0project is not fuzzed
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/@babel/parser 7.29.2 🟢 7
Details
CheckScoreReason
Code-Review🟢 8Found 26/29 approved changesets -- score normalized to 8
Packaging⚠️ -1packaging workflow not detected
Maintained🟢 1030 commit(s) and 16 issue activity found in the last 90 days -- score normalized to 10
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
CII-Best-Practices⚠️ 2badge detected: InProgress
Token-Permissions🟢 9detected GitHub workflow tokens with excessive permissions
Security-Policy🟢 10security policy file detected
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
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
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Binary-Artifacts🟢 10no binaries found in the repo
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Fuzzing⚠️ 0project is not fuzzed
npm/@textlint/ast-node-types 15.5.2 🟢 6.1
Details
CheckScoreReason
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
Code-Review⚠️ 0Found 0/30 approved changesets -- score normalized to 0
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
License🟢 10license file detected
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies🟢 10all dependencies are pinned
Packaging⚠️ -1packaging workflow not detected
Fuzzing⚠️ 0project is not fuzzed
Signed-Releases⚠️ -1no releases found
Branch-Protection🟢 3branch protection is not maximal on development and all release branches
Security-Policy🟢 9security policy file detected
SAST🟢 10SAST tool is run on all commits
npm/@textlint/linter-formatter 15.5.2 🟢 6.1
Details
CheckScoreReason
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
Code-Review⚠️ 0Found 0/30 approved changesets -- score normalized to 0
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
License🟢 10license file detected
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies🟢 10all dependencies are pinned
Packaging⚠️ -1packaging workflow not detected
Fuzzing⚠️ 0project is not fuzzed
Signed-Releases⚠️ -1no releases found
Branch-Protection🟢 3branch protection is not maximal on development and all release branches
Security-Policy🟢 9security policy file detected
SAST🟢 10SAST tool is run on all commits
npm/@textlint/module-interop 15.5.2 🟢 6.1
Details
CheckScoreReason
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
Code-Review⚠️ 0Found 0/30 approved changesets -- score normalized to 0
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
License🟢 10license file detected
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies🟢 10all dependencies are pinned
Packaging⚠️ -1packaging workflow not detected
Fuzzing⚠️ 0project is not fuzzed
Signed-Releases⚠️ -1no releases found
Branch-Protection🟢 3branch protection is not maximal on development and all release branches
Security-Policy🟢 9security policy file detected
SAST🟢 10SAST tool is run on all commits
npm/@textlint/resolver 15.5.2 🟢 6.1
Details
CheckScoreReason
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
Code-Review⚠️ 0Found 0/30 approved changesets -- score normalized to 0
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
License🟢 10license file detected
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies🟢 10all dependencies are pinned
Packaging⚠️ -1packaging workflow not detected
Fuzzing⚠️ 0project is not fuzzed
Signed-Releases⚠️ -1no releases found
Branch-Protection🟢 3branch protection is not maximal on development and all release branches
Security-Policy🟢 9security policy file detected
SAST🟢 10SAST tool is run on all commits
npm/@textlint/types 15.5.2 🟢 6.1
Details
CheckScoreReason
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
Code-Review⚠️ 0Found 0/30 approved changesets -- score normalized to 0
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
License🟢 10license file detected
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies🟢 10all dependencies are pinned
Packaging⚠️ -1packaging workflow not detected
Fuzzing⚠️ 0project is not fuzzed
Signed-Releases⚠️ -1no releases found
Branch-Protection🟢 3branch protection is not maximal on development and all release branches
Security-Policy🟢 9security policy file detected
SAST🟢 10SAST tool is run on all commits
npm/@types/qs 6.15.0 🟢 6.5
Details
CheckScoreReason
Packaging⚠️ -1packaging workflow not detected
Code-Review🟢 8Found 26/30 approved changesets -- score normalized to 8
Maintained🟢 1030 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
License🟢 9license file detected
Security-Policy🟢 10security policy file detected
Signed-Releases⚠️ -1no releases found
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
Pinned-Dependencies🟢 8dependency not pinned by hash detected -- score normalized to 8
Binary-Artifacts🟢 10no binaries found in the repo
Fuzzing⚠️ 0project is not fuzzed
npm/@typespec/ts-http-runtime 0.3.4 🟢 7.2
Details
CheckScoreReason
Maintained🟢 1030 commit(s) and 22 issue activity found in the last 90 days -- score normalized to 10
Code-Review🟢 10all changesets reviewed
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Packaging⚠️ -1packaging workflow not detected
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions🟢 9detected GitHub workflow tokens with excessive permissions
Signed-Releases⚠️ -1no releases found
Branch-Protection🟢 5branch protection is not maximal on development and all release branches
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies🟢 5dependency not pinned by hash detected -- score normalized to 5
Fuzzing⚠️ 0project is not fuzzed
npm/brace-expansion 1.1.13 🟢 6.3
Details
CheckScoreReason
Packaging⚠️ -1packaging workflow not detected
Maintained🟢 1015 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10
Security-Policy🟢 10security policy file detected
Binary-Artifacts🟢 10no binaries found in the repo
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Code-Review⚠️ 2Found 7/25 approved changesets -- score normalized to 2
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🟢 9license file detected
Signed-Releases⚠️ -1no releases found
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/brace-expansion 2.0.3 🟢 6.3
Details
CheckScoreReason
Packaging⚠️ -1packaging workflow not detected
Maintained🟢 1015 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10
Security-Policy🟢 10security policy file detected
Binary-Artifacts🟢 10no binaries found in the repo
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Code-Review⚠️ 2Found 7/25 approved changesets -- score normalized to 2
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🟢 9license file detected
Signed-Releases⚠️ -1no releases found
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/enhanced-resolve 5.20.1 🟢 6
Details
CheckScoreReason
Code-Review🟢 5Found 11/22 approved changesets -- score normalized to 5
Maintained🟢 1029 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
Packaging⚠️ -1packaging workflow not 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
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies🟢 7dependency not pinned by hash detected -- score normalized to 7
License🟢 10license file detected
Fuzzing⚠️ 0project is not fuzzed
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 10security policy file detected
Branch-Protection🟢 5branch protection is not maximal on development and all release branches
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/express-rate-limit 8.3.1 UnknownUnknown
npm/fs-extra 11.3.4 🟢 4.7
Details
CheckScoreReason
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Packaging⚠️ -1packaging workflow not detected
Code-Review🟢 7Found 21/30 approved changesets -- score normalized to 7
Maintained⚠️ 22 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 2
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Binary-Artifacts🟢 10no binaries found in the repo
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⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/hono 4.12.9 UnknownUnknown
npm/jose 6.2.2 🟢 7.2
Details
CheckScoreReason
Code-Review⚠️ 0Found 0/20 approved changesets -- score normalized to 0
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Security-Policy🟢 10security policy file detected
Maintained🟢 1030 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies🟢 7dependency not pinned by hash detected -- score normalized to 7
License🟢 10license file detected
Fuzzing⚠️ 0project is not fuzzed
Branch-Protection🟢 3branch protection is not maximal on development and all release branches
Signed-Releases⚠️ -1no releases found
Packaging🟢 10packaging workflow detected
SAST🟢 10SAST tool is run on all commits
npm/lru-cache 11.2.7 🟢 5
Details
CheckScoreReason
Code-Review⚠️ 0Found 0/29 approved changesets -- score normalized to 0
Maintained🟢 1013 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⚠️ 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
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
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
Security-Policy🟢 10security policy file detected
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/node-abi 3.89.0 UnknownUnknown
npm/path-to-regexp 8.4.0 🟢 7.3
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🟢 821 out of 24 merged PRs checked by a CI test -- score normalized to 8
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Code-Review🟢 7found 8 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🟢 55 commit(s) out of 30 and 1 issue activity out of 30 found in the last 90 days -- score normalized to 5
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/pump 3.0.4 🟢 3.3
Details
CheckScoreReason
Code-Review⚠️ 1Found 5/30 approved changesets -- score normalized to 1
Token-Permissions⚠️ -1No tokens found
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow⚠️ -1no workflows found
Pinned-Dependencies⚠️ -1no dependencies found
Security-Policy🟢 10security policy file detected
Binary-Artifacts🟢 10no binaries found in the repo
Maintained⚠️ 12 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Signed-Releases⚠️ -1no releases found
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/rc-config-loader 4.1.4 🟢 5.7
Details
CheckScoreReason
Code-Review⚠️ 1Found 5/26 approved changesets -- score normalized to 1
Maintained⚠️ 23 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 2
Binary-Artifacts🟢 10no binaries found in the repo
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Pinned-Dependencies🟢 10all dependencies are pinned
Token-Permissions🟢 9detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Packaging🟢 10packaging workflow detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ 1branch protection is not maximal on development and all release branches
Security-Policy🟢 9security policy file detected
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/sax 1.6.0 🟢 4.4
Details
CheckScoreReason
Maintained🟢 89 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 8
Code-Review⚠️ 1Found 5/30 approved changesets -- score normalized to 1
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Binary-Artifacts🟢 10no binaries found in the repo
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
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Security-Policy🟢 10security policy file detected
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/spdx-license-ids 3.0.23 ⚠️ 2.5
Details
CheckScoreReason
Code-Review⚠️ 0Found 0/30 approved changesets -- score normalized to 0
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Packaging⚠️ -1packaging workflow not detected
Maintained⚠️ 12 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1
Binary-Artifacts🟢 10no binaries found in the repo
SAST⚠️ 0no SAST tool detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
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⚠️ 0license file not detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
npm/strip-ansi 7.2.0 🟢 4
Details
CheckScoreReason
Binary-Artifacts🟢 10no binaries found in the repo
Code-Review⚠️ 2Found 6/30 approved changesets -- score normalized to 2
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Maintained🟢 34 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 3
Packaging⚠️ -1packaging workflow not detected
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
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⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/tapable 2.3.2 🟢 5.3
Details
CheckScoreReason
Code-Review⚠️ 1Found 5/26 approved changesets -- score normalized to 1
Maintained🟢 79 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 7
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Pinned-Dependencies🟢 7dependency not pinned by hash detected -- score normalized to 7
Binary-Artifacts🟢 10no binaries found in the repo
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
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
Branch-Protection🟢 5branch protection is not maximal on development and all release branches
Security-Policy🟢 10security policy file detected
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/undici 7.24.6 🟢 8
Details
CheckScoreReason
Maintained🟢 1030 commit(s) and 14 issue activity found in the last 90 days -- score normalized to 10
Security-Policy🟢 9security policy file detected
Dependency-Update-Tool🟢 10update tool detected
Code-Review🟢 7Found 19/27 approved changesets -- score normalized to 7
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Binary-Artifacts🟢 8binaries present in source code
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
License🟢 10license file detected
Pinned-Dependencies🟢 4dependency not pinned by hash detected -- score normalized to 4
Signed-Releases⚠️ -1no releases found
Vulnerabilities🟢 100 existing vulnerabilities detected
SAST🟢 9SAST tool detected but not run on all commits
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
Fuzzing🟢 10project is fuzzed
Packaging🟢 10packaging workflow detected
CI-Tests🟢 1022 out of 22 merged PRs checked by a CI test -- score normalized to 10
Contributors🟢 10project has 83 contributing companies or organizations
npm/zod-to-json-schema 3.25.2 ⚠️ 2.5
Details
CheckScoreReason
Dangerous-Workflow⚠️ -1no workflows found
Code-Review⚠️ 1Found 3/27 approved changesets -- score normalized to 1
Packaging⚠️ -1packaging workflow not detected
Maintained⚠️ 22 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 2
Token-Permissions⚠️ -1No tokens found
Pinned-Dependencies⚠️ -1no dependencies found
Binary-Artifacts🟢 10no binaries found in the repo
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⚠️ 0SAST tool is not run on all commits -- score normalized to 0

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

Adds a new CallGraphFromTo CodeQL tool query across all call-graph-enabled languages in this repo, enabling “calls on paths from source → target” exploration with sourceFunction/targetFunction externals, and updates packs/tests/docs for CodeQL v2.25.0 compatibility.

Changes:

  • Added CallGraphFromTo.ql + .md documentation and unit tests for cpp, csharp, go, java, javascript, python, ruby, swift.
  • Bumped CodeQL pack dependencies/locks across language tool packs for v2.25.0 compatibility.
  • Updated existing Go PrintAST and Java PrintCFG queries (and expected outputs) for newer CodeQL libraries.

Reviewed changes

Copilot reviewed 70 out of 70 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
server/src/resources/languages/java_ast.md Document Java CFG API change (ControlFlowNode / ControlFlowGraph).
server/src/resources/languages/go_ast.md Note about bundled Go PrintAST implementation details.
server/ql/cpp/tools/src/codeql-pack.yml Update cpp tool pack dependency versions.
server/ql/cpp/tools/src/codeql-pack.lock.yml Update cpp tool pack lock versions.
server/ql/cpp/tools/test/codeql-pack.lock.yml Update cpp tool test pack lock versions.
server/ql/cpp/tools/src/CallGraphFromTo/CallGraphFromTo.ql New cpp CallGraphFromTo query.
server/ql/cpp/tools/src/CallGraphFromTo/CallGraphFromTo.md New cpp CallGraphFromTo documentation.
server/ql/cpp/tools/test/CallGraphFromTo/Example1.cpp New cpp test fixture.
server/ql/cpp/tools/test/CallGraphFromTo/CallGraphFromTo.expected New cpp expected results.
server/ql/cpp/tools/test/CallGraphFromTo/CallGraphFromTo.qlref New cpp test query reference.
server/ql/csharp/tools/src/codeql-pack.yml Update csharp tool pack dependency versions.
server/ql/csharp/tools/src/codeql-pack.lock.yml Update csharp tool pack lock versions.
server/ql/csharp/tools/test/codeql-pack.lock.yml Update csharp tool test pack lock versions.
server/ql/csharp/tools/src/CallGraphFromTo/CallGraphFromTo.ql New csharp CallGraphFromTo query.
server/ql/csharp/tools/src/CallGraphFromTo/CallGraphFromTo.md New csharp CallGraphFromTo documentation.
server/ql/csharp/tools/test/CallGraphFromTo/Example1.cs New csharp test fixture.
server/ql/csharp/tools/test/CallGraphFromTo/CallGraphFromTo.expected New csharp expected results.
server/ql/csharp/tools/test/CallGraphFromTo/CallGraphFromTo.qlref New csharp test query reference.
server/ql/go/tools/src/codeql-pack.yml Update go tool pack dependency versions.
server/ql/go/tools/src/codeql-pack.lock.yml Update go tool pack lock versions.
server/ql/go/tools/test/codeql-pack.lock.yml Update go tool test pack lock versions.
server/ql/go/tools/src/PrintAST/PrintAST.ql Adjust Go PrintAST implementation for new library constraints.
server/ql/go/tools/test/PrintAST/PrintAST.expected Update Go PrintAST expected output.
server/ql/go/tools/src/CallGraphFromTo/CallGraphFromTo.ql New go CallGraphFromTo query.
server/ql/go/tools/src/CallGraphFromTo/CallGraphFromTo.md New go CallGraphFromTo documentation.
server/ql/go/tools/test/CallGraphFromTo/Example1.go New go test fixture.
server/ql/go/tools/test/CallGraphFromTo/CallGraphFromTo.expected New go expected results.
server/ql/go/tools/test/CallGraphFromTo/CallGraphFromTo.qlref New go test query reference.
server/ql/java/tools/src/codeql-pack.yml Update java tool pack dependency versions.
server/ql/java/tools/src/codeql-pack.lock.yml Update java tool pack lock versions.
server/ql/java/tools/test/codeql-pack.lock.yml Update java tool test pack lock versions.
server/ql/java/tools/src/PrintCFG/PrintCFG.ql Update Java PrintCFG to use ControlFlowNode.
server/ql/java/tools/test/PrintCFG/PrintCFG.expected Update Java PrintCFG expected output.
server/ql/java/tools/src/CallGraphFromTo/CallGraphFromTo.ql New java CallGraphFromTo query.
server/ql/java/tools/src/CallGraphFromTo/CallGraphFromTo.md New java CallGraphFromTo documentation.
server/ql/java/tools/test/CallGraphFromTo/Example1.java New java test fixture.
server/ql/java/tools/test/CallGraphFromTo/CallGraphFromTo.expected New java expected results.
server/ql/java/tools/test/CallGraphFromTo/CallGraphFromTo.qlref New java test query reference.
server/ql/javascript/tools/src/codeql-pack.yml Update javascript tool pack dependency versions.
server/ql/javascript/tools/src/codeql-pack.lock.yml Update javascript tool pack lock versions.
server/ql/javascript/tools/test/codeql-pack.lock.yml Update javascript tool test pack lock versions.
server/ql/javascript/tools/src/CallGraphFromTo/CallGraphFromTo.ql New javascript CallGraphFromTo query.
server/ql/javascript/tools/src/CallGraphFromTo/CallGraphFromTo.md New javascript CallGraphFromTo documentation.
server/ql/javascript/tools/test/CallGraphFromTo/Example1.js New javascript test fixture.
server/ql/javascript/tools/test/CallGraphFromTo/CallGraphFromTo.expected New javascript expected results.
server/ql/javascript/tools/test/CallGraphFromTo/CallGraphFromTo.qlref New javascript test query reference.
server/ql/python/tools/src/codeql-pack.yml Update python tool pack dependency versions.
server/ql/python/tools/src/codeql-pack.lock.yml Update python tool pack lock versions.
server/ql/python/tools/test/codeql-pack.lock.yml Update python tool test pack lock versions.
server/ql/python/tools/src/CallGraphFromTo/CallGraphFromTo.ql New python CallGraphFromTo query.
server/ql/python/tools/src/CallGraphFromTo/CallGraphFromTo.md New python CallGraphFromTo documentation.
server/ql/python/tools/test/CallGraphFromTo/Example1.py New python test fixture.
server/ql/python/tools/test/CallGraphFromTo/CallGraphFromTo.expected New python expected results.
server/ql/python/tools/test/CallGraphFromTo/CallGraphFromTo.qlref New python test query reference.
server/ql/ruby/tools/src/codeql-pack.yml Update ruby tool pack dependency versions.
server/ql/ruby/tools/src/codeql-pack.lock.yml Update ruby tool pack lock versions.
server/ql/ruby/tools/test/codeql-pack.lock.yml Update ruby tool test pack lock versions.
server/ql/ruby/tools/src/CallGraphFromTo/CallGraphFromTo.ql New ruby CallGraphFromTo query.
server/ql/ruby/tools/src/CallGraphFromTo/CallGraphFromTo.md New ruby CallGraphFromTo documentation.
server/ql/ruby/tools/test/CallGraphFromTo/Example1.rb New ruby test fixture.
server/ql/ruby/tools/test/CallGraphFromTo/CallGraphFromTo.expected New ruby expected results.
server/ql/ruby/tools/test/CallGraphFromTo/CallGraphFromTo.qlref New ruby test query reference.
server/ql/swift/tools/src/codeql-pack.yml Update swift tool pack dependency versions.
server/ql/swift/tools/src/codeql-pack.lock.yml Update swift tool pack lock versions.
server/ql/swift/tools/test/codeql-pack.lock.yml Update swift tool test pack lock versions.
server/ql/swift/tools/src/CallGraphFromTo/CallGraphFromTo.ql New swift CallGraphFromTo query.
server/ql/swift/tools/src/CallGraphFromTo/CallGraphFromTo.md New swift CallGraphFromTo documentation.
server/ql/swift/tools/test/CallGraphFromTo/Example1.swift New swift test fixture.
server/ql/swift/tools/test/CallGraphFromTo/CallGraphFromTo.expected New swift expected results.
server/ql/swift/tools/test/CallGraphFromTo/CallGraphFromTo.qlref New swift test query reference.

data-douser added a commit that referenced this pull request Mar 25, 2026
- Syncs "server/dist/**"
- Applies "codeql query format" rules for all server/ql/**/*.ql files
- Fixes formatting of markdown text in query markdown docs
- Addresses other PR review feedback for #168
@data-douser data-douser requested a review from Copilot March 25, 2026 12:38
@data-douser data-douser self-assigned this Mar 25, 2026
@data-douser data-douser added the enhancement New feature or request label Mar 25, 2026
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 95 out of 97 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

server/ql/go/tools/test/CallGraphFromTo/CallGraphFromTo.expected:2

  • CallGraphFromTo.expected is effectively empty, so the Go CallGraphFromTo unit test isn't asserting any behavior. Please add expected rows for the 3 calls in Example1.go (target→unrelated, intermediate→target, source→intermediate), or adjust the query/test setup so results are produced and verified.

Copilot AI review requested due to automatic review settings March 25, 2026 17:44
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 172 out of 175 changed files in this pull request and generated 7 comments.

Copilot AI review requested due to automatic review settings March 26, 2026 03:46
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 173 out of 175 changed files in this pull request and generated 2 comments.

@data-douser data-douser marked this pull request as ready for review March 26, 2026 12:31
@data-douser data-douser requested review from a team and enyil as code owners March 26, 2026 12:31
Copilot AI review requested due to automatic review settings March 26, 2026 12:31
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 173 out of 175 changed files in this pull request and generated 9 comments.

Comments suppressed due to low confidence (1)

server/src/lib/cli-tool-registry.ts:350

  • This comment says “Create qlpack.yml for the temporary extension pack”, but the code writes codeql-pack.yml. Please align the wording with the actual filename to prevent future mistakes.

@data-douser
Copy link
Copy Markdown
Collaborator Author

@copilot apply changes based on the comments in this thread

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 27, 2026

@copilot apply changes based on the comments in this thread

Applied in 254d0d5:

  • All 8 CallGraphFromTo.md files (cpp, csharp, go, java, javascript, python, ruby, swift): replaced "external predicates" with "extensible predicates populated via CodeQL data extensions / model packs (see ExternalPredicates.qll)"
  • cli-tool-registry.ts lines 300 and 339: updated comments from qlpack.ymlcodeql-pack.yml to match what the code actually writes

Copilot AI review requested due to automatic review settings March 27, 2026 13:18
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 173 out of 175 changed files in this pull request and generated 2 comments.

@data-douser
Copy link
Copy Markdown
Collaborator Author

@copilot apply changes based on the comments in this thread

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 27, 2026

@copilot apply changes based on the comments in this thread

Applied in 6229b14:

  • --model-packs now uses the exact version @0.0.0 instead of @*, making pack resolution deterministic and avoiding accidental matches against other packs with the same name.
  • Comma-split inputs (sourceFiles, sourceFunction, targetFunction) now filter out empty entries after trimming, preventing empty-string rows in the generated data extension YAML. The guard also skips adding the predicate key entirely if all values are empty after filtering.

data-douser and others added 9 commits March 27, 2026 12:32
- Add CallGraphFromTo.ql for cpp, csharp, go, java, javascript, python, ruby, swift
- Each query supports sourceFunction and targetFunction external predicates
- Include documentation (.md) and test suites with expected outputs
- Update QL pack dependencies to latest versions
- Fix go PrintAST query for compatibility with v2.25.0
- Fix java PrintCFG query for compatibility with v2.25.0

Closes #164
- Syncs "server/dist/**"
- Applies "codeql query format" rules for all server/ql/**/*.ql files
- Fixes formatting of markdown text in query markdown docs
- Addresses other PR review feedback for #168
Go query test fixes:
- Add go.mod to CallGraphFromTo, CallGraphFrom, CallGraphTo test dirs
  (Go extractor requires module file for proper extraction)
- Add main() function to all Go Example1.go test files
- Fix fallback filter in all 3 Go call graph queries:
  getParentContainer().getParentContainer().getBaseName() = "test"
  → getFile().getBaseName() = "Example1.go"
- Update all Go .expected files with non-empty results (4-5 rows each)

VSIX packaging fix:
- Add .tmp/** to .vscodeignore (was bundling 177MB of test databases)
- VSIX size: 71.48MB → 788KB
Replace `external string` declarations with `extensible predicate` syntax
across all 8 languages, enabling YAML-based data extensions for testing
instead of fragile fallback hacks.

Architecture:
- Add ExternalPredicates.qll per language with shared extensible predicate
  declarations (sourceFunction, targetFunction, selectedSourceFiles)
- Add dataExtensions YAML files in test/*/ext/ directories providing
  test values for each query's external predicates
- Add dataExtensions glob to all test pack codeql-pack.yml files
- Remove all "Fallback for unit tests" or clauses from queries

This means:
- Tests now exercise the actual external predicate logic path
- No more path-based hacks (getParentContainer().getBaseName() = "test")
- CallGraphFromTo tests produce precise source→target results
- New queries only need a .model.yml file, not query modifications
Copilot AI review requested due to automatic review settings March 27, 2026 18:34
@data-douser data-douser force-pushed the dd/call-graph-from-to branch from 6229b14 to f374cb6 Compare March 27, 2026 18:34
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 173 out of 176 changed files in this pull request and generated 4 comments.

@data-douser data-douser merged commit 39b7e80 into main Mar 27, 2026
26 checks passed
@data-douser data-douser deleted the dd/call-graph-from-to branch March 27, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants