@neralabs/rerail-pack-python 0.1.3 → 0.1.4
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.
- package/README.md +704 -0
- package/package.json +1 -1
- package/rules/bandit-b101-assert-used.json +2 -2
- package/rules/bandit-b102-exec-used.json +2 -2
- package/rules/bandit-b110-try-except-pass.json +1 -1
- package/rules/bandit-b112-try-except-continue.json +1 -1
- package/rules/bandit-b113-request-without-timeout.json +2 -2
- package/rules/bandit-b301-pickle.json +2 -2
- package/rules/bandit-b302-marshal.json +2 -2
- package/rules/bandit-b303-md5.json +1 -1
- package/rules/bandit-b305-cipher-modes.json +2 -2
- package/rules/bandit-b306-mktemp-q.json +2 -2
- package/rules/bandit-b307-eval.json +1 -1
- package/rules/bandit-b308-mark-safe.json +2 -2
- package/rules/bandit-b310-urllib-urlopen.json +1 -1
- package/rules/bandit-b311-random.json +1 -1
- package/rules/bandit-b312-telnetlib.json +1 -1
- package/rules/bandit-b313-xml-bad-celementtree.json +1 -1
- package/rules/bandit-b314-xml-bad-elementtree.json +1 -1
- package/rules/bandit-b315-xml-bad-expatreader.json +1 -1
- package/rules/bandit-b316-xml-bad-expatbuilder.json +1 -1
- package/rules/bandit-b317-xml-bad-sax.json +1 -1
- package/rules/bandit-b318-xml-bad-minidom.json +1 -1
- package/rules/bandit-b319-xml-bad-pulldom.json +1 -1
- package/rules/bandit-b321-ftplib.json +2 -2
- package/rules/bandit-b323-unverified-context.json +2 -2
- package/rules/bandit-b401-import-telnetlib.json +2 -2
- package/rules/bandit-b402-import-ftplib.json +2 -2
- package/rules/bandit-b405-import-xml-etree.json +1 -1
- package/rules/bandit-b407-import-xml-expat.json +1 -1
- package/rules/bandit-b408-import-xml-minidom.json +1 -1
- package/rules/bandit-b409-import-xml-pulldom.json +1 -1
- package/rules/bandit-b411-import-xmlrpclib.json +1 -1
- package/rules/bandit-b413-import-pycrypto.json +1 -1
- package/rules/bandit-b415-import-pyghmi.json +2 -2
- package/rules/bandit-b502-ssl-with-bad-version.json +2 -2
- package/rules/bandit-b505-weak-cryptographic-key.json +2 -2
- package/rules/bandit-b507-ssh-no-host-key-verification.json +2 -2
- package/rules/bandit-b606-start-process-with-no-shell.json +2 -2
- package/rules/bandit-b615-huggingface-unsafe-download.json +2 -2
- package/rules/ruff-async100-cancel-scope-no-checkpoint.json +2 -2
- package/rules/ruff-async105-trio-sync-call.json +1 -1
- package/rules/ruff-async115-async-zero-sleep.json +1 -1
- package/rules/ruff-async116-long-sleep-not-forever.json +1 -1
- package/rules/ruff-async210-blocking-http-call-in-async-function.json +2 -2
- package/rules/ruff-async221-run-process-in-async-function.json +1 -1
- package/rules/ruff-async222-wait-for-process-in-async-function.json +2 -2
- package/rules/ruff-async230-blocking-open-call-in-async-function.json +2 -2
- package/rules/ruff-async250-blocking-input-in-async-function.json +2 -2
- package/rules/ruff-async251-blocking-sleep-in-async-function.json +1 -1
- package/rules/ruff-b002-unary-prefix-increment-decrement.json +3 -3
- package/rules/ruff-b003-assignment-to-os-environ.json +2 -2
- package/rules/ruff-b004-unreliable-callable-check.json +1 -1
- package/rules/ruff-b005-strip-with-multi-characters.json +2 -2
- package/rules/ruff-b007-unused-loop-control-variable.json +1 -1
- package/rules/ruff-b009-get-attr-with-constant.json +1 -1
- package/rules/ruff-b010-set-attr-with-constant.json +2 -2
- package/rules/ruff-b011-assert-false.json +1 -1
- package/rules/ruff-b013-redundant-tuple-in-exception-handler.json +1 -1
- package/rules/ruff-b014-duplicate-handler-exception.json +1 -1
- package/rules/ruff-b016-raise-literal.json +1 -1
- package/rules/ruff-b020-loop-variable-overrides-iterator.json +1 -1
- package/rules/ruff-b021-f-string-docstring.json +1 -1
- package/rules/ruff-b022-useless-contextlib-suppress.json +1 -1
- package/rules/ruff-b023-function-uses-loop-variable.json +2 -2
- package/rules/ruff-b025-duplicate-try-block-exception.json +1 -1
- package/rules/ruff-b026-star-arg-unpacking-after-keyword-arg.json +1 -1
- package/rules/ruff-b028-no-explicit-stacklevel.json +2 -2
- package/rules/ruff-b029-except-with-empty-tuple.json +1 -1
- package/rules/ruff-b030-except-with-non-exception-classes.json +1 -1
- package/rules/ruff-b032-unintentional-type-annotation.json +1 -1
- package/rules/ruff-b033-duplicate-value.json +1 -1
- package/rules/ruff-b034-re-sub-positional-args.json +1 -1
- package/rules/ruff-b039-mutable-contextvar-default.json +2 -2
- package/rules/ruff-b904-raise-without-from-inside-except.json +2 -2
- package/rules/ruff-b905-zip-without-explicit-strict.json +1 -1
- package/rules/ruff-e711-none-comparison.json +1 -1
- package/rules/ruff-e721-type-comparison.json +1 -1
- package/rules/ruff-e722-bare-except.json +2 -2
- package/rules/ruff-e742-ambiguous-class-name.json +2 -2
- package/rules/ruff-e743-ambiguous-function-name.json +2 -2
- package/rules/ruff-f403-undefined-local-with-import-star.json +1 -1
- package/rules/ruff-f405-undefined-local-with-import-star-usage.json +2 -2
- package/rules/ruff-f406-undefined-local-with-nested-import-star-usage.json +2 -2
- package/rules/ruff-f407-future-feature-not-defined.json +1 -1
- package/rules/ruff-f501-percent-format-invalid-format.json +2 -2
- package/rules/ruff-f502-percent-format-expected-mapping.json +1 -1
- package/rules/ruff-f503-percent-format-expected-sequence.json +1 -1
- package/rules/ruff-f504-percent-format-extra-named-arguments.json +1 -1
- package/rules/ruff-f505-percent-format-missing-argument.json +1 -1
- package/rules/ruff-f506-percent-format-mixed-positional-and-named.json +2 -2
- package/rules/ruff-f507-percent-format-positional-count-mismatch.json +2 -2
- package/rules/ruff-f508-percent-format-star-requires-sequence.json +2 -2
- package/rules/ruff-f509-percent-format-unsupported-format-character.json +2 -2
- package/rules/ruff-f521-string-dot-format-invalid-format.json +1 -1
- package/rules/ruff-f522-string-dot-format-extra-named-arguments.json +2 -2
- package/rules/ruff-f523-string-dot-format-extra-positional-arguments.json +1 -1
- package/rules/ruff-f524-string-dot-format-missing-arguments.json +1 -1
- package/rules/ruff-f525-string-dot-format-mixing-automatic.json +1 -1
- package/rules/ruff-f541-f-string-missing-placeholders.json +2 -2
- package/rules/ruff-f601-multi-value-repeated-key-literal.json +1 -1
- package/rules/ruff-f602-multi-value-repeated-key-variable.json +2 -2
- package/rules/ruff-f622-multiple-starred-expressions.json +1 -1
- package/rules/ruff-f632-is-literal.json +1 -1
- package/rules/ruff-f633-invalid-print-syntax.json +2 -2
- package/rules/ruff-f701-break-outside-loop.json +1 -1
- package/rules/ruff-f702-continue-outside-loop.json +1 -1
- package/rules/ruff-f706-return-outside-function.json +1 -1
- package/rules/ruff-f707-default-except-not-last.json +1 -1
- package/rules/ruff-f822-undefined-export.json +1 -1
- package/rules/ruff-f823-undefined-local.json +2 -2
- package/rules/ruff-f842-unused-annotation.json +1 -1
- package/rules/ruff-f901-raise-not-implemented.json +1 -1
- package/rules/ruff-pie794-duplicate-class-field-definition.json +1 -1
- package/rules/ruff-pie796-non-unique-enums.json +1 -1
- package/rules/ruff-pie800-unnecessary-spread.json +1 -1
- package/rules/ruff-pie804-unnecessary-dict-kwargs.json +1 -1
- package/rules/ruff-pie807-reimplemented-container-builtin.json +1 -1
- package/rules/ruff-pie810-multiple-starts-ends-with.json +2 -2
- package/rules/ruff-ret501-unnecessary-return-none.json +1 -1
- package/rules/ruff-ret502-implicit-return-value.json +2 -2
- package/rules/ruff-ret505-superfluous-else-return.json +1 -1
- package/rules/ruff-ret506-superfluous-else-raise.json +1 -1
- package/rules/ruff-ret507-superfluous-else-continue.json +1 -1
- package/rules/ruff-ret508-superfluous-else-break.json +1 -1
- package/rules/ruff-sim101-duplicate-isinstance-call.json +1 -1
- package/rules/ruff-sim107-return-in-try-except-finally.json +2 -2
- package/rules/ruff-sim109-compare-with-tuple.json +1 -1
- package/rules/ruff-sim112-uncapitalized-environment-variables.json +2 -2
- package/rules/ruff-sim113-enumerate-for-loop.json +1 -1
- package/rules/ruff-sim208-double-negation.json +1 -1
- package/rules/ruff-sim210-if-expr-with-true-false.json +1 -1
- package/rules/ruff-sim211-if-expr-with-false-true.json +1 -1
- package/rules/ruff-sim212-if-expr-with-twisted-arms.json +2 -2
- package/rules/ruff-sim300-yoda-conditions.json +2 -2
- package/rules/ruff-sim905-split-static-string.json +1 -1
- package/rules/ruff-sim910-dict-get-with-none-default.json +1 -1
- package/rules/ruff-t100-debugger.json +3 -3
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b101-assert-used",
|
|
4
4
|
"revision": 1,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Avoid assert statements in Python code; they are stripped when Python runs with optimization, so any check they perform silently disappears.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*"
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"violation": {
|
|
25
25
|
"anchor": "witness.span",
|
|
26
26
|
"code": "B101",
|
|
27
|
-
"message": "
|
|
27
|
+
"message": "Replace this assert with an if check that raises an exception; asserts are stripped when Python runs with -O.",
|
|
28
28
|
"suppress": {
|
|
29
29
|
"nosec": {
|
|
30
30
|
"codes": [
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b102-exec-used",
|
|
4
4
|
"revision": 2,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Avoid exec() calls in Python, including through import aliases; running text as code is dangerous unless that text is fully trusted.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*.py"
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
"violation": {
|
|
112
112
|
"code": "B102",
|
|
113
113
|
"anchor": "witness.span",
|
|
114
|
-
"message": "
|
|
114
|
+
"message": "Replace this exec call with code that performs the intended operation directly, unless the executed text is fully trusted.",
|
|
115
115
|
"suppress": {
|
|
116
116
|
"nosec": {
|
|
117
117
|
"codes": [
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b110-try-except-pass",
|
|
4
4
|
"revision": 1,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Don't write a bare or catch-all Exception handler whose only statement is pass; log or handle the error, or catch the specific exception you expect.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*.py"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b112-try-except-continue",
|
|
4
4
|
"revision": 1,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Don't write a bare or catch-all Exception handler in a loop whose only statement is continue; log or handle the error, or catch the specific exception you expect.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*.py"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b113-request-without-timeout",
|
|
4
4
|
"revision": 1,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Pass a timeout to requests calls, and never set it to None on requests or httpx calls; without one, a slow server can hang the program indefinitely.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*"
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
"violation": {
|
|
125
125
|
"anchor": "witness.span",
|
|
126
126
|
"code": "B113",
|
|
127
|
-
"message": "
|
|
127
|
+
"message": "Pass a finite timeout to this HTTP call; without one a slow server can hang the program.",
|
|
128
128
|
"suppress": {
|
|
129
129
|
"nosec": {
|
|
130
130
|
"codes": [
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b301-pickle",
|
|
4
4
|
"revision": 1,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Avoid deserializing with pickle, dill, shelve, jsonpickle, or pandas.read_pickle; loading untrusted data this way can execute arbitrary code.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*.py"
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"violation": {
|
|
45
45
|
"code": "B301",
|
|
46
46
|
"anchor": "witness.span",
|
|
47
|
-
"message": "
|
|
47
|
+
"message": "Load this data with json or another data-only format instead; unpickling untrusted input can run arbitrary code.",
|
|
48
48
|
"suppress": {
|
|
49
49
|
"nosec": {
|
|
50
50
|
"codes": [
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b302-marshal",
|
|
4
4
|
"revision": 1,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Avoid marshal.load() and marshal.loads(); marshal is not safe against malicious or malformed data, so never use it on untrusted input.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*.py"
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"violation": {
|
|
35
35
|
"code": "B302",
|
|
36
36
|
"anchor": "witness.span",
|
|
37
|
-
"message": "
|
|
37
|
+
"message": "Load this data with json or another data-only format instead of marshal, which is unsafe on untrusted input.",
|
|
38
38
|
"suppress": {
|
|
39
39
|
"nosec": {
|
|
40
40
|
"codes": [
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b303-md5",
|
|
4
4
|
"revision": 1,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Avoid MD2, MD4, MD5, and SHA1 hashes from PyCrypto, PyCryptodome, or cryptography; they are broken for security, so use SHA-256 or a password hash.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*.py",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b305-cipher-modes",
|
|
4
4
|
"revision": 1,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Avoid the ECB cipher mode; it encrypts identical blocks to identical output and leaks patterns in the data, so use an authenticated mode such as GCM.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*.py"
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"violation": {
|
|
34
34
|
"code": "B305",
|
|
35
35
|
"anchor": "witness.span",
|
|
36
|
-
"message": "
|
|
36
|
+
"message": "Replace ECB with an authenticated mode such as GCM; ECB leaks patterns in the data.",
|
|
37
37
|
"suppress": {
|
|
38
38
|
"nosec": {
|
|
39
39
|
"codes": [
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b306-mktemp-q",
|
|
4
4
|
"revision": 1,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Use tempfile.mkstemp() or NamedTemporaryFile instead of tempfile.mktemp(); mktemp returns a name another process can claim before you create the file.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*.py"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"violation": {
|
|
41
41
|
"code": "B306",
|
|
42
42
|
"anchor": "witness.span",
|
|
43
|
-
"message": "
|
|
43
|
+
"message": "Replace tempfile.mktemp with mkstemp or NamedTemporaryFile, which create the file atomically.",
|
|
44
44
|
"suppress": {
|
|
45
45
|
"nosec": {
|
|
46
46
|
"codes": [
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b307-eval",
|
|
4
4
|
"revision": 2,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Avoid eval() calls in Python, including through import aliases; use ast.literal_eval() when you only need to parse literal values.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*.py"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b308-mark-safe",
|
|
4
4
|
"revision": 1,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Avoid Django's mark_safe(); it turns off autoescaping and can expose cross-site scripting when the content isn't fully trusted.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*.py"
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"violation": {
|
|
34
34
|
"code": "B308",
|
|
35
35
|
"anchor": "witness.span",
|
|
36
|
-
"message": "
|
|
36
|
+
"message": "Build this HTML with format_html() instead of mark_safe so any untrusted parts get escaped.",
|
|
37
37
|
"suppress": {
|
|
38
38
|
"nosec": {
|
|
39
39
|
"codes": [
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b310-urllib-urlopen",
|
|
4
4
|
"revision": 1,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Restrict URLs passed to urllib's urlopen, urlretrieve, and URLopener to expected schemes; file: and custom schemes can expose local files.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*.py"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b311-random",
|
|
4
4
|
"revision": 1,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Avoid the random module's generators for anything security-related; their output is predictable, so use the secrets module for tokens, passwords, and keys.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*.py"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b312-telnetlib",
|
|
4
4
|
"revision": 1,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Avoid opening telnetlib.Telnet connections; Telnet sends credentials and data unencrypted, so use SSH or another encrypted protocol.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*.py"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b313-xml-bad-celementtree",
|
|
4
4
|
"revision": 1,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Use defusedxml instead of xml.etree.cElementTree to parse XML; the standard parser is open to entity-expansion and other XML attacks on untrusted input.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*.py"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b314-xml-bad-elementtree",
|
|
4
4
|
"revision": 1,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Use defusedxml instead of xml.etree.ElementTree to parse XML; the standard parser is open to entity-expansion and other XML attacks on untrusted input.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*.py"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b315-xml-bad-expatreader",
|
|
4
4
|
"revision": 1,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Use defusedxml instead of creating parsers with xml.sax.expatreader; the standard parser is open to entity-expansion and other XML attacks on untrusted input.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*.py"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b316-xml-bad-expatbuilder",
|
|
4
4
|
"revision": 1,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Use defusedxml instead of xml.dom.expatbuilder to parse XML; the standard parser is open to entity-expansion and other XML attacks on untrusted input.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*.py"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b317-xml-bad-sax",
|
|
4
4
|
"revision": 1,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Use defusedxml instead of xml.sax to parse XML; the standard parser is open to entity-expansion and other XML attacks on untrusted input.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*.py"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b318-xml-bad-minidom",
|
|
4
4
|
"revision": 1,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Use defusedxml instead of xml.dom.minidom to parse XML; the standard parser is open to entity-expansion and other XML attacks on untrusted input.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*.py"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b319-xml-bad-pulldom",
|
|
4
4
|
"revision": 1,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Use defusedxml instead of xml.dom.pulldom to parse XML; the standard parser is open to entity-expansion and other XML attacks on untrusted input.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*.py"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b321-ftplib",
|
|
4
4
|
"revision": 1,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Avoid opening ftplib.FTP connections; FTP sends credentials and data unencrypted, so use SFTP, SCP, or another encrypted protocol.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*.py"
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"violation": {
|
|
34
34
|
"code": "B321",
|
|
35
35
|
"anchor": "witness.span",
|
|
36
|
-
"message": "
|
|
36
|
+
"message": "Replace this FTP connection with SFTP, SCP, or another encrypted protocol; FTP sends credentials in clear text.",
|
|
37
37
|
"suppress": {
|
|
38
38
|
"nosec": {
|
|
39
39
|
"codes": [
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b323-unverified-context",
|
|
4
4
|
"revision": 1,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Don't create SSL contexts with ssl._create_unverified_context(); it turns off certificate and hostname verification and allows man-in-the-middle attacks.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*.py"
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"violation": {
|
|
34
34
|
"code": "B323",
|
|
35
35
|
"anchor": "witness.span",
|
|
36
|
-
"message": "
|
|
36
|
+
"message": "Use ssl.create_default_context() instead, which verifies certificates and hostnames.",
|
|
37
37
|
"suppress": {
|
|
38
38
|
"nosec": {
|
|
39
39
|
"codes": [
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b401-import-telnetlib",
|
|
4
4
|
"revision": 1,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Remove imports of telnetlib; Telnet sends credentials and data unencrypted, so use SSH or another encrypted protocol.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*.py"
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"violation": {
|
|
35
35
|
"code": "B401",
|
|
36
36
|
"anchor": "witness.span",
|
|
37
|
-
"message": "
|
|
37
|
+
"message": "Remove this telnetlib import and use SSH or another encrypted protocol instead.",
|
|
38
38
|
"suppress": {
|
|
39
39
|
"nosec": {
|
|
40
40
|
"codes": [
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b402-import-ftplib",
|
|
4
4
|
"revision": 1,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Remove imports of ftplib; FTP sends credentials and data unencrypted, so use SFTP, SCP, or another encrypted protocol.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*.py"
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"violation": {
|
|
35
35
|
"code": "B402",
|
|
36
36
|
"anchor": "witness.span",
|
|
37
|
-
"message": "
|
|
37
|
+
"message": "Remove this ftplib import and use SFTP, SCP, or another encrypted protocol instead.",
|
|
38
38
|
"suppress": {
|
|
39
39
|
"nosec": {
|
|
40
40
|
"codes": [
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b405-import-xml-etree",
|
|
4
4
|
"revision": 1,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Avoid importing xml.etree.ElementTree or cElementTree; use defusedxml instead, since the standard parsers are open to XML attacks on untrusted input.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*.py"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b407-import-xml-expat",
|
|
4
4
|
"revision": 1,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Avoid importing xml.dom.expatbuilder to parse XML; it is open to XML attacks, so use defusedxml.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*.py"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b408-import-xml-minidom",
|
|
4
4
|
"revision": 1,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Avoid importing xml.dom.minidom to parse XML; it is open to XML attacks, so use defusedxml.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*.py"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b409-import-xml-pulldom",
|
|
4
4
|
"revision": 1,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Avoid importing xml.dom.pulldom to parse XML; it is open to XML attacks, so use defusedxml.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*.py"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b411-import-xmlrpclib",
|
|
4
4
|
"revision": 1,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Avoid importing xmlrpc unprotected; its XML parsing is open to XML attacks unless patched with defusedxml.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*.py"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b413-import-pycrypto",
|
|
4
4
|
"revision": 1,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Avoid importing the pyCrypto package; it is unmaintained and has known vulnerabilities, so use the cryptography package instead.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*.py"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b415-import-pyghmi",
|
|
4
4
|
"revision": 1,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Avoid importing pyghmi; IPMI is an insecure protocol, so prefer an encrypted management protocol.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*.py"
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"violation": {
|
|
35
35
|
"code": "B415",
|
|
36
36
|
"anchor": "witness.span",
|
|
37
|
-
"message": "
|
|
37
|
+
"message": "Replace this pyghmi import with a client for an encrypted management protocol such as Redfish over HTTPS; IPMI is insecure.",
|
|
38
38
|
"suppress": {
|
|
39
39
|
"nosec": {
|
|
40
40
|
"codes": [
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b502-ssl-with-bad-version",
|
|
4
4
|
"revision": 1,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Don't select SSLv2, SSLv3, TLS 1.0 or TLS 1.1 when configuring ssl or pyOpenSSL connections; these protocol versions are broken.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*.py"
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"violation": {
|
|
77
77
|
"code": "B502",
|
|
78
78
|
"anchor": "witness.span",
|
|
79
|
-
"message": "
|
|
79
|
+
"message": "Select TLS 1.2 or newer here (e.g. ssl.PROTOCOL_TLS_CLIENT) instead of this SSLv2, SSLv3, TLS 1.0 or TLS 1.1 protocol.",
|
|
80
80
|
"suppress": {
|
|
81
81
|
"nosec": {
|
|
82
82
|
"codes": [
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b505-weak-cryptographic-key",
|
|
4
4
|
"revision": 1,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Use RSA and DSA keys of at least 2048 bits and elliptic curves of at least 224 bits; smaller keys can be broken.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*"
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
"violation": {
|
|
153
153
|
"anchor": "witness.span",
|
|
154
154
|
"code": "B505",
|
|
155
|
-
"message": "
|
|
155
|
+
"message": "Generate this key with at least 2048 bits for RSA or DSA, or a curve of at least 224 bits for EC; smaller keys can be broken.",
|
|
156
156
|
"suppress": {
|
|
157
157
|
"nosec": {
|
|
158
158
|
"codes": [
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b507-ssh-no-host-key-verification",
|
|
4
4
|
"revision": 4,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Don't let Paramiko auto-accept unknown SSH host keys with AutoAddPolicy or WarningPolicy; it opens the door to man-in-the-middle attacks.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*.py"
|
|
@@ -196,7 +196,7 @@
|
|
|
196
196
|
"violation": {
|
|
197
197
|
"code": "B507",
|
|
198
198
|
"anchor": "witness.span",
|
|
199
|
-
"message": "
|
|
199
|
+
"message": "Set paramiko.RejectPolicy and load known host keys instead of auto-accepting unknown ones; that invites man-in-the-middle attacks.",
|
|
200
200
|
"suppress": {
|
|
201
201
|
"nosec": {
|
|
202
202
|
"codes": [
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b606-start-process-with-no-shell",
|
|
4
4
|
"revision": 1,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Validate input passed to the os exec, spawn and startfile functions; they start whatever program and arguments they receive.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*.py"
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"violation": {
|
|
50
50
|
"code": "B606",
|
|
51
51
|
"anchor": "witness.span",
|
|
52
|
-
"message": "
|
|
52
|
+
"message": "Validate any untrusted input passed to this os exec, spawn or startfile call; it starts whatever program and arguments it receives.",
|
|
53
53
|
"suppress": {
|
|
54
54
|
"nosec": {
|
|
55
55
|
"codes": [
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "bandit-b615-huggingface-unsafe-download",
|
|
4
4
|
"revision": 5,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Pin Hugging Face model and dataset downloads to a specific commit revision; an unpinned download can silently pull changed or tampered files.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*.py"
|
|
@@ -1138,7 +1138,7 @@
|
|
|
1138
1138
|
"violation": {
|
|
1139
1139
|
"code": "B615",
|
|
1140
1140
|
"anchor": "witness.span",
|
|
1141
|
-
"message": "
|
|
1141
|
+
"message": "Pin ${API}() to a specific commit hash with revision=; an unpinned download can silently pull changed or tampered files.",
|
|
1142
1142
|
"suppress": {
|
|
1143
1143
|
"nosec": {
|
|
1144
1144
|
"codes": [
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "ruff-async100-cancel-scope-no-checkpoint",
|
|
4
4
|
"revision": 1,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Add an await inside asyncio, anyio or trio timeout and cancel-scope blocks; without a checkpoint the timeout can never fire.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*"
|
|
@@ -343,7 +343,7 @@
|
|
|
343
343
|
"violation": {
|
|
344
344
|
"anchor": "witness.span",
|
|
345
345
|
"code": "ASYNC100",
|
|
346
|
-
"message": "
|
|
346
|
+
"message": "Add an await inside this `with $CALLEE(...):` block; without a checkpoint the timeout can never fire.",
|
|
347
347
|
"suppress": {
|
|
348
348
|
"noqa": {
|
|
349
349
|
"codes": [
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "ruff-async105-trio-sync-call",
|
|
4
4
|
"revision": 1,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Await calls to trio's async functions such as trio.sleep; without await the call only creates a coroutine that never runs.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "ruff-async115-async-zero-sleep",
|
|
4
4
|
"revision": 1,
|
|
5
5
|
"mode": "steer",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Use lowlevel.checkpoint() instead of sleep(0) in trio and anyio code; it states the intent of yielding to the scheduler.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
9
|
"**/*"
|