docs(csharp): fix stale comment on codeql/csharp-queries dependency - #211
Merged
Conversation
The comment claimed this dependency was 'Required for Dependencies.ql', but that stopped being true in commit 8913c63 (Jan 2025), which switched Dependencies.ql's import from the queries-pack-only 'Telemetry.ExternalApi' to 'semmle.code.csharp.telemetry.ExternalApi', which ships in codeql/csharp-all. The dependency is still required, but for a different reason: suites/csharp-audit.qls and suites/csharp-external-api.qls both pull the upstream cs/untrusted-data-to-external-api query 'from: codeql/csharp-queries', which only lives in the queries pack, not csharp-all. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e78d3f00-2ea0-459b-86a2-91adc0e31c50
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates an inline comment in the C# query pack’s qlpack.yml to correctly explain why the codeql/csharp-queries dependency is still required (it is referenced by shipped suite files, not by audit/explore/Dependencies.ql anymore).
Changes:
- Corrected the
codeql/csharp-queriesdependency comment to point tosuites/csharp-audit.qlsandsuites/csharp-external-api.qlsas the reason the dependency must remain. - No version, lockfile, or query logic changes.
Show a summary per file
| File | Description |
|---|---|
| csharp/src/qlpack.yml | Updates the dependency comment to reflect the actual suite-level dependency on codeql/csharp-queries. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fixes an inaccurate inline comment on the
codeql/csharp-queriesdependency incsharp/src/qlpack.yml.Why
The comment said this dependency was
# Required for Dependencies.ql. That was true when it was added in 2023, but stopped being true in commit8913c63("Fix various compilation issues", Jan 2025), which switchedcsharp/src/audit/explore/Dependencies.ql's import fromTelemetry.ExternalApi(a module that only lives in thecodeql/csharp-queriespack) tosemmle.code.csharp.telemetry.ExternalApi(which ships insidecodeql/csharp-all). Nobody updated the comment (or checked whether the dependency itself could be dropped) at the time.Investigation
I initially assumed the dependency itself was now unused and could be removed (matching go/java/python/javascript/ruby, none of which depend on their
-queriespack). That's wrong:suites/csharp-audit.qlsandsuites/csharp-external-api.qlsboth explicitly pull the upstreamcs/untrusted-data-to-external-apiqueryfrom: codeql/csharp-queries— that query only exists in the queries pack, not-all. Both suites are actively used (configs/audit.yml,configs/synthetics.yml), so the dependency must stay. This mirrors cpp'scodeql/cpp-queriesdependency, which pullscpp/untrusted-data-to-external-apithe same way (and cpp'sDependencies.qlstill genuinely needsMetrics.Dependencies.ExternalDependencies, which is queries-pack-only upstream).Change
Only the comment changes, to correctly explain why the dependency is kept:
No dependency versions, lock files, or query logic changed. Verified
csharp/src/audit/explore/Dependencies.qlstill compiles.Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com
Copilot-Session: e78d3f00-2ea0-459b-86a2-91adc0e31c50