-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Rust: Models-as-data for flow summaries #18231
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
Conversation
7d0e44d
to
789abc3
Compare
} | ||
|
||
// has a flow model | ||
fn get_struct_field(s: MyStruct) -> i64 { |
Check notice
Code scanning / CodeQL
Unused variable Note test
} | ||
|
||
// has a flow model | ||
fn set_struct_field(i: i64) -> MyStruct { |
Check notice
Code scanning / CodeQL
Unused variable Note test
} | ||
|
||
// has a flow model | ||
fn get_array_element(a: [i64; 1]) -> i64 { |
Check notice
Code scanning / CodeQL
Unused variable Note test
} | ||
|
||
// has a flow model | ||
fn set_array_element(i: i64) -> [i64; 1] { |
Check notice
Code scanning / CodeQL
Unused variable Note test
} | ||
|
||
// has a flow model | ||
fn get_tuple_element(a: (i64, i64)) -> i64 { |
Check notice
Code scanning / CodeQL
Unused variable Note test
} | ||
|
||
// has a flow model | ||
fn set_tuple_element(i: i64) -> (i64, i64) { |
Check notice
Code scanning / CodeQL
Unused variable Note test
789abc3
to
2f8b04b
Compare
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.
This looks fantastic, exactly what I'm looking for!
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.
LGTM.
* `"taint"` indicates a default additional taint step and `"value"` indicates a | ||
* globally applicable value-preserving step. | ||
* 5. The `provenance` column is mainly used internally, and should be set to `"manual"` for | ||
* all custom models. |
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.
This is great, thanks for writing it up!
Adds support for writing model-as-data flow summaries for Rust. This includes flow through variants, records, arrays, and tuples. The format is as follows
For example, the flow summary for
unwrap
isAlthough this PR also adds the extensible predicates for sources and sinks, they are not yet working.