Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Simplify trigger file for sink argument propagation #182

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

Merged
bcaller merged 1 commit into python-security:master from bcaller:simplifydefinitions
Nov 1, 2018

Conversation

Copy link
Collaborator

@bcaller bcaller commented Oct 31, 2018

This changes the schema of the trigger file.

Previously there were too many options and it was confusing. My fault,
sorry.

This meant that db.execute(query, **TAINT) was marked as a
vulnerability whereas db.execute(text=query, **TAINT) wasn't.

Neither are vulnerabilities, so this gave a FALSE POSITIVE.

Now we have arg_dict which is a dictionary of keyword to argument
position.

E.g. for def f(a, b, *, c) we can specify the arg_dict as:

{"a": 0, "b": 1, "c": null}

if we want them all to propagate or not propagate depending on the
unlisted_args_propagate value.

This way, we can more easily define db.execute as:

 "execute(": {
 "unlisted_args_propagate": false,
 "arg_dict": {
 "text": 0
 }
 },

KevinHock and fkromer reacted with thumbs up emoji KevinHock reacted with hooray emoji KevinHock reacted with heart emoji
This changes the schema of the trigger file.
Previously there were too many options and it was confusing. My fault,
sorry.
This meant that `db.execute(query, **TAINT)` was marked as a
vulnerability whereas `db.execute(text=query, **TAINT)` wasn't.
Neither are vulnerabilities, so this gave a FALSE POSITIVE.
Now we have `arg_dict` which is a dictionary of keyword to argument
position.
E.g. for `def f(a, b, *, c)` we can specify the arg_dict as:
```
{"a": 0, "b": 1, "c": null}
```
if we want them all to propagate or not propagate depending on the
`unlisted_args_propagate` value.
This way, we can more easily define db.execute as:
```
 "execute(": {
 "unlisted_args_propagate": false,
 "arg_dict": {
 "text": 0
 }
 },
```
@KevinHock KevinHock self-requested a review October 31, 2018 18:19
Copy link
Collaborator

@KevinHock KevinHock left a comment

Choose a reason for hiding this comment

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

LGTM, simplified indeed 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@KevinHock KevinHock KevinHock approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /