Skip to content

Conversation

@dwBruijn
Copy link

@dwBruijn dwBruijn commented Jan 5, 2026

Hello,

Added patterns to code-execution rule to detect malicious packages using compile() and vars(__builtins__) indirection to access exec(), eval(), and compile().

These patterns were not being detected:

vars(__builtins__)['exec']("malicious code")
vars(__builtins__).get('eval')("malicious code")
vars(globals()['__builtins__'])['exec'](...)
vars(locals()['__builtins__'])['eval'](...)
compile(__import__('base64').b64decode('...'), '<string>', 'exec')

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.

1 participant