coretrace-python-analyzer 0.10.0__py3-none-any.whl → 0.11.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- coretrace_python/__init__.py +1 -1
- coretrace_python/bundled/models/python_stdlib/python_stdlib.py +3 -2
- coretrace_python/bundled/security/code_injection/code_injection.py +19 -0
- coretrace_python/bundled/security/code_injection/plugin.toml +9 -0
- {coretrace_python_analyzer-0.10.0.dist-info → coretrace_python_analyzer-0.11.0.dist-info}/METADATA +1 -1
- {coretrace_python_analyzer-0.10.0.dist-info → coretrace_python_analyzer-0.11.0.dist-info}/RECORD +10 -8
- {coretrace_python_analyzer-0.10.0.dist-info → coretrace_python_analyzer-0.11.0.dist-info}/WHEEL +0 -0
- {coretrace_python_analyzer-0.10.0.dist-info → coretrace_python_analyzer-0.11.0.dist-info}/entry_points.txt +0 -0
- {coretrace_python_analyzer-0.10.0.dist-info → coretrace_python_analyzer-0.11.0.dist-info}/licenses/LICENSE +0 -0
- {coretrace_python_analyzer-0.10.0.dist-info → coretrace_python_analyzer-0.11.0.dist-info}/licenses/NOTICE +0 -0
coretrace_python/__init__.py
CHANGED
|
@@ -57,8 +57,9 @@ class PythonStdlibModels(ModelPlugin):
|
|
|
57
57
|
Sink(_sym("subprocess.check_call"), TaintKind.COMMAND),
|
|
58
58
|
Sink(_sym("subprocess.check_output"), TaintKind.COMMAND),
|
|
59
59
|
Sink(_sym("subprocess.Popen"), TaintKind.COMMAND),
|
|
60
|
-
|
|
61
|
-
Sink(_sym("builtins.
|
|
60
|
+
# The code is the first argument; the globals and locals it runs with are data.
|
|
61
|
+
Sink(_sym("builtins.eval"), TaintKind.CODE, ((TaintKind.CODE, (0,)),)),
|
|
62
|
+
Sink(_sym("builtins.exec"), TaintKind.CODE, ((TaintKind.CODE, (0,)),)),
|
|
62
63
|
Sink(_sym("builtins.open"), TaintKind.PATH),
|
|
63
64
|
Sink(_sym("os.remove"), TaintKind.PATH),
|
|
64
65
|
Sink(_sym("os.unlink"), TaintKind.PATH),
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""Code injection: attacker-controlled input reaching a CODE sink, such as the code
|
|
2
|
+
``eval`` or ``exec`` runs. ``dangerous-eval`` reports every such call; this rule reports
|
|
3
|
+
the ones attacker input reaches."""
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from typing import ClassVar
|
|
8
|
+
|
|
9
|
+
from coretrace_python.findings import Severity
|
|
10
|
+
from coretrace_python.plugins import TaintDetector
|
|
11
|
+
from coretrace_python.taint import TaintKind
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class CodeInjectionPlugin(TaintDetector):
|
|
15
|
+
name: ClassVar[str] = "code-injection"
|
|
16
|
+
rule_id: ClassVar[str] = "code-injection"
|
|
17
|
+
kind: ClassVar[TaintKind] = TaintKind.CODE
|
|
18
|
+
severity: ClassVar[Severity] = Severity.HIGH
|
|
19
|
+
title: ClassVar[str] = "Code injection"
|
{coretrace_python_analyzer-0.10.0.dist-info → coretrace_python_analyzer-0.11.0.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: coretrace-python-analyzer
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.11.0
|
|
4
4
|
Summary: Static security analysis infrastructure for Python code
|
|
5
5
|
Project-URL: Homepage, https://github.com/CoreTrace/coretrace-python-analyzer
|
|
6
6
|
Project-URL: Repository, https://github.com/CoreTrace/coretrace-python-analyzer
|
{coretrace_python_analyzer-0.10.0.dist-info → coretrace_python_analyzer-0.11.0.dist-info}/RECORD
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
coretrace_python/__init__.py,sha256=
|
|
1
|
+
coretrace_python/__init__.py,sha256=lwZwSBKMQK9wIdXsR7HCxeMNGo0vXmvI-7UK0Q66xu4,76
|
|
2
2
|
coretrace_python/__main__.py,sha256=V8DnYtRboISK2VCKm7DGHLREKvqLbqApyWlKBOs26wU,65
|
|
3
3
|
coretrace_python/cache.py,sha256=-pZv-ELm4jMCTXQWSZIobHaT9UHIjFu7IlMkOM0i4LI,13607
|
|
4
4
|
coretrace_python/cli.py,sha256=G5jhb6g6RgSRSjjS7DBgziIjUM1vTFwalJGvFHVKxrg,11225
|
|
@@ -38,7 +38,7 @@ coretrace_python/bundled/models/flask/plugin.toml,sha256=kI53Xwf5aZKd2n3fEQEbBzN
|
|
|
38
38
|
coretrace_python/bundled/models/http_clients/http_client_models.py,sha256=9XhHWZKq3XWcD0WexucuedAiwxp3fhXxGmo9R6DNtSQ,1954
|
|
39
39
|
coretrace_python/bundled/models/http_clients/plugin.toml,sha256=vq9tWHgy8-m8LiU1StGhm9Lsy7vnj3w90P4AKDaKfc0,216
|
|
40
40
|
coretrace_python/bundled/models/python_stdlib/plugin.toml,sha256=DWqjG68rx91HCJi_VEp6tUs4ujkzlR7Lq7saMvtK2HM,187
|
|
41
|
-
coretrace_python/bundled/models/python_stdlib/python_stdlib.py,sha256=
|
|
41
|
+
coretrace_python/bundled/models/python_stdlib/python_stdlib.py,sha256=7S2OEcdY41hQiHm_FX8WIc2DEzl4NQUdZer7yyoRz1Y,4774
|
|
42
42
|
coretrace_python/bundled/models/sqlalchemy/plugin.toml,sha256=2gRbglnMK5U2QWnzs2U2pDvmTeWmrlW7XpJ_8dRmIoY,182
|
|
43
43
|
coretrace_python/bundled/models/sqlalchemy/sqlalchemy_models.py,sha256=Gm2qjyXUrjzALy-MigUhPQyyDxYdfWlQKDZLp1C6Jqk,1697
|
|
44
44
|
coretrace_python/bundled/models/tornado/plugin.toml,sha256=u_XjJK2uKBR11zg4yGxsCDHcx2pKEQ1MBvvB6Mm0siA,222
|
|
@@ -47,6 +47,8 @@ coretrace_python/bundled/secrets/config_secrets/config_secrets.py,sha256=JfhWSyV
|
|
|
47
47
|
coretrace_python/bundled/secrets/config_secrets/plugin.toml,sha256=dRkA3zQ9wtT2EJyqZ5zGqJ5KYdyIQtQcSvesqrb4M0Q,177
|
|
48
48
|
coretrace_python/bundled/secrets/hardcoded_secrets/hardcoded_secrets.py,sha256=7TD-Nf5S4yfoRBRmJ6Ab6v4Q2zIC2n79FRfNS3I4xos,544
|
|
49
49
|
coretrace_python/bundled/secrets/hardcoded_secrets/plugin.toml,sha256=bkhRJFUrTFP2LiggDP3PkQpC0REtTq8aWrqlkYzxVHc,231
|
|
50
|
+
coretrace_python/bundled/security/code_injection/code_injection.py,sha256=vNbVzswClwB7ZDN7Rl1QDPb6SsDswj5GE_7Kscgwp-U,691
|
|
51
|
+
coretrace_python/bundled/security/code_injection/plugin.toml,sha256=T2I7SIr3umx9JqRqIIG7cJCj9d33YFW9c8JpYahERZg,228
|
|
50
52
|
coretrace_python/bundled/security/command_injection/command_injection.py,sha256=d8CgmU0tWyhuLk_GTaUQHQaWlKIxC5TDY-K370tdyhE,573
|
|
51
53
|
coretrace_python/bundled/security/command_injection/plugin.toml,sha256=x9NUpwdVZsTQpaPNX3HoYcrZWk4sOGN-aSp9Bc8jvCA,240
|
|
52
54
|
coretrace_python/bundled/security/insecure_deserialization/insecure_deserialization.py,sha256=-4KIQDaYo-09gSceuNEs3eutmBn2OBuYBTqiUEYOatk,637
|
|
@@ -143,9 +145,9 @@ coretrace_python/taint/engine.py,sha256=_uVUc2m29aljN_YR2iCQtEdvZFc-LJ5CDWiZF1Tz
|
|
|
143
145
|
coretrace_python/taint/models.py,sha256=B84caPxmQvTdB9H_80nZOqcFlpNd9ofpKI2YL5Uc0UA,15269
|
|
144
146
|
coretrace_python/taint/routes.py,sha256=UAJKXcw_sM9shf58FfDroxVO9bNSm4qrQdZknwUB0lo,6110
|
|
145
147
|
coretrace_python/taint/templates.py,sha256=8Ojb43VXuWxOVifeXRpi3_2mjZfnvIC7GQ-AW80GUYk,11148
|
|
146
|
-
coretrace_python_analyzer-0.
|
|
147
|
-
coretrace_python_analyzer-0.
|
|
148
|
-
coretrace_python_analyzer-0.
|
|
149
|
-
coretrace_python_analyzer-0.
|
|
150
|
-
coretrace_python_analyzer-0.
|
|
151
|
-
coretrace_python_analyzer-0.
|
|
148
|
+
coretrace_python_analyzer-0.11.0.dist-info/METADATA,sha256=s9XGnFo_DdCtjSWnMC3WL6Dj1KiPskmmE-xqE7H9M6Q,3217
|
|
149
|
+
coretrace_python_analyzer-0.11.0.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
|
|
150
|
+
coretrace_python_analyzer-0.11.0.dist-info/entry_points.txt,sha256=wdozemiraOkbt65g_Y_zgspuZpoLxJdaCVMJt1Ft3c0,72
|
|
151
|
+
coretrace_python_analyzer-0.11.0.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
|
152
|
+
coretrace_python_analyzer-0.11.0.dist-info/licenses/NOTICE,sha256=s3VHj5ngV0ozjW_kZJpg_35ne6JwoBK0ysOjbqVtA0w,113
|
|
153
|
+
coretrace_python_analyzer-0.11.0.dist-info/RECORD,,
|
{coretrace_python_analyzer-0.10.0.dist-info → coretrace_python_analyzer-0.11.0.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|