-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Rust: Data flow improvements to unlock flow in sqlx test #18291
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
Changes from 1 commit
df03751
aab3428
defbbb2
cad4f39
402d4e1
ee87d4c
d8c301a
c1e2197
049fab4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| extensions: | ||
| - addsTo: | ||
| pack: codeql/rust-all | ||
| extensible: summaryModel | ||
| data: | ||
| - ["repo:https://github.com/seanmonstar/reqwest:reqwest", "<crate::blocking::response::Response>::text", "Argument[self]", "ReturnValue", "taint", "manual"] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,4 +3,17 @@ extensions: | |
| pack: codeql/rust-all | ||
| extensible: summaryModel | ||
| data: | ||
| # Option | ||
| - ["lang:core", "<crate::option::Option>::unwrap", "Argument[self].Variant[crate::option::Option::Some(0)]", "ReturnValue", "value", "manual"] | ||
| - ["lang:core", "<crate::option::Option>::unwrap", "Argument[self]", "ReturnValue", "taint", "manual"] | ||
|
||
| - ["lang:core", "<crate::option::Option>::unwrap_or", "Argument[self].Variant[crate::option::Option::Some(0)]", "ReturnValue", "value", "manual"] | ||
| - ["lang:core", "<crate::option::Option>::unwrap_or", "Argument[0]", "ReturnValue", "value", "manual"] | ||
| - ["lang:core", "<crate::option::Option>::unwrap_or", "Argument[self]", "ReturnValue", "taint", "manual"] | ||
| # Result | ||
| - ["lang:core", "<crate::result::Result>::unwrap", "Argument[self].Variant[crate::result::Result::Ok(0)]", "ReturnValue", "value", "manual"] | ||
| - ["lang:core", "<crate::result::Result>::unwrap", "Argument[self]", "ReturnValue", "taint", "manual"] | ||
| - ["lang:core", "<crate::result::Result>::unwrap_or", "Argument[self].Variant[crate::result::Result::Ok(0)]", "ReturnValue", "value", "manual"] | ||
| - ["lang:core", "<crate::result::Result>::unwrap_or", "Argument[0]", "ReturnValue", "value", "manual"] | ||
| - ["lang:core", "<crate::result::Result>::unwrap_or", "Argument[self]", "ReturnValue", "taint", "manual"] | ||
| # String | ||
| - ["lang:alloc", "<crate::string::String>::as_str", "Argument[self]", "ReturnValue", "taint", "manual"] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,7 +12,7 @@ fn test_env_vars() { | |
| let var2 = std::env::var_os("PATH").unwrap(); // $ Alert[rust/summary/taint-sources] | ||
|
|
||
| sink(var1); // $ MISSING: hasTaintFlow | ||
| sink(var2); // $ MISSING: hasTaintFlow | ||
| sink(var2); // $ hasTaintFlow | ||
|
|
||
| for (key, value) in std::env::vars() { // $ Alert[rust/summary/taint-sources] | ||
| sink(key); // $ MISSING: hasTaintFlow | ||
|
|
@@ -61,7 +61,7 @@ async fn test_reqwest() -> Result<(), reqwest::Error> { | |
| sink(remote_string1); // $ MISSING: hasTaintFlow | ||
|
|
||
| let remote_string2 = reqwest::blocking::get("http://example.com/").unwrap().text().unwrap(); // $ Alert[rust/summary/taint-sources] | ||
| sink(remote_string2); // $ MISSING: hasTaintFlow | ||
| sink(remote_string2); // $ hasTaintFlow | ||
|
||
|
|
||
| let remote_string3 = reqwest::get("http://example.com/").await?.text().await?; // $ Alert[rust/summary/taint-sources] | ||
| sink(remote_string3); // $ MISSING: hasTaintFlow | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it should be
ReturnValue.Variant[crate::result::Result::Ok(0)].