Skip to content
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

Add more patterns for code execution (Python) #499

Open
ocku opened this issue Dec 7, 2024 · 3 comments
Open

Add more patterns for code execution (Python) #499

ocku opened this issue Dec 7, 2024 · 3 comments

Comments

@ocku
Copy link

ocku commented Dec 7, 2024

in https://github.com/DataDog/guarddog/blob/v2.1.0/guarddog/analyzer/sourcecode/code-execution.yml#L114

eval could also be accessed through:

  • getattr(globals()['__builtins__'], EVAL_STR)

where EVAL_STR could be:

  • 'eval'
  • '\x65\x76\x61\x6c' (hex)
  • '\u0065\u0076\u0061\u006c' (unicode)
  • '\145\166\141\154' (octal)

Image

@ocku
Copy link
Author

ocku commented Dec 7, 2024

I have noticed that the same applies to exec
Image

@ocku
Copy link
Author

ocku commented Dec 7, 2024

Let me know if I can work on this :)

@sobregosodd
Copy link
Contributor

Hello @ocku , thanks for reaching out.
Please, send the PR well look into it.

Thanks again!

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

No branches or pull requests

2 participants