Skip to content

Another blackbox calls PR + interprocedural documentation and cleanup - #63

Merged
KevinHock merged 59 commits into
masterfrom
testing_djangonv
Nov 12, 2017
Merged

KevinHock merged 59 commits into
masterfrom
testing_djangonv

Conversation

@KevinHock

@KevinHock KevinHock commented Sep 6, 2017 •

Copy link
Copy Markdown
Collaborator

This aims to fix #45 but leaves out the 'ask the user' part for the mapping for another PR. (Mapping here being, "Hey I noticed you called scrypt.encrypt with the 1st arg tainted, does it return a tainted value? Yes/No" with a future improvement of "what sinks are it tainted for?" e.g. SQL not XSS.

PR almost done, I just need to add traversing keyword_args, adjusting remaining tests and of course cleanup.

KevinHock added 30 commits June 9, 2017 13:51
…ll_index into a stack and (b) OR (or add) all ret values to OR taint
…nse(html.replace('{{ param }}', param)) are both popping
Comment thread pyt/interprocedural_cfg.py Outdated
return_value_of_nested_call = self.visit(call_arg)
if return_value_of_nested_call in self.blackbox_calls:
logger.debug("[Little collins] nested blackbox call, ouchie")
raise

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Wait what, there's no test for nested blackbox calls? Make one if not.

Comment thread pyt/interprocedural_cfg.py Outdated
def_node.lineno,
saved_function_call_index)
function_nodes = self.visit_and_get_function_nodes(definition)
self.filenames.pop() # Should really probably move after restore_saved_local_scope!!!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Investigate this or just be lazy and make a GitHub issue for it.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Made an issue.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

(Just looking to document the code that triggers the bug.)


return self.add_builtin(node)

def add_class(self, call_node, def_node):

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This was dead-code, but we should figure out where we're at with class support and write more tests.

Comment thread pyt/label_visitor.py Outdated
@@ -1,3 +1,4 @@
"""FILL ME IN"""

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Maybe just add an e.g. for sample input and output from the tests.

@KevinHock
KevinHock merged commit 6effd76 into master Nov 12, 2017
@KevinHock

Copy link
Copy Markdown
Collaborator Author

Boom.

@KevinHock
KevinHock deleted the testing_djangonv branch March 16, 2018 03:21
@KevinHock KevinHock mentioned this pull request Mar 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Blackbox functions return tainted value (false positives)

1 participant