Skip to content

Python: container summaries, part 3#13395

Merged
yoff merged 6 commits into
github:mainfrom
yoff:python/container-summaries-3
Jun 14, 2023
Merged

Python: container summaries, part 3#13395
yoff merged 6 commits into
github:mainfrom
yoff:python/container-summaries-3

Conversation

@yoff
Copy link
Copy Markdown
Contributor

@yoff yoff commented Jun 7, 2023

In which we remove the final explicit taint steps from containerStep.

@github-actions github-actions Bot added the Python label Jun 7, 2023
yoff added 2 commits June 13, 2023 20:22
For append/add:
The new results in the experimental tar slip query
show that we do not recognize the sanitisers.
@yoff yoff force-pushed the python/container-summaries-3 branch 2 times, most recently from 4b4b9bf to b72c93f Compare June 13, 2023 19:13
@yoff yoff marked this pull request as ready for review June 13, 2023 19:56
@yoff yoff requested a review from a team as a code owner June 13, 2023 19:56
@yoff yoff added the Awaiting evaluation Do not merge yet, this PR is waiting for an evaluation to finish label Jun 13, 2023
Copy link
Copy Markdown
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.

Really nice to see so many MISSING: being fixed 💪 🎉 (just a few questions that needs to be resolved)

Comment on lines +4337 to +4345
// existing elements
input = "Argument[self].ListElement" and
output = "ReturnValue.ListElement" and
preservesValue = true
or
// newly added element returned
input = "Argument[0]" and
output = "ReturnValue.ListElement" and
preservesValue = true
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't see list.append having a return value. What are these flows about? 😕

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hm, not sure where I got this from. Neither the linked documentation nor a local experiment agrees with this..

Comment on lines +4357 to +4360
// transfer taint from new element to return value
input = "Argument[0]" and
output = "ReturnValue" and
preservesValue = false
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Also this

Comment thread python/ql/lib/semmle/python/frameworks/Stdlib.qll Outdated
Comment on lines +4379 to +4388
// existing elements
input = "Argument[self].SetElement" and
output = "ReturnValue.SetElement" and
preservesValue = true
or
// newly added element returned
input = "Argument[0]" and
output = "ReturnValue.SetElement" and
preservesValue = true
or
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same as above, set.add doesn't seem to have a return value when I try it out in a real ipython scenario

Comment on lines +4398 to +4402
or
// transfer taint from new element to return value
input = "Argument[0]" and
output = "ReturnValue" and
preservesValue = false
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

same

Comment thread python/ql/lib/semmle/python/frameworks/Stdlib.qll Outdated
Comment thread python/ql/lib/change-notes/2023-06-13-container-store-steps.md Outdated
yoff and others added 2 commits June 14, 2023 13:27
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
Comment on lines +4337 to +4341
// existing elements
input = "Argument[self].ListElement" and
output = "ReturnValue.ListElement" and
preservesValue = true
or
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Seems like you missed these two?

Suggested change
// existing elements
input = "Argument[self].ListElement" and
output = "ReturnValue.ListElement" and
preservesValue = true
or

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Indeed, thanks :-)

Comment on lines +4369 to +4373
// existing elements
input = "Argument[self].SetElement" and
output = "ReturnValue.SetElement" and
preservesValue = true
or
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Seems like you missed these two?

Suggested change
// existing elements
input = "Argument[self].SetElement" and
output = "ReturnValue.SetElement" and
preservesValue = true
or

`set.add` and `list.append` do not return a value
@yoff yoff merged commit f5f822c into github:main Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Awaiting evaluation Do not merge yet, this PR is waiting for an evaluation to finish documentation Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants