@neralabs/rerail-pack-python 0.1.1

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.
Files changed (147) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +7 -0
  3. package/README.md +36 -0
  4. package/licenses/bandit/LICENSE +175 -0
  5. package/licenses/bandit/UPSTREAM.md +100 -0
  6. package/licenses/ruff/LICENSE +430 -0
  7. package/licenses/ruff/UPSTREAM.md +338 -0
  8. package/pack.json +912 -0
  9. package/package.json +30 -0
  10. package/rules/bandit-b101-assert-used.json +38 -0
  11. package/rules/bandit-b102-exec-used.json +125 -0
  12. package/rules/bandit-b110-try-except-pass.json +109 -0
  13. package/rules/bandit-b112-try-except-continue.json +109 -0
  14. package/rules/bandit-b113-request-without-timeout.json +138 -0
  15. package/rules/bandit-b301-pickle.json +58 -0
  16. package/rules/bandit-b302-marshal.json +48 -0
  17. package/rules/bandit-b303-md5.json +79 -0
  18. package/rules/bandit-b305-cipher-modes.json +47 -0
  19. package/rules/bandit-b306-mktemp-q.json +54 -0
  20. package/rules/bandit-b307-eval.json +125 -0
  21. package/rules/bandit-b308-mark-safe.json +47 -0
  22. package/rules/bandit-b310-urllib-urlopen.json +54 -0
  23. package/rules/bandit-b311-random.json +57 -0
  24. package/rules/bandit-b312-telnetlib.json +47 -0
  25. package/rules/bandit-b313-xml-bad-celementtree.json +50 -0
  26. package/rules/bandit-b314-xml-bad-elementtree.json +50 -0
  27. package/rules/bandit-b315-xml-bad-expatreader.json +47 -0
  28. package/rules/bandit-b316-xml-bad-expatbuilder.json +48 -0
  29. package/rules/bandit-b317-xml-bad-sax.json +58 -0
  30. package/rules/bandit-b318-xml-bad-minidom.json +48 -0
  31. package/rules/bandit-b319-xml-bad-pulldom.json +48 -0
  32. package/rules/bandit-b321-ftplib.json +47 -0
  33. package/rules/bandit-b323-unverified-context.json +47 -0
  34. package/rules/bandit-b401-import-telnetlib.json +48 -0
  35. package/rules/bandit-b402-import-ftplib.json +48 -0
  36. package/rules/bandit-b405-import-xml-etree.json +69 -0
  37. package/rules/bandit-b406-import-xml-sax.json +73 -0
  38. package/rules/bandit-b407-import-xml-expat.json +54 -0
  39. package/rules/bandit-b408-import-xml-minidom.json +54 -0
  40. package/rules/bandit-b409-import-xml-pulldom.json +54 -0
  41. package/rules/bandit-b411-import-xmlrpclib.json +48 -0
  42. package/rules/bandit-b413-import-pycrypto.json +159 -0
  43. package/rules/bandit-b415-import-pyghmi.json +48 -0
  44. package/rules/bandit-b502-ssl-with-bad-version.json +90 -0
  45. package/rules/bandit-b505-weak-cryptographic-key.json +166 -0
  46. package/rules/bandit-b507-ssh-no-host-key-verification.json +210 -0
  47. package/rules/bandit-b606-start-process-with-no-shell.json +63 -0
  48. package/rules/bandit-b610-django-extra-used.json +268 -0
  49. package/rules/bandit-b615-huggingface-unsafe-download.json +1152 -0
  50. package/rules/ruff-async100-cancel-scope-no-checkpoint.json +357 -0
  51. package/rules/ruff-async105-trio-sync-call.json +199 -0
  52. package/rules/ruff-async115-async-zero-sleep.json +264 -0
  53. package/rules/ruff-async116-long-sleep-not-forever.json +267 -0
  54. package/rules/ruff-async210-blocking-http-call-in-async-function.json +161 -0
  55. package/rules/ruff-async221-run-process-in-async-function.json +342 -0
  56. package/rules/ruff-async222-wait-for-process-in-async-function.json +144 -0
  57. package/rules/ruff-async230-blocking-open-call-in-async-function.json +339 -0
  58. package/rules/ruff-async250-blocking-input-in-async-function.json +143 -0
  59. package/rules/ruff-async251-blocking-sleep-in-async-function.json +140 -0
  60. package/rules/ruff-b002-unary-prefix-increment-decrement.json +54 -0
  61. package/rules/ruff-b003-assignment-to-os-environ.json +54 -0
  62. package/rules/ruff-b004-unreliable-callable-check.json +171 -0
  63. package/rules/ruff-b005-strip-with-multi-characters.json +131 -0
  64. package/rules/ruff-b007-unused-loop-control-variable.json +368 -0
  65. package/rules/ruff-b009-get-attr-with-constant.json +190 -0
  66. package/rules/ruff-b010-set-attr-with-constant.json +219 -0
  67. package/rules/ruff-b011-assert-false.json +62 -0
  68. package/rules/ruff-b013-redundant-tuple-in-exception-handler.json +94 -0
  69. package/rules/ruff-b014-duplicate-handler-exception.json +126 -0
  70. package/rules/ruff-b016-raise-literal.json +47 -0
  71. package/rules/ruff-b020-loop-variable-overrides-iterator.json +341 -0
  72. package/rules/ruff-b021-f-string-docstring.json +48 -0
  73. package/rules/ruff-b022-useless-contextlib-suppress.json +95 -0
  74. package/rules/ruff-b023-function-uses-loop-variable.json +560 -0
  75. package/rules/ruff-b025-duplicate-try-block-exception.json +182 -0
  76. package/rules/ruff-b026-star-arg-unpacking-after-keyword-arg.json +57 -0
  77. package/rules/ruff-b028-no-explicit-stacklevel.json +177 -0
  78. package/rules/ruff-b029-except-with-empty-tuple.json +102 -0
  79. package/rules/ruff-b032-unintentional-type-annotation.json +157 -0
  80. package/rules/ruff-b033-duplicate-value.json +129 -0
  81. package/rules/ruff-b034-re-sub-positional-args.json +159 -0
  82. package/rules/ruff-b039-mutable-contextvar-default.json +281 -0
  83. package/rules/ruff-b904-raise-without-from-inside-except.json +194 -0
  84. package/rules/ruff-b905-zip-without-explicit-strict.json +429 -0
  85. package/rules/ruff-e711-none-comparison.json +199 -0
  86. package/rules/ruff-e721-type-comparison.json +293 -0
  87. package/rules/ruff-e722-bare-except.json +57 -0
  88. package/rules/ruff-e742-ambiguous-class-name.json +47 -0
  89. package/rules/ruff-e743-ambiguous-function-name.json +47 -0
  90. package/rules/ruff-f403-undefined-local-with-import-star.json +73 -0
  91. package/rules/ruff-f405-undefined-local-with-import-star-usage.json +87 -0
  92. package/rules/ruff-f406-undefined-local-with-nested-import-star-usage.json +39 -0
  93. package/rules/ruff-f407-future-feature-not-defined.json +56 -0
  94. package/rules/ruff-f501-percent-format-invalid-format.json +88 -0
  95. package/rules/ruff-f502-percent-format-expected-mapping.json +127 -0
  96. package/rules/ruff-f503-percent-format-expected-sequence.json +127 -0
  97. package/rules/ruff-f504-percent-format-extra-named-arguments.json +46 -0
  98. package/rules/ruff-f505-percent-format-missing-argument.json +49 -0
  99. package/rules/ruff-f506-percent-format-mixed-positional-and-named.json +114 -0
  100. package/rules/ruff-f507-percent-format-positional-count-mismatch.json +78 -0
  101. package/rules/ruff-f508-percent-format-star-requires-sequence.json +112 -0
  102. package/rules/ruff-f509-percent-format-unsupported-format-character.json +86 -0
  103. package/rules/ruff-f521-string-dot-format-invalid-format.json +83 -0
  104. package/rules/ruff-f522-string-dot-format-extra-named-arguments.json +46 -0
  105. package/rules/ruff-f523-string-dot-format-extra-positional-arguments.json +48 -0
  106. package/rules/ruff-f524-string-dot-format-missing-arguments.json +46 -0
  107. package/rules/ruff-f525-string-dot-format-mixing-automatic.json +99 -0
  108. package/rules/ruff-f541-f-string-missing-placeholders.json +52 -0
  109. package/rules/ruff-f601-multi-value-repeated-key-literal.json +215 -0
  110. package/rules/ruff-f602-multi-value-repeated-key-variable.json +123 -0
  111. package/rules/ruff-f622-multiple-starred-expressions.json +57 -0
  112. package/rules/ruff-f632-is-literal.json +232 -0
  113. package/rules/ruff-f633-invalid-print-syntax.json +299 -0
  114. package/rules/ruff-f701-break-outside-loop.json +64 -0
  115. package/rules/ruff-f702-continue-outside-loop.json +64 -0
  116. package/rules/ruff-f706-return-outside-function.json +61 -0
  117. package/rules/ruff-f707-default-except-not-last.json +50 -0
  118. package/rules/ruff-f722-forward-annotation-syntax-error.json +654 -0
  119. package/rules/ruff-f822-undefined-export.json +55 -0
  120. package/rules/ruff-f823-undefined-local.json +42 -0
  121. package/rules/ruff-f842-unused-annotation.json +51 -0
  122. package/rules/ruff-f901-raise-not-implemented.json +97 -0
  123. package/rules/ruff-pie794-duplicate-class-field-definition.json +157 -0
  124. package/rules/ruff-pie796-non-unique-enums.json +460 -0
  125. package/rules/ruff-pie800-unnecessary-spread.json +62 -0
  126. package/rules/ruff-pie804-unnecessary-dict-kwargs.json +179 -0
  127. package/rules/ruff-pie807-reimplemented-container-builtin.json +100 -0
  128. package/rules/ruff-pie810-multiple-starts-ends-with.json +585 -0
  129. package/rules/ruff-ret501-unnecessary-return-none.json +256 -0
  130. package/rules/ruff-ret502-implicit-return-value.json +163 -0
  131. package/rules/ruff-ret505-superfluous-else-return.json +211 -0
  132. package/rules/ruff-ret506-superfluous-else-raise.json +211 -0
  133. package/rules/ruff-ret507-superfluous-else-continue.json +211 -0
  134. package/rules/ruff-ret508-superfluous-else-break.json +211 -0
  135. package/rules/ruff-sim101-duplicate-isinstance-call.json +384 -0
  136. package/rules/ruff-sim107-return-in-try-except-finally.json +82 -0
  137. package/rules/ruff-sim109-compare-with-tuple.json +205 -0
  138. package/rules/ruff-sim112-uncapitalized-environment-variables.json +168 -0
  139. package/rules/ruff-sim113-enumerate-for-loop.json +562 -0
  140. package/rules/ruff-sim208-double-negation.json +58 -0
  141. package/rules/ruff-sim210-if-expr-with-true-false.json +90 -0
  142. package/rules/ruff-sim211-if-expr-with-false-true.json +90 -0
  143. package/rules/ruff-sim212-if-expr-with-twisted-arms.json +95 -0
  144. package/rules/ruff-sim300-yoda-conditions.json +487 -0
  145. package/rules/ruff-sim905-split-static-string.json +579 -0
  146. package/rules/ruff-sim910-dict-get-with-none-default.json +518 -0
  147. package/rules/ruff-t100-debugger.json +197 -0
@@ -0,0 +1,210 @@
1
+ {
2
+ "format": "rerail.policy/v1",
3
+ "id": "bandit-b507-ssh-no-host-key-verification",
4
+ "revision": 4,
5
+ "mode": "steer",
6
+ "description": "Once an import whose name contains paramiko has been walked (Bandit's substring test, in Bandit's source-order walk), flag a call whose function name is set_missing_host_key_policy (the attribute name, a bare name, or a name aliased by an earlier import to one ending in set_missing_host_key_policy) and whose first positional argument is a name, attribute, or call naming AutoAddPolicy or WarningPolicy.",
7
+ "scope": {
8
+ "include": [
9
+ "**/*.py"
10
+ ],
11
+ "exclude": []
12
+ },
13
+ "clauses": [
14
+ {
15
+ "id": "b507",
16
+ "forbid": {
17
+ "ast": {
18
+ "language": "python",
19
+ "utils": {
20
+ "paramiko-import": {
21
+ "any": [
22
+ {
23
+ "kind": "import_statement"
24
+ },
25
+ {
26
+ "kind": "import_from_statement"
27
+ },
28
+ {
29
+ "kind": "future_import_statement"
30
+ }
31
+ ],
32
+ "has": {
33
+ "stopBy": "end",
34
+ "kind": "dotted_name",
35
+ "regex": "paramiko"
36
+ }
37
+ },
38
+ "after-paramiko-import": {
39
+ "inside": {
40
+ "stopBy": "end",
41
+ "follows": {
42
+ "stopBy": "end",
43
+ "any": [
44
+ {
45
+ "matches": "paramiko-import"
46
+ },
47
+ {
48
+ "has": {
49
+ "stopBy": "end",
50
+ "matches": "paramiko-import"
51
+ }
52
+ }
53
+ ]
54
+ }
55
+ }
56
+ },
57
+ "alias-to-target": {
58
+ "kind": "aliased_import",
59
+ "all": [
60
+ {
61
+ "has": {
62
+ "field": "alias",
63
+ "pattern": "$ALIAS"
64
+ }
65
+ },
66
+ {
67
+ "has": {
68
+ "field": "name",
69
+ "regex": "(?:^|\\.)\\s*set_missing_host_key_policy$"
70
+ }
71
+ }
72
+ ]
73
+ },
74
+ "after-alias-to-target": {
75
+ "inside": {
76
+ "stopBy": "end",
77
+ "follows": {
78
+ "stopBy": "end",
79
+ "has": {
80
+ "stopBy": "end",
81
+ "matches": "alias-to-target"
82
+ }
83
+ }
84
+ }
85
+ },
86
+ "target-callee": {
87
+ "any": [
88
+ {
89
+ "kind": "attribute",
90
+ "has": {
91
+ "field": "attribute",
92
+ "regex": "^set_missing_host_key_policy$"
93
+ }
94
+ },
95
+ {
96
+ "kind": "identifier",
97
+ "regex": "^set_missing_host_key_policy$"
98
+ },
99
+ {
100
+ "kind": "identifier",
101
+ "pattern": "$ALIAS",
102
+ "matches": "after-alias-to-target"
103
+ },
104
+ {
105
+ "kind": "parenthesized_expression",
106
+ "has": {
107
+ "stopBy": "neighbor",
108
+ "matches": "target-callee"
109
+ }
110
+ }
111
+ ]
112
+ },
113
+ "policy-name": {
114
+ "any": [
115
+ {
116
+ "kind": "attribute",
117
+ "has": {
118
+ "field": "attribute",
119
+ "regex": "^(?:AutoAddPolicy|WarningPolicy)$"
120
+ }
121
+ },
122
+ {
123
+ "kind": "identifier",
124
+ "regex": "^(?:AutoAddPolicy|WarningPolicy)$"
125
+ },
126
+ {
127
+ "kind": "parenthesized_expression",
128
+ "has": {
129
+ "stopBy": "neighbor",
130
+ "matches": "policy-name"
131
+ }
132
+ }
133
+ ]
134
+ },
135
+ "trusting-policy": {
136
+ "any": [
137
+ {
138
+ "matches": "policy-name"
139
+ },
140
+ {
141
+ "kind": "call",
142
+ "has": {
143
+ "field": "function",
144
+ "matches": "policy-name"
145
+ }
146
+ },
147
+ {
148
+ "kind": "parenthesized_expression",
149
+ "has": {
150
+ "stopBy": "neighbor",
151
+ "matches": "trusting-policy"
152
+ }
153
+ }
154
+ ]
155
+ }
156
+ },
157
+ "rule": {
158
+ "kind": "call",
159
+ "arguments": {
160
+ "signature": [
161
+ "policy",
162
+ "/"
163
+ ],
164
+ "bind": {
165
+ "POLICY": "policy"
166
+ },
167
+ "mode": "syntactic"
168
+ },
169
+ "all": [
170
+ {
171
+ "has": {
172
+ "field": "arguments",
173
+ "has": {
174
+ "matches": "trusting-policy"
175
+ }
176
+ }
177
+ },
178
+ {
179
+ "has": {
180
+ "field": "function",
181
+ "matches": "target-callee"
182
+ }
183
+ },
184
+ {
185
+ "matches": "after-paramiko-import"
186
+ }
187
+ ]
188
+ },
189
+ "constraints": {
190
+ "POLICY": {
191
+ "matches": "trusting-policy"
192
+ }
193
+ }
194
+ }
195
+ },
196
+ "violation": {
197
+ "code": "B507",
198
+ "anchor": "witness.span",
199
+ "message": "Paramiko call with policy set to automatically trust the unknown host key.",
200
+ "suppress": {
201
+ "nosec": {
202
+ "codes": [
203
+ "B507"
204
+ ]
205
+ }
206
+ }
207
+ }
208
+ }
209
+ ]
210
+ }
@@ -0,0 +1,63 @@
1
+ {
2
+ "format": "rerail.policy/v1",
3
+ "id": "bandit-b606-start-process-with-no-shell",
4
+ "revision": 1,
5
+ "mode": "steer",
6
+ "description": "Detect configured process APIs that execute without a command shell",
7
+ "scope": {
8
+ "include": [
9
+ "**/*.py"
10
+ ],
11
+ "exclude": []
12
+ },
13
+ "clauses": [
14
+ {
15
+ "id": "bandit-b606",
16
+ "forbid": {
17
+ "ast": {
18
+ "language": "python",
19
+ "rule": {
20
+ "pattern": "$F($$$ARGS)"
21
+ },
22
+ "constraints": {
23
+ "F": {
24
+ "resolves": {
25
+ "import": [
26
+ "os.execl",
27
+ "os.execle",
28
+ "os.execlp",
29
+ "os.execlpe",
30
+ "os.execv",
31
+ "os.execve",
32
+ "os.execvp",
33
+ "os.execvpe",
34
+ "os.spawnl",
35
+ "os.spawnle",
36
+ "os.spawnlp",
37
+ "os.spawnlpe",
38
+ "os.spawnv",
39
+ "os.spawnve",
40
+ "os.spawnvp",
41
+ "os.spawnvpe",
42
+ "os.startfile"
43
+ ]
44
+ }
45
+ }
46
+ }
47
+ }
48
+ },
49
+ "violation": {
50
+ "code": "B606",
51
+ "anchor": "witness.span",
52
+ "message": "Review input passed to a no-shell process API",
53
+ "suppress": {
54
+ "nosec": {
55
+ "codes": [
56
+ "B606"
57
+ ]
58
+ }
59
+ }
60
+ }
61
+ }
62
+ ]
63
+ }
@@ -0,0 +1,268 @@
1
+ {
2
+ "format": "rerail.policy/v1",
3
+ "id": "bandit-b610-django-extra-used",
4
+ "revision": 2,
5
+ "mode": "steer",
6
+ "description": "Port of Bandit 1.9.4's B610 django_extra_used: a call of `extra` whose `where` or `tables` is not a list of plain strings, or whose `select` is not a dict of plain strings, bound to QuerySet.extra's six positional slots. Port of the kernel test b610_extra_with_a_non_literal_where_tables_or_select. Bandit's `# nosec` is honoured (`suppress.nosec`), as its recordings honour it. Divergence: Bandit reports a call of any function or method named `extra`; the port reports only a method call whose receiver looks like a Django QuerySet or Manager: a name or attribute named `objects`, `qs`, `QS`, `queryset`, `querysets`, `manager` or `managers`, alone or after an underscore-joined prefix (`User.objects`, `self.queryset`, `base_qs`, `_default_manager`); a call of `get_queryset`; a method call on such a receiver (`User.objects.filter(...)`); or `self` or `super()` inside a class with a base whose name ends in `QuerySet` (`QuerySet`, `SoftDeleteQuerySet`, `TreeQuerySet`) or is `Manager`, `BaseManager` or `BaseUserManager`, optionally dotted (`models.QuerySet`); a base that only ends in `Manager` (`AbstractContextManager`, `PluginManager`, `TreeManager`) does not count. A bare `extra(...)` call and `extra` on any other receiver (`parser.extra(...)`, `self.extra(...)` in an unrelated class) are not reported (NER-1827).",
7
+ "scope": {
8
+ "include": [
9
+ "**/*"
10
+ ],
11
+ "exclude": []
12
+ },
13
+ "clauses": [
14
+ {
15
+ "id": "django-extra-used",
16
+ "forbid": {
17
+ "ast": {
18
+ "language": "python",
19
+ "rule": {
20
+ "any": [
21
+ {
22
+ "pattern": "$R.extra($$$)"
23
+ }
24
+ ],
25
+ "all": [
26
+ {
27
+ "has": {
28
+ "field": "function",
29
+ "has": {
30
+ "field": "object",
31
+ "matches": "queryset-receiver"
32
+ }
33
+ }
34
+ },
35
+ {
36
+ "any": [
37
+ {
38
+ "arguments": {
39
+ "signature": [
40
+ "select",
41
+ "where",
42
+ "params",
43
+ "tables",
44
+ "order_by",
45
+ "select_params"
46
+ ],
47
+ "bind": {
48
+ "W": "where"
49
+ }
50
+ },
51
+ "has": {
52
+ "stopBy": "end",
53
+ "pattern": "$W",
54
+ "not": {
55
+ "matches": "strings"
56
+ }
57
+ }
58
+ },
59
+ {
60
+ "arguments": {
61
+ "signature": [
62
+ "select",
63
+ "where",
64
+ "params",
65
+ "tables",
66
+ "order_by",
67
+ "select_params"
68
+ ],
69
+ "bind": {
70
+ "T": "tables"
71
+ }
72
+ },
73
+ "has": {
74
+ "stopBy": "end",
75
+ "pattern": "$T",
76
+ "not": {
77
+ "matches": "strings"
78
+ }
79
+ }
80
+ },
81
+ {
82
+ "arguments": {
83
+ "signature": [
84
+ "select",
85
+ "where",
86
+ "params",
87
+ "tables",
88
+ "order_by",
89
+ "select_params"
90
+ ],
91
+ "bind": {
92
+ "S": "select"
93
+ }
94
+ },
95
+ "has": {
96
+ "stopBy": "end",
97
+ "pattern": "$S",
98
+ "not": {
99
+ "matches": "string-pairs"
100
+ }
101
+ }
102
+ }
103
+ ]
104
+ }
105
+ ]
106
+ },
107
+ "utils": {
108
+ "queryset-receiver": {
109
+ "any": [
110
+ {
111
+ "kind": "identifier",
112
+ "regex": "^(?:[A-Za-z0-9_]*_)?(?:qs|QS|querysets?|objects|managers?)$"
113
+ },
114
+ {
115
+ "kind": "attribute",
116
+ "has": {
117
+ "field": "attribute",
118
+ "regex": "^(?:[A-Za-z0-9_]*_)?(?:qs|QS|querysets?|objects|managers?)$"
119
+ }
120
+ },
121
+ {
122
+ "kind": "call",
123
+ "has": {
124
+ "field": "function",
125
+ "kind": "attribute",
126
+ "has": {
127
+ "field": "object",
128
+ "matches": "queryset-receiver"
129
+ }
130
+ }
131
+ },
132
+ {
133
+ "kind": "call",
134
+ "has": {
135
+ "field": "function",
136
+ "any": [
137
+ {
138
+ "kind": "identifier",
139
+ "regex": "^get_queryset$"
140
+ },
141
+ {
142
+ "kind": "attribute",
143
+ "has": {
144
+ "field": "attribute",
145
+ "regex": "^get_queryset$"
146
+ }
147
+ }
148
+ ]
149
+ }
150
+ },
151
+ {
152
+ "any": [
153
+ {
154
+ "kind": "identifier",
155
+ "regex": "^self$"
156
+ },
157
+ {
158
+ "pattern": "super()"
159
+ }
160
+ ],
161
+ "inside": {
162
+ "stopBy": "end",
163
+ "kind": "class_definition",
164
+ "has": {
165
+ "field": "superclasses",
166
+ "regex": "(?:^|[(,\\s])(?:[A-Za-z_][A-Za-z0-9_]*\\.)*(?:[A-Za-z0-9_]*QuerySet|Manager|BaseManager|BaseUserManager)\\b"
167
+ }
168
+ }
169
+ }
170
+ ]
171
+ },
172
+ "string": {
173
+ "any": [
174
+ {
175
+ "kind": "string",
176
+ "not": {
177
+ "regex": "^[A-Za-z]*[fFbBtT]"
178
+ }
179
+ },
180
+ {
181
+ "kind": "concatenated_string",
182
+ "not": {
183
+ "has": {
184
+ "kind": "string",
185
+ "regex": "^[A-Za-z]*[fFbBtT]"
186
+ }
187
+ }
188
+ }
189
+ ]
190
+ },
191
+ "strings": {
192
+ "kind": "list",
193
+ "not": {
194
+ "has": {
195
+ "stopBy": "neighbor",
196
+ "not": {
197
+ "any": [
198
+ {
199
+ "matches": "string"
200
+ },
201
+ {
202
+ "regex": "^[\\[\\],]$"
203
+ },
204
+ {
205
+ "kind": "comment"
206
+ }
207
+ ]
208
+ }
209
+ }
210
+ }
211
+ },
212
+ "string-pairs": {
213
+ "kind": "dictionary",
214
+ "not": {
215
+ "has": {
216
+ "stopBy": "neighbor",
217
+ "not": {
218
+ "any": [
219
+ {
220
+ "kind": "pair",
221
+ "not": {
222
+ "has": {
223
+ "stopBy": "neighbor",
224
+ "not": {
225
+ "any": [
226
+ {
227
+ "matches": "string"
228
+ },
229
+ {
230
+ "regex": "^:$"
231
+ },
232
+ {
233
+ "kind": "comment"
234
+ }
235
+ ]
236
+ }
237
+ }
238
+ }
239
+ },
240
+ {
241
+ "regex": "^[{},]$"
242
+ },
243
+ {
244
+ "kind": "comment"
245
+ }
246
+ ]
247
+ }
248
+ }
249
+ }
250
+ }
251
+ }
252
+ }
253
+ },
254
+ "violation": {
255
+ "anchor": "witness.span",
256
+ "code": "B610",
257
+ "message": "Bandit B610 (django-extra-used)",
258
+ "suppress": {
259
+ "nosec": {
260
+ "codes": [
261
+ "B610"
262
+ ]
263
+ }
264
+ }
265
+ }
266
+ }
267
+ ]
268
+ }