C++/C#: Specify additional CWE tags for queries that specify CWE 114#22149
Merged
Conversation
After almost 4 years it does not seem to be relevant anymore to propagate this to the change log.
Use of CWE-114 is discoraged, and CWE-73 seems appropriate as the assembly path is user controlled here.
User controlled data here either leads to the loading of an uncontrolled library (CWE 73) or the execution of an uncontrolled command (CWE 78).
Contributor
There was a problem hiding this comment.
Pull request overview
Updates query metadata for the C++ and C# CWE-114 queries to include additional CWE tags (per issue #22131’s concern about CWE-114’s “discouraged” mapping), and records the metadata change in change notes.
Changes:
- Add
external/cwe/cwe-073to the C#cs/assembly-path-injectionquery metadata. - Add
external/cwe/cwe-073andexternal/cwe/cwe-078to the C++cpp/uncontrolled-process-operationquery metadata. - Add new query-metadata change-note entries for both languages (and delete an older C# released change-note file).
Show a summary per file
| File | Description |
|---|---|
| csharp/ql/src/Security Features/CWE-114/AssemblyPathInjection.ql | Adds an additional CWE tag (cwe-073) to the query metadata header. |
| cpp/ql/src/Security/CWE/CWE-114/UncontrolledProcessOperation.ql | Adds additional CWE tags (cwe-073, cwe-078) to the query metadata header. |
| csharp/ql/src/change-notes/2026-07-09-CWE-114.md | Adds a change note for the C# query metadata update. |
| cpp/ql/src/change-notes/2026-07-09-CWE-114.md | Adds a change note for the C++ query metadata update. |
| csharp/ql/src/change-notes/released/2022-11-07-constant-expression.md | Deletes an older released change-note entry unrelated to CWE-114 metadata. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 1
- Review effort level: Low
geoffw0
approved these changes
Jul 9, 2026
geoffw0
left a comment
Contributor
There was a problem hiding this comment.
Agreed. Thanks for fixing this!
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.
This addresses #22131 for all queries that specify CWE 114. I kept the CWE 114 tag, as customers might depend on this.
See individual commit messages for further motivation.
Note that the changelog CI failure is incorrect (it errors on the removed change note).