Update OS Command Injection Plugin to Include All Test Cases#77
Update OS Command Injection Plugin to Include All Test Cases#77shayancha wants to merge 5 commits into
Conversation
Can you elaborate on this bug a bit more? Would it occur for something like this? With only |
bliutech
left a comment
There was a problem hiding this comment.
Looks like a good start. I think we need to also add harnesses for each test case to this plugin as well.
Yes, exactly! |
|
Got it. I think we need to tie the lifetime of the import cache directly to the |
|
I adjusted However, @tm.patch.function(
"dataset.cwe_78_os_command_injection.secure_novalidation.app.is_safe_path"
)
def patched_is_safe_path(path):
return original_function(path)I get different behavior than if I don't monkey patch, which shouldn't be the case. When I monkey patch, is_safe_path isn't actually blocking any inputs from continuing to a sink. |
SeabassMarket
left a comment
There was a problem hiding this comment.
We are going to rewrite plugins soon to follow the new streamlined format. Just clean it up a bit, and then we'll merge.
Went through all OS command injection test cases and added patched sources to the taintmonkey() fixture.
All test cases execute predictably when only the necessary sink function is included in the SINKS list.
However, there is a bug for the use case where multiple sink functions are included in SINKS and the last element is not the appropriate sink function for the test case being executed.