Skip to content

Conversation

yoff
Copy link
Contributor

@yoff yoff commented May 12, 2023

In the first commit we remove the explicit steps, in the second we add flow summaries. Viewing test file changes for all commits shows the end result of the swap, while viewing changes for individual commits reveals the effect of removing the explicit steps.

In the third commit, we remove nodes with no location from the basic dataflow and taint flow tests, as they do not really scale with many flow summaries.

The CI validating that tests pass on all commits, can be seen in the Commits tab.

@yoff yoff force-pushed the python/container-summaries-1 branch 3 times, most recently from 5b96644 to 103a0d9 Compare May 15, 2023 19:02
@yoff yoff force-pushed the python/container-summaries-1 branch from f843551 to d908241 Compare May 16, 2023 08:35
yoff added 2 commits May 16, 2023 14:38
Also:
- turn on flow summaries for taint
- do not restrict node type
  (as now we need summary nodes)
@yoff yoff force-pushed the python/container-summaries-1 branch 2 times, most recently from 5d68473 to 145eaf3 Compare May 16, 2023 12:45
@yoff yoff marked this pull request as ready for review May 17, 2023 07:25
@yoff yoff requested a review from a team as a code owner May 17, 2023 07:25
@yoff yoff added the no-change-note-required This PR does not need a change note label May 17, 2023
@yoff
Copy link
Contributor Author

yoff commented May 17, 2023

I am thinking to not add a change note yet, but add one when all the container steps are merged...happy to hear other suggestions, though.

Copy link
Member

@RasmusWL RasmusWL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 🎉

Obviously we need to check the change with DCA first; both performance, and (hopefully) new results 🤞 EDIT: I see this was already done ✔️

@@ -159,7 +162,7 @@ predicate stringManipulation(DataFlow::CfgNode nodeFrom, DataFlow::CfgNode nodeT
* is currently very imprecise, as an example, since we model `dict.get`, we treat any
* `<tainted object>.get(<arg>)` will be tainted, whether it's true or not.
*/
predicate containerStep(DataFlow::CfgNode nodeFrom, DataFlow::Node nodeTo) {
predicate containerStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: I don't think this change was required, but it doesn't matter 🤷

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact it matters greatly, since some flow steps will now involve nodes generated by flow summaries. It may not be visible until more summaries are added and we look at load and store steps, but in the branch with all the summaries, it makes a huge difference :-)

Comment on lines +59 to +60
or
FlowSummaryImpl::Private::Steps::summaryLocalStep(nodeFrom, nodeTo, false)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this is also done by other languages that utilize flow-summaries?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, and in hindsight, it should have been added with the summary work; I think I just overlooked it back then..

@yoff yoff merged commit 1c6d643 into github:main May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-change-note-required This PR does not need a change note Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants