Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 2.1k
Update diff-informed testing to always treat sources and sinks as alert locations#20607
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
3fa8259890ca8ebb10307d36b72178f2cee9c24ce0a972ef71243c635a1a887ad31f1aba22f0d7722f3159a8e9b913550fa2289361129230b0238804482e83dc1dff99eeeec3eebff9c247ae1d72a9777697f4282a889f44439322518c081f24a6f62a30ea971cf0429434325bcdbe0bbb80d83baccdcc37fff486d573164bc9ede998de141ff24cb6519bd950f2540495be516ede0a7462d8c52332ceac190fae6c52d4b7ba7c435a6f731cd86e7d895bd938a750b31f53ffbedc72d2c40223362fde8f974d174464f6cb65d79ffa4ac0392756e82f7a1a4c0ed27f417b261ad89aa0fb018040bbe2bf21321cbbf3d51e0a65d4d5ec63547d41268f0f0bd0f4952cb28e0c45396e1536a0975e7File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -124,7 +124,8 @@ module UncontrolledArithConfig implements DataFlow::ConfigSig { | ||
| predicate observeDiffInformedIncrementalMode() { any() } | ||
| Location getASelectedSourceLocation(DataFlow::Node source) { | ||
| result = getExpr(source).getLocation() | ||
| isSource(source) and | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this needed? ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's not necessary for correctness, but it reduces the size of | ||
| result = [getExpr(source).getLocation(), source.getLocation()] | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -132,7 +132,7 @@ module UnhandledFileCloseConfig implements DataFlow::ConfigSig { | ||||||||||||
| predicate observeDiffInformedIncrementalMode() { any() } | ||||||||||||
| Location getASelectedSourceLocation(DataFlow::Node source) { | ||||||||||||
| exists(DataFlow::CallNode openCall | result = openCall.getLocation() | | ||||||||||||
| exists(DataFlow::CallNode openCall | result = [openCall.getLocation(), source.getLocation()] | | ||||||||||||
| isWritableFileHandle(source, openCall) | ||||||||||||
Comment on lines
+135
to
136
CopilotAI | ||||||||||||
| exists(DataFlow::CallNodeopenCall|result=[openCall.getLocation(), source.getLocation()]| | |
| isWritableFileHandle(source, openCall) | |
| exists(DataFlow::CallNodeopenCall| | |
| isWritableFileHandle(source, openCall)and | |
| (result=openCall.getLocation()orresult=source.getLocation()) |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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.
Yes, great. A sink location is only relevant if the below holds.