Rust: Make source kinds consistent with other languages#19333
Merged
geoffw0 merged 2 commits intogithub:mainfrom Apr 17, 2025
Merged
Rust: Make source kinds consistent with other languages#19333geoffw0 merged 2 commits intogithub:mainfrom
geoffw0 merged 2 commits intogithub:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request updates the source kind strings in the Rust standard library environment model to align with naming conventions used in other languages and the CodeQL threat model documentation.
- Renames command-line source kinds to "commandargs".
- Renames environment source kinds to "environment".
Files not reviewed (4)
- rust/ql/lib/codeql/rust/Concepts.qll: Language not supported
- rust/ql/test/query-tests/security/CWE-020/RegexInjection.expected: Language not supported
- rust/ql/test/query-tests/security/CWE-089/SqlInjection.expected: Language not supported
- rust/ql/test/query-tests/security/CWE-770/UncontrolledAllocationSize.expected: Language not supported
Comments suppressed due to low confidence (2)
rust/ql/lib/codeql/rust/frameworks/stdlib/env.model.yml:6
- [nitpick] The source kind 'commandargs' replaces the previous 'command-line-source'. Confirm that this naming is consistently applied across the codebase and aligns with our naming conventions as referenced in the documentation.
- ["lang:std", "crate::env::args", "ReturnValue.Element", "commandargs", "manual"]
rust/ql/lib/codeql/rust/frameworks/stdlib/env.model.yml:11
- [nitpick] The renaming to 'environment' updates the prior 'environment-source'. Please verify that all external references and documentation are updated to reflect this change.
- ["lang:std", "crate::env::var", "ReturnValue.Field[crate::result::Result::Ok(0)]", "environment", "manual"]
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.
Make source kinds consistent with other languages and https://github.com/github/codeql/blob/main/docs/codeql/reusables/threat-model-description.rst . Somehow we ended up with different strings for
environmentandcommandargssources.