-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Rust: Add sinks for tracing #22341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
geoffw0
wants to merge
10
commits into
github:main
Choose a base branch
from
geoffw0:logsinks
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,492
−518
Open
Rust: Add sinks for tracing #22341
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
55364c0
Rust: Test more logging variants.
geoffw0 683fc46
Rust: Add QL sink models for the "tracing" crate.
geoffw0 d8c4e46
Rust: Change note.
geoffw0 95b210c
Rust: Extend the new sinks to cover rust/log-injection as well.
geoffw0 6d1b158
Rust: Add tracing to supported frameworks.
geoffw0 7f6ceb3
Rust: Add a few test cases for log injection as well.
geoffw0 a3358e4
Rust: Accept consistency test changes. There's a bit of noise here.
geoffw0 5274582
Rust: Add a few more test cases.
geoffw0 2ed53db
Rust: Limit sinks to the inner tracing macros, not wrappers as well.
geoffw0 d0126bf
Rust: Limit sinks within the tracing macros.
geoffw0 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| --- | ||
| category: minorAnalysis | ||
| --- | ||
| * Added cleartext logging flow sink models for the "tracing" crate. This may cause additional results to be found for the "Cleartext logging of sensitive information" (`rust/cleartext-logging`) and "Log injection" (`rust/log-injection`) queries. |
21 changes: 20 additions & 1 deletion
21
rust/ql/test/query-tests/security/CWE-117/CONSISTENCY/PathResolutionConsistency.expected
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,21 @@ | ||
| multipleResolvedTargets | ||
| | main.rs:123:28:123:48 | ...::from(...) | | ||
| | main.rs:128:28:128:48 | ...::from(...) | | ||
| multiplePathResolutions | ||
| | main.rs:122:9:122:23 | ...::__macro_support | | ||
| | main.rs:122:9:122:23 | ...::__macro_support | | ||
| | main.rs:122:9:122:23 | ...::__macro_support | | ||
| | main.rs:122:9:122:23 | ...::__macro_support | | ||
| | main.rs:122:9:122:23 | ...::__macro_support | | ||
| | main.rs:122:9:122:23 | ...::field | | ||
| | main.rs:123:9:123:22 | ...::__macro_support | | ||
| | main.rs:123:9:123:22 | ...::__macro_support | | ||
| | main.rs:123:9:123:22 | ...::__macro_support | | ||
| | main.rs:123:9:123:22 | ...::__macro_support | | ||
| | main.rs:123:9:123:22 | ...::__macro_support | | ||
| | main.rs:123:9:123:22 | ...::field | | ||
| | main.rs:124:9:124:23 | ...::__macro_support | | ||
| | main.rs:124:9:124:23 | ...::__macro_support | | ||
| | main.rs:124:9:124:23 | ...::__macro_support | | ||
| | main.rs:124:9:124:23 | ...::__macro_support | | ||
| | main.rs:124:9:124:23 | ...::__macro_support | | ||
| | main.rs:124:9:124:23 | ...::field | |
6 changes: 6 additions & 0 deletions
6
rust/ql/test/query-tests/security/CWE-117/CONSISTENCY/VariableCaptureConsistency.expected
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| uniqueCfgNode | ||
| | main.rs:122:9:122:23 | (...) | Expr has no cfg node | | ||
| | main.rs:123:9:123:22 | (...) | Expr has no cfg node | | ||
| | main.rs:124:25:124:44 | (...) | Expr has no cfg node | | ||
| consistencyOverview | ||
| | Expr has no cfg node | 3 | |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.