deepscan-cli 1.0.0 → 1.2.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.
- package/NOTICE +5 -0
- package/README.md +224 -61
- package/dist/bin/deepscan.js +189 -71
- package/dist/bin/deepscan.js.map +1 -1
- package/dist/{chunk-OSYJXVNF.js → chunk-4TWV5TES.js} +5130 -610
- package/dist/chunk-4TWV5TES.js.map +1 -0
- package/dist/index.d.ts +62 -5
- package/dist/index.js +13 -3
- package/package.json +38 -12
- package/rules/built-in/default-config.yml +28 -3
- package/rules/built-in/operations.yml +287 -0
- package/rules/built-in/security.yml +12 -6
- package/dist/chunk-OSYJXVNF.js.map +0 -1
- package/rules/built-in/converted-semgrep.yml +0 -37
- package/rules/built-in/semgrep-apex.yml +0 -336
- package/rules/built-in/semgrep-bash.yml +0 -362
- package/rules/built-in/semgrep-c.yml +0 -429
- package/rules/built-in/semgrep-clojure.yml +0 -166
- package/rules/built-in/semgrep-csharp.yml +0 -1260
- package/rules/built-in/semgrep-dart.yml +0 -21
- package/rules/built-in/semgrep-dockerfile.yml +0 -874
- package/rules/built-in/semgrep-elixir.yml +0 -146
- package/rules/built-in/semgrep-generic.yml +0 -2945
- package/rules/built-in/semgrep-go.yml +0 -2898
- package/rules/built-in/semgrep-hcl.yml +0 -8181
- package/rules/built-in/semgrep-html.yml +0 -94
- package/rules/built-in/semgrep-java.yml +0 -4219
- package/rules/built-in/semgrep-javascript.yml +0 -6243
- package/rules/built-in/semgrep-json.yml +0 -360
- package/rules/built-in/semgrep-kotlin.yml +0 -540
- package/rules/built-in/semgrep-lua.yml +0 -46
- package/rules/built-in/semgrep-ocaml.yml +0 -773
- package/rules/built-in/semgrep-php.yml +0 -1638
- package/rules/built-in/semgrep-python.yml +0 -11240
- package/rules/built-in/semgrep-regex.yml +0 -6444
- package/rules/built-in/semgrep-ruby.yml +0 -2687
- package/rules/built-in/semgrep-rust.yml +0 -278
- package/rules/built-in/semgrep-scala.yml +0 -807
- package/rules/built-in/semgrep-sh.yml +0 -46
- package/rules/built-in/semgrep-solidity.yml +0 -1046
- package/rules/built-in/semgrep-swift.yml +0 -200
- package/rules/built-in/semgrep-terraform.yml +0 -147
- package/rules/built-in/semgrep-typescript.yml +0 -6212
- package/rules/built-in/semgrep-xml.yml +0 -31
- package/rules/built-in/semgrep-yaml.yml +0 -2785
- package/rules/examples/custom-api-security.yml +0 -66
|
@@ -1,2785 +0,0 @@
|
|
|
1
|
-
rules:
|
|
2
|
-
- id: dockerfile-dockerd-socket-mount
|
|
3
|
-
name: dockerfile-dockerd-socket-mount
|
|
4
|
-
description: >-
|
|
5
|
-
The Dockerfile(image) mounts docker.sock to the container which may allow an attacker already inside of the
|
|
6
|
-
container to escape container and execute arbitrary commands on the host machine.
|
|
7
|
-
category: file-ops
|
|
8
|
-
severity: high
|
|
9
|
-
confidence: medium
|
|
10
|
-
languages:
|
|
11
|
-
- dockerfile
|
|
12
|
-
- yaml
|
|
13
|
-
patterns:
|
|
14
|
-
- regex: .*
|
|
15
|
-
message: >-
|
|
16
|
-
The Dockerfile(image) mounts docker.sock to the container which may allow an attacker already inside of the
|
|
17
|
-
container to escape container and execute arbitrary commands on the host machine.
|
|
18
|
-
cwe:
|
|
19
|
-
- CWE-862
|
|
20
|
-
- CWE-269
|
|
21
|
-
owasp: []
|
|
22
|
-
references:
|
|
23
|
-
- https://cheatsheetseries.owasp.org/cheatsheets/Docker_Security_Cheat_Sheet.html
|
|
24
|
-
- https://redfoxsec.com/blog/insecure-volume-mounts-in-docker/
|
|
25
|
-
- https://blog.quarkslab.com/why-is-exposing-the-docker-socket-a-really-bad-idea.html
|
|
26
|
-
tags:
|
|
27
|
-
- dockerfile
|
|
28
|
-
- id: contains-bidirectional-characters
|
|
29
|
-
name: contains-bidirectional-characters
|
|
30
|
-
description: >-
|
|
31
|
-
This code contains bidirectional (bidi) characters. While this is useful for support of right-to-left languages
|
|
32
|
-
such as Arabic or Hebrew, it can also be used to trick language parsers into executing code in a manner that is
|
|
33
|
-
different from how it is displayed in code editing and review tools. If this is not what you were expecting,
|
|
34
|
-
please review this code in an editor that can reveal hidden Unicode characters.
|
|
35
|
-
category: security
|
|
36
|
-
severity: medium
|
|
37
|
-
confidence: medium
|
|
38
|
-
languages:
|
|
39
|
-
- bash
|
|
40
|
-
- c
|
|
41
|
-
- csharp
|
|
42
|
-
- go
|
|
43
|
-
- java
|
|
44
|
-
- javascript
|
|
45
|
-
- json
|
|
46
|
-
- kotlin
|
|
47
|
-
- lua
|
|
48
|
-
- ocaml
|
|
49
|
-
- php
|
|
50
|
-
- python
|
|
51
|
-
- ruby
|
|
52
|
-
- rust
|
|
53
|
-
- scala
|
|
54
|
-
- sh
|
|
55
|
-
- typescript
|
|
56
|
-
- yaml
|
|
57
|
-
patterns:
|
|
58
|
-
- regex: .*
|
|
59
|
-
message: >-
|
|
60
|
-
This code contains bidirectional (bidi) characters. While this is useful for support of right-to-left
|
|
61
|
-
languages such as Arabic or Hebrew, it can also be used to trick language parsers into executing code in a
|
|
62
|
-
manner that is different from how it is displayed in code editing and review tools. If this is not what you
|
|
63
|
-
were expecting, please review this code in an editor that can reveal hidden Unicode characters.
|
|
64
|
-
cwe:
|
|
65
|
-
- CWE-94
|
|
66
|
-
owasp:
|
|
67
|
-
- A03:2021
|
|
68
|
-
- A05:2025
|
|
69
|
-
references:
|
|
70
|
-
- https://trojansource.codes/
|
|
71
|
-
tags:
|
|
72
|
-
- unicode
|
|
73
|
-
- id: spring-actuator-fully-enabled-yaml
|
|
74
|
-
name: spring-actuator-fully-enabled-yaml
|
|
75
|
-
description: >-
|
|
76
|
-
Spring Boot Actuator is fully enabled. This exposes sensitive endpoints such as /actuator/env, /actuator/logfile,
|
|
77
|
-
/actuator/heapdump and others. Unless you have Spring Security enabled or another means to protect these
|
|
78
|
-
endpoints, this functionality is available without authentication, causing a severe security risk.
|
|
79
|
-
category: security
|
|
80
|
-
severity: medium
|
|
81
|
-
confidence: medium
|
|
82
|
-
languages:
|
|
83
|
-
- yaml
|
|
84
|
-
patterns:
|
|
85
|
-
- pattern: |
|
|
86
|
-
include: "*"
|
|
87
|
-
message: >-
|
|
88
|
-
Spring Boot Actuator is fully enabled. This exposes sensitive endpoints such as /actuator/env,
|
|
89
|
-
/actuator/logfile, /actuator/heapdump and others. Unless you have Spring Security enabled or another means to
|
|
90
|
-
protect these endpoints, this functionality is available without authentication, causing a severe security
|
|
91
|
-
risk.
|
|
92
|
-
cwe:
|
|
93
|
-
- CWE-200
|
|
94
|
-
owasp:
|
|
95
|
-
- A01:2021
|
|
96
|
-
- A01:2025
|
|
97
|
-
references:
|
|
98
|
-
- >-
|
|
99
|
-
https://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-features.html#production-ready-endpoints-exposing-endpoints
|
|
100
|
-
- https://medium.com/walmartglobaltech/perils-of-spring-boot-actuators-misconfiguration-185c43a0f785
|
|
101
|
-
- https://blog.maass.xyz/spring-actuator-security-part-1-stealing-secrets-using-spring-actuators
|
|
102
|
-
tags:
|
|
103
|
-
- spring
|
|
104
|
-
- id: spring-actuator-dangerous-endpoints-enabled-yaml
|
|
105
|
-
name: spring-actuator-dangerous-endpoints-enabled-yaml
|
|
106
|
-
description: >-
|
|
107
|
-
Spring Boot Actuator "$ACTUATOR" is enabled. Depending on the actuator, this can pose a significant security risk.
|
|
108
|
-
Please double-check if the actuator is needed and properly secured.
|
|
109
|
-
category: security
|
|
110
|
-
severity: medium
|
|
111
|
-
confidence: medium
|
|
112
|
-
languages:
|
|
113
|
-
- yaml
|
|
114
|
-
patterns:
|
|
115
|
-
- pattern: |
|
|
116
|
-
include: [..., $ACTUATOR, ...]
|
|
117
|
-
message: >-
|
|
118
|
-
Spring Boot Actuator "$ACTUATOR" is enabled. Depending on the actuator, this can pose a significant security
|
|
119
|
-
risk. Please double-check if the actuator is needed and properly secured.
|
|
120
|
-
cwe:
|
|
121
|
-
- CWE-200
|
|
122
|
-
owasp:
|
|
123
|
-
- A01:2021
|
|
124
|
-
- A01:2025
|
|
125
|
-
references:
|
|
126
|
-
- >-
|
|
127
|
-
https://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-features.html#production-ready-endpoints-exposing-endpoints
|
|
128
|
-
- https://medium.com/walmartglobaltech/perils-of-spring-boot-actuators-misconfiguration-185c43a0f785
|
|
129
|
-
- https://blog.maass.xyz/spring-actuator-security-part-1-stealing-secrets-using-spring-actuators
|
|
130
|
-
tags:
|
|
131
|
-
- spring
|
|
132
|
-
- id: dependabot-missing-cooldown
|
|
133
|
-
name: dependabot-missing-cooldown
|
|
134
|
-
description: >-
|
|
135
|
-
This Dependabot configuration does not set a cooldown period. Newly published packages can be malicious or
|
|
136
|
-
unstable. Add a `cooldown` block with `default-days: 7` to each `package-ecosystem` entry under `updates` to wait
|
|
137
|
-
7 days before proposing updates to newly published package versions. Reference:
|
|
138
|
-
https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#cooldown
|
|
139
|
-
category: security
|
|
140
|
-
severity: medium
|
|
141
|
-
confidence: medium
|
|
142
|
-
languages:
|
|
143
|
-
- yaml
|
|
144
|
-
patterns:
|
|
145
|
-
- regex: .*
|
|
146
|
-
message: >-
|
|
147
|
-
This Dependabot configuration does not set a cooldown period. Newly published packages can be malicious or
|
|
148
|
-
unstable. Add a `cooldown` block with `default-days: 7` to each `package-ecosystem` entry under `updates` to
|
|
149
|
-
wait 7 days before proposing updates to newly published package versions. Reference:
|
|
150
|
-
https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#cooldown
|
|
151
|
-
cwe:
|
|
152
|
-
- CWE-829
|
|
153
|
-
owasp:
|
|
154
|
-
- A08:2021
|
|
155
|
-
references:
|
|
156
|
-
- >-
|
|
157
|
-
https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#cooldown
|
|
158
|
-
tags:
|
|
159
|
-
- dependabot
|
|
160
|
-
- id: pnpm-block-exotic-sub-dependencies
|
|
161
|
-
name: pnpm-block-exotic-sub-dependencies
|
|
162
|
-
description: >-
|
|
163
|
-
Missing or incorrect blockExoticSubdeps. Set `blockExoticSubdeps: true` to transitive dependencies from being
|
|
164
|
-
installed from untrusted sources. Added in: v10.26.0 Reference: https://pnpm.io/settings#blockexoticsubdeps
|
|
165
|
-
category: security
|
|
166
|
-
severity: medium
|
|
167
|
-
confidence: medium
|
|
168
|
-
languages:
|
|
169
|
-
- yaml
|
|
170
|
-
patterns:
|
|
171
|
-
- regex: .*
|
|
172
|
-
message: >-
|
|
173
|
-
Missing or incorrect blockExoticSubdeps. Set `blockExoticSubdeps: true` to transitive dependencies from being
|
|
174
|
-
installed from untrusted sources. Added in: v10.26.0 Reference: https://pnpm.io/settings#blockexoticsubdeps
|
|
175
|
-
cwe:
|
|
176
|
-
- CWE-829
|
|
177
|
-
owasp:
|
|
178
|
-
- A08:2021
|
|
179
|
-
references:
|
|
180
|
-
- https://pnpm.io/settings#blockexoticsubdeps
|
|
181
|
-
tags:
|
|
182
|
-
- pnpm
|
|
183
|
-
- id: pnpm-minimum-release-age
|
|
184
|
-
name: pnpm-minimum-release-age
|
|
185
|
-
description: >-
|
|
186
|
-
This pnpm workspace configuration does not set a minimum release age. Newly published packages can be malicious or
|
|
187
|
-
unstable. Add `minimumReleaseAge: 10080` (minutes) to wait at least seven days before installing newly published
|
|
188
|
-
package versions. Added in: v10.16.0 Reference: https://pnpm.io/settings#minimumreleaseage
|
|
189
|
-
category: security
|
|
190
|
-
severity: medium
|
|
191
|
-
confidence: medium
|
|
192
|
-
languages:
|
|
193
|
-
- yaml
|
|
194
|
-
patterns:
|
|
195
|
-
- regex: .*
|
|
196
|
-
message: >-
|
|
197
|
-
This pnpm workspace configuration does not set a minimum release age. Newly published packages can be
|
|
198
|
-
malicious or unstable. Add `minimumReleaseAge: 10080` (minutes) to wait at least seven days before installing
|
|
199
|
-
newly published package versions. Added in: v10.16.0 Reference: https://pnpm.io/settings#minimumreleaseage
|
|
200
|
-
cwe:
|
|
201
|
-
- CWE-829
|
|
202
|
-
owasp:
|
|
203
|
-
- A08:2021
|
|
204
|
-
references:
|
|
205
|
-
- https://pnpm.io/settings#minimumreleaseage
|
|
206
|
-
tags:
|
|
207
|
-
- pnpm
|
|
208
|
-
- id: pnpm-trust-policy
|
|
209
|
-
name: pnpm-trust-policy
|
|
210
|
-
description: >-
|
|
211
|
-
Missing or incorrect trustPolicy. Set `trustPolicy: no-downgrade` to prevent malicious package updates from
|
|
212
|
-
downgrading security settings. Added in: v10.21.0 Reference: https://pnpm.io/settings#trustpolicy
|
|
213
|
-
category: security
|
|
214
|
-
severity: medium
|
|
215
|
-
confidence: medium
|
|
216
|
-
languages:
|
|
217
|
-
- yaml
|
|
218
|
-
patterns:
|
|
219
|
-
- regex: .*
|
|
220
|
-
message: >-
|
|
221
|
-
Missing or incorrect trustPolicy. Set `trustPolicy: no-downgrade` to prevent malicious package updates from
|
|
222
|
-
downgrading security settings. Added in: v10.21.0 Reference: https://pnpm.io/settings#trustpolicy
|
|
223
|
-
cwe:
|
|
224
|
-
- CWE-829
|
|
225
|
-
owasp:
|
|
226
|
-
- A08:2021
|
|
227
|
-
references:
|
|
228
|
-
- https://pnpm.io/settings#minimumreleaseage
|
|
229
|
-
tags:
|
|
230
|
-
- pnpm
|
|
231
|
-
- id: yarn-missing-minimal-age-gate
|
|
232
|
-
name: yarn-missing-minimal-age-gate
|
|
233
|
-
description: >-
|
|
234
|
-
This .yarnrc.yml does not set a minimal age gate or sets it too low. Newly published packages can be malicious or
|
|
235
|
-
unstable. Add `npmMinimalAgeGate: "7d"` to wait 7 days before resolving newly published package versions. Added
|
|
236
|
-
in: 4.10 Reference: https://yarnpkg.com/configuration/yarnrc#npmMinimalAgeGate
|
|
237
|
-
category: security
|
|
238
|
-
severity: medium
|
|
239
|
-
confidence: medium
|
|
240
|
-
languages:
|
|
241
|
-
- yaml
|
|
242
|
-
patterns:
|
|
243
|
-
- regex: .*
|
|
244
|
-
message: >-
|
|
245
|
-
This .yarnrc.yml does not set a minimal age gate or sets it too low. Newly published packages can be malicious
|
|
246
|
-
or unstable. Add `npmMinimalAgeGate: "7d"` to wait 7 days before resolving newly published package versions.
|
|
247
|
-
Added in: 4.10 Reference: https://yarnpkg.com/configuration/yarnrc#npmMinimalAgeGate
|
|
248
|
-
cwe:
|
|
249
|
-
- CWE-829
|
|
250
|
-
owasp:
|
|
251
|
-
- A08:2021
|
|
252
|
-
references:
|
|
253
|
-
- https://yarnpkg.com/configuration/yarnrc#npmMinimalAgeGate
|
|
254
|
-
tags:
|
|
255
|
-
- yarn
|
|
256
|
-
- javascript
|
|
257
|
-
- id: check-rails-secret-yaml
|
|
258
|
-
name: check-rails-secret-yaml
|
|
259
|
-
description: >-
|
|
260
|
-
$VALUE Found a string literal assignment to a production Rails session secret in `secrets.yaml`. Do not commit
|
|
261
|
-
secret values to source control! Any user in possession of this value may falsify arbitrary session data in your
|
|
262
|
-
application. Read this value from an environment variable, KMS, or file on disk outside of source control.
|
|
263
|
-
category: secrets
|
|
264
|
-
severity: medium
|
|
265
|
-
confidence: medium
|
|
266
|
-
languages:
|
|
267
|
-
- yaml
|
|
268
|
-
patterns:
|
|
269
|
-
- pattern: |
|
|
270
|
-
secret_key_base: $VALUE
|
|
271
|
-
message: >-
|
|
272
|
-
$VALUE Found a string literal assignment to a production Rails session secret in `secrets.yaml`. Do not commit
|
|
273
|
-
secret values to source control! Any user in possession of this value may falsify arbitrary session data in
|
|
274
|
-
your application. Read this value from an environment variable, KMS, or file on disk outside of source
|
|
275
|
-
control.
|
|
276
|
-
cwe:
|
|
277
|
-
- CWE-540
|
|
278
|
-
owasp:
|
|
279
|
-
- A01:2021
|
|
280
|
-
- A01:2025
|
|
281
|
-
references:
|
|
282
|
-
- https://github.com/presidentbeef/brakeman/blob/main/test/apps/rails4/config/secrets.yml
|
|
283
|
-
tags:
|
|
284
|
-
- ruby
|
|
285
|
-
- rails
|
|
286
|
-
- id: event-binding-payload-with-hyphen
|
|
287
|
-
name: event-binding-payload-with-hyphen
|
|
288
|
-
description: >-
|
|
289
|
-
The parameter `$VALUE` to this WorkflowEventBinding includes hyphens, which will, very confusingly, throw an error
|
|
290
|
-
when Argo Workflows tries to invoke the workflow. Set the payload value to use underscores instead.
|
|
291
|
-
category: security
|
|
292
|
-
severity: medium
|
|
293
|
-
confidence: medium
|
|
294
|
-
languages:
|
|
295
|
-
- yaml
|
|
296
|
-
patterns:
|
|
297
|
-
- regex: .*
|
|
298
|
-
message: >-
|
|
299
|
-
The parameter `$VALUE` to this WorkflowEventBinding includes hyphens, which will, very confusingly, throw an
|
|
300
|
-
error when Argo Workflows tries to invoke the workflow. Set the payload value to use underscores instead.
|
|
301
|
-
cwe: []
|
|
302
|
-
owasp: []
|
|
303
|
-
references:
|
|
304
|
-
- https://argoproj.github.io/argo-workflows/variables/#expression
|
|
305
|
-
tags:
|
|
306
|
-
- argo
|
|
307
|
-
- argo-workflows
|
|
308
|
-
- id: argo-workflow-parameter-command-injection
|
|
309
|
-
name: argo-workflow-parameter-command-injection
|
|
310
|
-
description: >-
|
|
311
|
-
Using input or workflow parameters in here-scripts can lead to command injection or code injection. Convert the
|
|
312
|
-
parameters to env variables instead.
|
|
313
|
-
category: injection
|
|
314
|
-
severity: high
|
|
315
|
-
confidence: medium
|
|
316
|
-
languages:
|
|
317
|
-
- yaml
|
|
318
|
-
patterns:
|
|
319
|
-
- regex: .*
|
|
320
|
-
message: >-
|
|
321
|
-
Using input or workflow parameters in here-scripts can lead to command injection or code injection. Convert
|
|
322
|
-
the parameters to env variables instead.
|
|
323
|
-
cwe:
|
|
324
|
-
- CWE-78
|
|
325
|
-
- CWE-94
|
|
326
|
-
owasp:
|
|
327
|
-
- A03:2021
|
|
328
|
-
references:
|
|
329
|
-
- https://github.com/argoproj/argo-workflows/issues/5061
|
|
330
|
-
- https://github.com/argoproj/argo-workflows/issues/5114#issue-808865370
|
|
331
|
-
tags:
|
|
332
|
-
- ci
|
|
333
|
-
- argo
|
|
334
|
-
- id: exposing-docker-socket-volume
|
|
335
|
-
name: exposing-docker-socket-volume
|
|
336
|
-
description: >-
|
|
337
|
-
Exposing host's Docker socket to containers via a volume. The owner of this socket is root. Giving someone access
|
|
338
|
-
to it is equivalent to giving unrestricted root access to your host. Remove 'docker.sock' from volumes to prevent
|
|
339
|
-
this.
|
|
340
|
-
category: security
|
|
341
|
-
severity: medium
|
|
342
|
-
confidence: medium
|
|
343
|
-
languages:
|
|
344
|
-
- yaml
|
|
345
|
-
patterns:
|
|
346
|
-
- regex: .*
|
|
347
|
-
message: >-
|
|
348
|
-
Exposing host's Docker socket to containers via a volume. The owner of this socket is root. Giving someone
|
|
349
|
-
access to it is equivalent to giving unrestricted root access to your host. Remove 'docker.sock' from volumes
|
|
350
|
-
to prevent this.
|
|
351
|
-
cwe:
|
|
352
|
-
- CWE-250
|
|
353
|
-
owasp:
|
|
354
|
-
- A06:2017
|
|
355
|
-
- A05:2021
|
|
356
|
-
- A02:2025
|
|
357
|
-
references:
|
|
358
|
-
- https://docs.docker.com/compose/compose-file/compose-file-v3/#volume-configuration-reference
|
|
359
|
-
- >-
|
|
360
|
-
https://cheatsheetseries.owasp.org/cheatsheets/Docker_Security_Cheat_Sheet.html#rule-1-do-not-expose-the-docker-daemon-socket-even-to-the-containers
|
|
361
|
-
tags:
|
|
362
|
-
- docker-compose
|
|
363
|
-
- id: no-new-privileges
|
|
364
|
-
name: no-new-privileges
|
|
365
|
-
description: >-
|
|
366
|
-
Service '$SERVICE' allows for privilege escalation via setuid or setgid binaries. Add 'no-new-privileges:true' in
|
|
367
|
-
'security_opt' to prevent this.
|
|
368
|
-
category: security
|
|
369
|
-
severity: medium
|
|
370
|
-
confidence: medium
|
|
371
|
-
languages:
|
|
372
|
-
- yaml
|
|
373
|
-
patterns:
|
|
374
|
-
- pattern: |
|
|
375
|
-
$SERVICE:
|
|
376
|
-
...
|
|
377
|
-
image: ...
|
|
378
|
-
message: >-
|
|
379
|
-
Service '$SERVICE' allows for privilege escalation via setuid or setgid binaries. Add 'no-new-privileges:true'
|
|
380
|
-
in 'security_opt' to prevent this.
|
|
381
|
-
cwe:
|
|
382
|
-
- CWE-732
|
|
383
|
-
owasp:
|
|
384
|
-
- A05:2021
|
|
385
|
-
- A06:2017
|
|
386
|
-
- A02:2025
|
|
387
|
-
references:
|
|
388
|
-
- https://raesene.github.io/blog/2019/06/01/docker-capabilities-and-no-new-privs/
|
|
389
|
-
- https://www.kernel.org/doc/Documentation/prctl/no_new_privs.txt
|
|
390
|
-
- >-
|
|
391
|
-
https://cheatsheetseries.owasp.org/cheatsheets/Docker_Security_Cheat_Sheet.html#rule-4-add-no-new-privileges-flag
|
|
392
|
-
tags:
|
|
393
|
-
- docker-compose
|
|
394
|
-
- id: privileged-service
|
|
395
|
-
name: privileged-service
|
|
396
|
-
description: >-
|
|
397
|
-
Service '$SERVICE' is running in privileged mode. This grants the container the equivalent of root capabilities on
|
|
398
|
-
the host machine. This can lead to container escapes, privilege escalation, and other security concerns. Remove
|
|
399
|
-
the 'privileged' key to disable this capability.
|
|
400
|
-
category: security
|
|
401
|
-
severity: medium
|
|
402
|
-
confidence: medium
|
|
403
|
-
languages:
|
|
404
|
-
- yaml
|
|
405
|
-
patterns:
|
|
406
|
-
- regex: .*
|
|
407
|
-
message: >-
|
|
408
|
-
Service '$SERVICE' is running in privileged mode. This grants the container the equivalent of root
|
|
409
|
-
capabilities on the host machine. This can lead to container escapes, privilege escalation, and other security
|
|
410
|
-
concerns. Remove the 'privileged' key to disable this capability.
|
|
411
|
-
cwe:
|
|
412
|
-
- CWE-250
|
|
413
|
-
owasp:
|
|
414
|
-
- A06:2017
|
|
415
|
-
- A05:2021
|
|
416
|
-
- A02:2025
|
|
417
|
-
references:
|
|
418
|
-
- https://www.trendmicro.com/en_us/research/19/l/why-running-a-privileged-container-in-docker-is-a-bad-idea.html
|
|
419
|
-
- https://containerjournal.com/topics/container-security/why-running-a-privileged-container-is-not-a-good-idea/
|
|
420
|
-
tags:
|
|
421
|
-
- docker-compose
|
|
422
|
-
- id: seccomp-confinement-disabled
|
|
423
|
-
name: seccomp-confinement-disabled
|
|
424
|
-
description: >-
|
|
425
|
-
Service '$SERVICE' is explicitly disabling seccomp confinement. This runs the service in an unrestricted state.
|
|
426
|
-
Remove 'seccomp:unconfined' to prevent this.
|
|
427
|
-
category: security
|
|
428
|
-
severity: medium
|
|
429
|
-
confidence: medium
|
|
430
|
-
languages:
|
|
431
|
-
- yaml
|
|
432
|
-
patterns:
|
|
433
|
-
- pattern: |
|
|
434
|
-
$SERVICE:
|
|
435
|
-
...
|
|
436
|
-
image: ...
|
|
437
|
-
...
|
|
438
|
-
security_opt:
|
|
439
|
-
- ...
|
|
440
|
-
- seccomp:unconfined
|
|
441
|
-
message: >-
|
|
442
|
-
Service '$SERVICE' is explicitly disabling seccomp confinement. This runs the service in an unrestricted
|
|
443
|
-
state. Remove 'seccomp:unconfined' to prevent this.
|
|
444
|
-
cwe:
|
|
445
|
-
- CWE-284
|
|
446
|
-
owasp:
|
|
447
|
-
- A05:2017
|
|
448
|
-
- A01:2021
|
|
449
|
-
- A01:2025
|
|
450
|
-
references:
|
|
451
|
-
- https://docs.docker.com/engine/security/seccomp/
|
|
452
|
-
tags:
|
|
453
|
-
- docker-compose
|
|
454
|
-
- id: selinux-separation-disabled
|
|
455
|
-
name: selinux-separation-disabled
|
|
456
|
-
description: >-
|
|
457
|
-
Service '$SERVICE' is explicitly disabling SELinux separation. This runs the service as an unconfined type. Remove
|
|
458
|
-
'label:disable' to prevent this.
|
|
459
|
-
category: security
|
|
460
|
-
severity: medium
|
|
461
|
-
confidence: medium
|
|
462
|
-
languages:
|
|
463
|
-
- yaml
|
|
464
|
-
patterns:
|
|
465
|
-
- pattern: |
|
|
466
|
-
$SERVICE:
|
|
467
|
-
...
|
|
468
|
-
image: ...
|
|
469
|
-
...
|
|
470
|
-
security_opt:
|
|
471
|
-
- ...
|
|
472
|
-
- label:disable
|
|
473
|
-
message: >-
|
|
474
|
-
Service '$SERVICE' is explicitly disabling SELinux separation. This runs the service as an unconfined type.
|
|
475
|
-
Remove 'label:disable' to prevent this.
|
|
476
|
-
cwe:
|
|
477
|
-
- CWE-284
|
|
478
|
-
owasp:
|
|
479
|
-
- A05:2017
|
|
480
|
-
- A01:2021
|
|
481
|
-
- A01:2025
|
|
482
|
-
references:
|
|
483
|
-
- https://www.projectatomic.io/blog/2016/03/dwalsh_selinux_containers/
|
|
484
|
-
- https://docs.docker.com/engine/reference/run/#security-configuration
|
|
485
|
-
tags:
|
|
486
|
-
- docker-compose
|
|
487
|
-
- id: writable-filesystem-service
|
|
488
|
-
name: writable-filesystem-service
|
|
489
|
-
description: >-
|
|
490
|
-
Service '$SERVICE' is running with a writable root filesystem. This may allow malicious applications to download
|
|
491
|
-
and run additional payloads, or modify container files. If an application inside a container has to save something
|
|
492
|
-
temporarily consider using a tmpfs. Add 'read_only: true' to this service to prevent this.
|
|
493
|
-
category: file-ops
|
|
494
|
-
severity: medium
|
|
495
|
-
confidence: medium
|
|
496
|
-
languages:
|
|
497
|
-
- yaml
|
|
498
|
-
patterns:
|
|
499
|
-
- pattern: |
|
|
500
|
-
$SERVICE:
|
|
501
|
-
...
|
|
502
|
-
image: ...
|
|
503
|
-
...
|
|
504
|
-
message: >-
|
|
505
|
-
Service '$SERVICE' is running with a writable root filesystem. This may allow malicious applications to
|
|
506
|
-
download and run additional payloads, or modify container files. If an application inside a container has to
|
|
507
|
-
save something temporarily consider using a tmpfs. Add 'read_only: true' to this service to prevent this.
|
|
508
|
-
cwe:
|
|
509
|
-
- CWE-732
|
|
510
|
-
owasp:
|
|
511
|
-
- A05:2021
|
|
512
|
-
- A06:2017
|
|
513
|
-
- A02:2025
|
|
514
|
-
references:
|
|
515
|
-
- >-
|
|
516
|
-
https://docs.docker.com/compose/compose-file/compose-file-v3/#domainname-hostname-ipc-mac_address-privileged-read_only-shm_size-stdin_open-tty-user-working_dir
|
|
517
|
-
- https://blog.atomist.com/security-of-docker-kubernetes/
|
|
518
|
-
- >-
|
|
519
|
-
https://cheatsheetseries.owasp.org/cheatsheets/Docker_Security_Cheat_Sheet.html#rule-8-set-filesystem-and-volumes-to-read-only
|
|
520
|
-
tags:
|
|
521
|
-
- docker-compose
|
|
522
|
-
- id: allowed-unsecure-commands
|
|
523
|
-
name: allowed-unsecure-commands
|
|
524
|
-
description: >-
|
|
525
|
-
The environment variable `ACTIONS_ALLOW_UNSECURE_COMMANDS` grants this workflow permissions to use the `set-env`
|
|
526
|
-
and `add-path` commands. There is a vulnerability in these commands that could result in environment variables
|
|
527
|
-
being modified by an attacker. Depending on the use of the environment variable, this could enable an attacker to,
|
|
528
|
-
at worst, modify the system path to run a different command than intended, resulting in arbitrary code execution.
|
|
529
|
-
This could result in stolen code or secrets. Don't use `ACTIONS_ALLOW_UNSECURE_COMMANDS`. Instead, use Environment
|
|
530
|
-
Files. See https://github.com/actions/toolkit/blob/main/docs/commands.md#environment-files for more information.
|
|
531
|
-
category: security
|
|
532
|
-
severity: medium
|
|
533
|
-
confidence: medium
|
|
534
|
-
languages:
|
|
535
|
-
- yaml
|
|
536
|
-
patterns:
|
|
537
|
-
- regex: .*
|
|
538
|
-
message: >-
|
|
539
|
-
The environment variable `ACTIONS_ALLOW_UNSECURE_COMMANDS` grants this workflow permissions to use the
|
|
540
|
-
`set-env` and `add-path` commands. There is a vulnerability in these commands that could result in environment
|
|
541
|
-
variables being modified by an attacker. Depending on the use of the environment variable, this could enable
|
|
542
|
-
an attacker to, at worst, modify the system path to run a different command than intended, resulting in
|
|
543
|
-
arbitrary code execution. This could result in stolen code or secrets. Don't use
|
|
544
|
-
`ACTIONS_ALLOW_UNSECURE_COMMANDS`. Instead, use Environment Files. See
|
|
545
|
-
https://github.com/actions/toolkit/blob/main/docs/commands.md#environment-files for more information.
|
|
546
|
-
cwe:
|
|
547
|
-
- CWE-749
|
|
548
|
-
owasp:
|
|
549
|
-
- A06:2017
|
|
550
|
-
references:
|
|
551
|
-
- https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
|
|
552
|
-
- https://github.com/actions/toolkit/security/advisories/GHSA-mfwh-5m23-j46w
|
|
553
|
-
- https://github.com/actions/toolkit/blob/main/docs/commands.md#environment-files
|
|
554
|
-
tags:
|
|
555
|
-
- github-actions
|
|
556
|
-
- id: third-party-action-not-pinned-to-commit-sha
|
|
557
|
-
name: third-party-action-not-pinned-to-commit-sha
|
|
558
|
-
description: >-
|
|
559
|
-
An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an
|
|
560
|
-
action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to
|
|
561
|
-
a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they
|
|
562
|
-
would need to generate a SHA-1 collision for a valid Git object payload.
|
|
563
|
-
category: security
|
|
564
|
-
severity: medium
|
|
565
|
-
confidence: medium
|
|
566
|
-
languages:
|
|
567
|
-
- yaml
|
|
568
|
-
patterns:
|
|
569
|
-
- pattern: |
|
|
570
|
-
uses: "$USES"
|
|
571
|
-
message: >-
|
|
572
|
-
An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning
|
|
573
|
-
an action to a full length commit SHA is currently the only way to use an action as an immutable release.
|
|
574
|
-
Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's
|
|
575
|
-
repository, as they would need to generate a SHA-1 collision for a valid Git object payload.
|
|
576
|
-
cwe:
|
|
577
|
-
- CWE-1357
|
|
578
|
-
- CWE-353
|
|
579
|
-
owasp:
|
|
580
|
-
- A06:2021
|
|
581
|
-
references:
|
|
582
|
-
- https://owasp.org/Top10/A06_2021-Vulnerable_and_Outdated_Components
|
|
583
|
-
- >-
|
|
584
|
-
https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-third-party-actions
|
|
585
|
-
tags:
|
|
586
|
-
- github-actions
|
|
587
|
-
- id: unsafe-add-mask-workflow-command
|
|
588
|
-
name: unsafe-add-mask-workflow-command
|
|
589
|
-
description: >-
|
|
590
|
-
GitHub Actions provides the **'add-mask'** workflow command to mask sensitive data in the workflow logs. If
|
|
591
|
-
**'add-mask'** is not used or if workflow commands have been stopped, sensitive data can leaked into the workflow
|
|
592
|
-
logs. An attacker could simply copy the workflow to another branch and add the following payload `echo
|
|
593
|
-
"::stop-commands::$stopMarker"` to stop workflow command processing ([described
|
|
594
|
-
here](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#stopping-and-starting-workflow-commands)),
|
|
595
|
-
which will cause the secret token to be exposed despite the **'add-mask'** usage. For more information, please
|
|
596
|
-
refer to the [GitHub
|
|
597
|
-
documentation](https://github.com/actions/toolkit/blob/main/docs/commands.md#register-a-secret).
|
|
598
|
-
category: security
|
|
599
|
-
severity: medium
|
|
600
|
-
confidence: medium
|
|
601
|
-
languages:
|
|
602
|
-
- yaml
|
|
603
|
-
patterns:
|
|
604
|
-
- regex: '::add-mask::'
|
|
605
|
-
message: >-
|
|
606
|
-
GitHub Actions provides the **'add-mask'** workflow command to mask sensitive data in the workflow logs. If
|
|
607
|
-
**'add-mask'** is not used or if workflow commands have been stopped, sensitive data can leaked into the
|
|
608
|
-
workflow logs. An attacker could simply copy the workflow to another branch and add the following payload
|
|
609
|
-
`echo "::stop-commands::$stopMarker"` to stop workflow command processing ([described
|
|
610
|
-
here](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#stopping-and-starting-workflow-commands)),
|
|
611
|
-
which will cause the secret token to be exposed despite the **'add-mask'** usage. For more information, please
|
|
612
|
-
refer to the [GitHub
|
|
613
|
-
documentation](https://github.com/actions/toolkit/blob/main/docs/commands.md#register-a-secret).
|
|
614
|
-
cwe:
|
|
615
|
-
- CWE-200
|
|
616
|
-
owasp:
|
|
617
|
-
- A06:2017
|
|
618
|
-
references:
|
|
619
|
-
- https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
|
|
620
|
-
- https://github.com/actions/runner/issues/159
|
|
621
|
-
- https://github.com/actions/runner/issues/475
|
|
622
|
-
- https://github.com/actions/runner/issues/807
|
|
623
|
-
- https://0xn3va.gitbook.io/cheat-sheets/ci-cd/github/actions#misuse-of-sensitive-data-in-workflows
|
|
624
|
-
- >-
|
|
625
|
-
https://github.com/github/docs/blob/main/content/actions/using-workflows/workflow-commands-for-github-actions.md#masking-a-value-in-a-log
|
|
626
|
-
tags:
|
|
627
|
-
- github-actions
|
|
628
|
-
- id: curl-eval
|
|
629
|
-
name: curl-eval
|
|
630
|
-
description: >-
|
|
631
|
-
Data is being eval'd from a `curl` command. An attacker with control of the server in the `curl` command could
|
|
632
|
-
inject malicious code into the `eval`, resulting in a system comrpomise. Avoid eval'ing untrusted data if you can.
|
|
633
|
-
If you must do this, consider checking the SHA sum of the content returned by the server to verify its integrity.
|
|
634
|
-
category: injection
|
|
635
|
-
severity: high
|
|
636
|
-
confidence: medium
|
|
637
|
-
languages:
|
|
638
|
-
- yaml
|
|
639
|
-
patterns:
|
|
640
|
-
- pattern: 'run: $SHELL'
|
|
641
|
-
message: >-
|
|
642
|
-
Data is being eval'd from a `curl` command. An attacker with control of the server in the `curl` command could
|
|
643
|
-
inject malicious code into the `eval`, resulting in a system comrpomise. Avoid eval'ing untrusted data if you
|
|
644
|
-
can. If you must do this, consider checking the SHA sum of the content returned by the server to verify its
|
|
645
|
-
integrity.
|
|
646
|
-
cwe:
|
|
647
|
-
- CWE-78
|
|
648
|
-
owasp:
|
|
649
|
-
- A01:2017
|
|
650
|
-
- A03:2021
|
|
651
|
-
- A05:2025
|
|
652
|
-
references:
|
|
653
|
-
- >-
|
|
654
|
-
https://docs.github.com/en/actions/learn-github-actions/security-hardening-for-github-actions#understanding-the-risk-of-script-injections
|
|
655
|
-
tags:
|
|
656
|
-
- github-actions
|
|
657
|
-
- bash
|
|
658
|
-
- curl
|
|
659
|
-
- id: detect-shai-hulud-backdoor
|
|
660
|
-
name: detect-shai-hulud-backdoor
|
|
661
|
-
description: The Shai-hulud backdoor creates a purposefully vulnerable github action with the name `discussion.yaml`.
|
|
662
|
-
category: security
|
|
663
|
-
severity: high
|
|
664
|
-
confidence: medium
|
|
665
|
-
languages:
|
|
666
|
-
- yaml
|
|
667
|
-
patterns:
|
|
668
|
-
- pattern: 'run: $SHELL'
|
|
669
|
-
message: The Shai-hulud backdoor creates a purposefully vulnerable github action with the name `discussion.yaml`.
|
|
670
|
-
cwe:
|
|
671
|
-
- CWE-509
|
|
672
|
-
owasp:
|
|
673
|
-
- A01:2017
|
|
674
|
-
- A03:2021
|
|
675
|
-
- A05:2025
|
|
676
|
-
references:
|
|
677
|
-
- https://www.aikido.dev/blog/shai-hulud-strikes-again-hitting-zapier-ensdomains
|
|
678
|
-
tags:
|
|
679
|
-
- github-actions
|
|
680
|
-
- id: gha-curl-pipe-shell
|
|
681
|
-
name: gha-curl-pipe-shell
|
|
682
|
-
description: >-
|
|
683
|
-
A `run:` step pipes the output of `curl` or `wget` directly into a shell interpreter. This is the "curl | bash"
|
|
684
|
-
install pattern — if the remote server is compromised or the URL is hijacked, an attacker can execute arbitrary
|
|
685
|
-
code in your CI runner. Consider downloading the file first, verifying its checksum or signature, and then
|
|
686
|
-
executing it.
|
|
687
|
-
category: security
|
|
688
|
-
severity: high
|
|
689
|
-
confidence: medium
|
|
690
|
-
languages:
|
|
691
|
-
- yaml
|
|
692
|
-
patterns:
|
|
693
|
-
- pattern: 'run: $SHELL'
|
|
694
|
-
message: >-
|
|
695
|
-
A `run:` step pipes the output of `curl` or `wget` directly into a shell interpreter. This is the "curl |
|
|
696
|
-
bash" install pattern — if the remote server is compromised or the URL is hijacked, an attacker can execute
|
|
697
|
-
arbitrary code in your CI runner. Consider downloading the file first, verifying its checksum or signature,
|
|
698
|
-
and then executing it.
|
|
699
|
-
cwe:
|
|
700
|
-
- CWE-78
|
|
701
|
-
owasp:
|
|
702
|
-
- A03:2021
|
|
703
|
-
- A03:2025
|
|
704
|
-
references:
|
|
705
|
-
- https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions
|
|
706
|
-
- https://www.idontplaydarts.com/2016/04/detecting-curl-pipe-bash-server-side/
|
|
707
|
-
tags:
|
|
708
|
-
- github-actions
|
|
709
|
-
- bash
|
|
710
|
-
- curl
|
|
711
|
-
- id: gha-workflow-env-secret
|
|
712
|
-
name: gha-workflow-env-secret
|
|
713
|
-
description: >-
|
|
714
|
-
A secret is exposed in the workflow-level `env:` block, making it available to every job and step in this workflow
|
|
715
|
-
— including any untrusted code run in pull-request workflows. Scope secrets as narrowly as possible: prefer
|
|
716
|
-
step-level `env:` so the secret is only available where it is actually needed.
|
|
717
|
-
category: secrets
|
|
718
|
-
severity: medium
|
|
719
|
-
confidence: medium
|
|
720
|
-
languages:
|
|
721
|
-
- yaml
|
|
722
|
-
patterns:
|
|
723
|
-
- regex: \$\{\{\s*secrets\.
|
|
724
|
-
message: >-
|
|
725
|
-
A secret is exposed in the workflow-level `env:` block, making it available to every job and step in this
|
|
726
|
-
workflow — including any untrusted code run in pull-request workflows. Scope secrets as narrowly as possible:
|
|
727
|
-
prefer step-level `env:` so the secret is only available where it is actually needed.
|
|
728
|
-
cwe:
|
|
729
|
-
- CWE-732
|
|
730
|
-
owasp:
|
|
731
|
-
- A01:2021
|
|
732
|
-
- A01:2025
|
|
733
|
-
references:
|
|
734
|
-
- https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-secrets
|
|
735
|
-
- >-
|
|
736
|
-
https://docs.github.com/en/actions/learn-github-actions/variables#defining-environment-variables-for-a-single-workflow
|
|
737
|
-
tags:
|
|
738
|
-
- github-actions
|
|
739
|
-
- id: github-actions-mutable-action-tag
|
|
740
|
-
name: github-actions-mutable-action-tag
|
|
741
|
-
description: >-
|
|
742
|
-
GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the
|
|
743
|
-
action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin
|
|
744
|
-
the reference to a full 40-character commit SHA instead, e.g. `uses:
|
|
745
|
-
actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608`.
|
|
746
|
-
category: security
|
|
747
|
-
severity: medium
|
|
748
|
-
confidence: medium
|
|
749
|
-
languages:
|
|
750
|
-
- yaml
|
|
751
|
-
patterns:
|
|
752
|
-
- pattern: |
|
|
753
|
-
uses: "$ACTION"
|
|
754
|
-
message: >-
|
|
755
|
-
GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by
|
|
756
|
-
the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action
|
|
757
|
-
compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses:
|
|
758
|
-
actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608`.
|
|
759
|
-
cwe:
|
|
760
|
-
- CWE-1357
|
|
761
|
-
- CWE-353
|
|
762
|
-
owasp:
|
|
763
|
-
- A08:2021
|
|
764
|
-
- A08:2025
|
|
765
|
-
references:
|
|
766
|
-
- >-
|
|
767
|
-
https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-third-party-actions
|
|
768
|
-
tags:
|
|
769
|
-
- github-actions
|
|
770
|
-
- id: github-script-injection
|
|
771
|
-
name: github-script-injection
|
|
772
|
-
description: >-
|
|
773
|
-
Using variable interpolation `${{...}}` with `github` context data in a `actions/github-script`'s `script:` step
|
|
774
|
-
could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code.
|
|
775
|
-
`github` context data can have arbitrary user input and should be treated as untrusted. Instead, use an
|
|
776
|
-
intermediate environment variable with `env:` to store the data and use the environment variable in the `run:`
|
|
777
|
-
script. Be sure to use double-quotes the environment variable, like this: "$ENVVAR".
|
|
778
|
-
category: security
|
|
779
|
-
severity: high
|
|
780
|
-
confidence: medium
|
|
781
|
-
languages:
|
|
782
|
-
- yaml
|
|
783
|
-
patterns:
|
|
784
|
-
- pattern: 'script: $SHELL'
|
|
785
|
-
message: >-
|
|
786
|
-
Using variable interpolation `${{...}}` with `github` context data in a `actions/github-script`'s `script:`
|
|
787
|
-
step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets
|
|
788
|
-
and code. `github` context data can have arbitrary user input and should be treated as untrusted. Instead, use
|
|
789
|
-
an intermediate environment variable with `env:` to store the data and use the environment variable in the
|
|
790
|
-
`run:` script. Be sure to use double-quotes the environment variable, like this: "$ENVVAR".
|
|
791
|
-
cwe:
|
|
792
|
-
- CWE-94
|
|
793
|
-
owasp:
|
|
794
|
-
- A03:2021
|
|
795
|
-
- A05:2025
|
|
796
|
-
references:
|
|
797
|
-
- >-
|
|
798
|
-
https://docs.github.com/en/actions/learn-github-actions/security-hardening-for-github-actions#understanding-the-risk-of-script-injections
|
|
799
|
-
- https://securitylab.github.com/research/github-actions-untrusted-input/
|
|
800
|
-
- https://github.com/actions/github-script
|
|
801
|
-
tags:
|
|
802
|
-
- github-actions
|
|
803
|
-
- id: pull-request-target-code-checkout
|
|
804
|
-
name: pull-request-target-code-checkout
|
|
805
|
-
description: >-
|
|
806
|
-
This GitHub Actions workflow file uses `pull_request_target` and checks out code from the incoming pull request.
|
|
807
|
-
When using `pull_request_target`, the Action runs in the context of the target repository, which includes access
|
|
808
|
-
to all repository secrets. Normally, this is safe because the Action only runs code from the target repository,
|
|
809
|
-
not the incoming PR. However, by checking out the incoming PR code, you're now using the incoming code for the
|
|
810
|
-
rest of the action. You may be inadvertently executing arbitrary code from the incoming PR with access to
|
|
811
|
-
repository secrets, which would let an attacker steal repository secrets. This normally happens by running build
|
|
812
|
-
scripts (e.g., `npm build` and `make`) or dependency installation scripts (e.g., `python setup.py install`). Audit
|
|
813
|
-
your workflow file to make sure no code from the incoming PR is executed. Please see
|
|
814
|
-
https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ for additional mitigations.
|
|
815
|
-
category: security
|
|
816
|
-
severity: high
|
|
817
|
-
confidence: medium
|
|
818
|
-
languages:
|
|
819
|
-
- yaml
|
|
820
|
-
patterns:
|
|
821
|
-
- pattern: |
|
|
822
|
-
...
|
|
823
|
-
uses: "$ACTION"
|
|
824
|
-
with:
|
|
825
|
-
...
|
|
826
|
-
ref: $EXPR
|
|
827
|
-
message: >-
|
|
828
|
-
This GitHub Actions workflow file uses `pull_request_target` and checks out code from the incoming pull
|
|
829
|
-
request. When using `pull_request_target`, the Action runs in the context of the target repository, which
|
|
830
|
-
includes access to all repository secrets. Normally, this is safe because the Action only runs code from the
|
|
831
|
-
target repository, not the incoming PR. However, by checking out the incoming PR code, you're now using the
|
|
832
|
-
incoming code for the rest of the action. You may be inadvertently executing arbitrary code from the incoming
|
|
833
|
-
PR with access to repository secrets, which would let an attacker steal repository secrets. This normally
|
|
834
|
-
happens by running build scripts (e.g., `npm build` and `make`) or dependency installation scripts (e.g.,
|
|
835
|
-
`python setup.py install`). Audit your workflow file to make sure no code from the incoming PR is executed.
|
|
836
|
-
Please see https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ for additional
|
|
837
|
-
mitigations.
|
|
838
|
-
cwe:
|
|
839
|
-
- CWE-829
|
|
840
|
-
owasp:
|
|
841
|
-
- A08:2021
|
|
842
|
-
- A08:2025
|
|
843
|
-
references:
|
|
844
|
-
- https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
|
|
845
|
-
- https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target
|
|
846
|
-
- >-
|
|
847
|
-
https://github.com/justinsteven/advisories/blob/master/2021_github_actions_checkspelling_token_leak_via_advice_symlink.md
|
|
848
|
-
tags:
|
|
849
|
-
- github-actions
|
|
850
|
-
- id: run-shell-injection
|
|
851
|
-
name: run-shell-injection
|
|
852
|
-
description: >-
|
|
853
|
-
Using variable interpolation `${{...}}` with `github` context data in a `run:` step could allow an attacker to
|
|
854
|
-
inject their own code into the runner. This would allow them to steal secrets and code. `github` context data can
|
|
855
|
-
have arbitrary user input and should be treated as untrusted. Instead, use an intermediate environment variable
|
|
856
|
-
with `env:` to store the data and use the environment variable in the `run:` script. Be sure to use double-quotes
|
|
857
|
-
the environment variable, like this: "$ENVVAR".
|
|
858
|
-
category: security
|
|
859
|
-
severity: high
|
|
860
|
-
confidence: medium
|
|
861
|
-
languages:
|
|
862
|
-
- yaml
|
|
863
|
-
patterns:
|
|
864
|
-
- pattern: 'run: $SHELL'
|
|
865
|
-
message: >-
|
|
866
|
-
Using variable interpolation `${{...}}` with `github` context data in a `run:` step could allow an attacker to
|
|
867
|
-
inject their own code into the runner. This would allow them to steal secrets and code. `github` context data
|
|
868
|
-
can have arbitrary user input and should be treated as untrusted. Instead, use an intermediate environment
|
|
869
|
-
variable with `env:` to store the data and use the environment variable in the `run:` script. Be sure to use
|
|
870
|
-
double-quotes the environment variable, like this: "$ENVVAR".
|
|
871
|
-
cwe:
|
|
872
|
-
- CWE-78
|
|
873
|
-
owasp:
|
|
874
|
-
- A01:2017
|
|
875
|
-
- A03:2021
|
|
876
|
-
- A05:2025
|
|
877
|
-
references:
|
|
878
|
-
- >-
|
|
879
|
-
https://docs.github.com/en/actions/learn-github-actions/security-hardening-for-github-actions#understanding-the-risk-of-script-injections
|
|
880
|
-
- https://securitylab.github.com/research/github-actions-untrusted-input/
|
|
881
|
-
tags:
|
|
882
|
-
- github-actions
|
|
883
|
-
- id: secrets-inherit
|
|
884
|
-
name: secrets-inherit
|
|
885
|
-
description: >-
|
|
886
|
-
This workflow uses `secrets: inherit` to pass all of the calling workflow's secrets to a reusable workflow. This
|
|
887
|
-
violates the principle of least privilege because the called workflow receives access to every secret in the
|
|
888
|
-
repository, not just the ones it needs. If the called workflow is compromised or sourced from a third party, an
|
|
889
|
-
attacker gains access to all repository secrets. Instead, explicitly pass only the secrets that the called
|
|
890
|
-
workflow requires using the `secrets:` map, e.g. `secrets: { MY_SECRET: ${{ secrets.MY_SECRET }} }`.
|
|
891
|
-
category: secrets
|
|
892
|
-
severity: high
|
|
893
|
-
confidence: medium
|
|
894
|
-
languages:
|
|
895
|
-
- yaml
|
|
896
|
-
patterns:
|
|
897
|
-
- pattern: 'secrets: inherit'
|
|
898
|
-
message: >-
|
|
899
|
-
This workflow uses `secrets: inherit` to pass all of the calling workflow's secrets to a reusable workflow.
|
|
900
|
-
This violates the principle of least privilege because the called workflow receives access to every secret in
|
|
901
|
-
the repository, not just the ones it needs. If the called workflow is compromised or sourced from a third
|
|
902
|
-
party, an attacker gains access to all repository secrets. Instead, explicitly pass only the secrets that the
|
|
903
|
-
called workflow requires using the `secrets:` map, e.g. `secrets: { MY_SECRET: ${{ secrets.MY_SECRET }} }`.
|
|
904
|
-
cwe:
|
|
905
|
-
- CWE-250
|
|
906
|
-
owasp:
|
|
907
|
-
- A01:2021
|
|
908
|
-
- A01:2025
|
|
909
|
-
references:
|
|
910
|
-
- >-
|
|
911
|
-
https://docs.github.com/en/actions/sharing-automations/reusing-workflows#passing-inputs-and-secrets-to-a-reusable-workflow
|
|
912
|
-
- >-
|
|
913
|
-
https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions
|
|
914
|
-
tags:
|
|
915
|
-
- github-actions
|
|
916
|
-
- id: workflow-run-target-code-checkout
|
|
917
|
-
name: workflow-run-target-code-checkout
|
|
918
|
-
description: >-
|
|
919
|
-
This GitHub Actions workflow file uses `workflow_run` and checks out code from the incoming pull request. When
|
|
920
|
-
using `workflow_run`, the Action runs in the context of the target repository, which includes access to all
|
|
921
|
-
repository secrets. Normally, this is safe because the Action only runs code from the target repository, not the
|
|
922
|
-
incoming PR. However, by checking out the incoming PR code, you're now using the incoming code for the rest of the
|
|
923
|
-
action. You may be inadvertently executing arbitrary code from the incoming PR with access to repository secrets,
|
|
924
|
-
which would let an attacker steal repository secrets. This normally happens by running build scripts (e.g., `npm
|
|
925
|
-
build` and `make`) or dependency installation scripts (e.g., `python setup.py install`). Audit your workflow file
|
|
926
|
-
to make sure no code from the incoming PR is executed. Please see
|
|
927
|
-
https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ for additional mitigations.
|
|
928
|
-
category: security
|
|
929
|
-
severity: medium
|
|
930
|
-
confidence: medium
|
|
931
|
-
languages:
|
|
932
|
-
- yaml
|
|
933
|
-
patterns:
|
|
934
|
-
- pattern: |
|
|
935
|
-
...
|
|
936
|
-
uses: "$ACTION"
|
|
937
|
-
with:
|
|
938
|
-
...
|
|
939
|
-
ref: $EXPR
|
|
940
|
-
message: >-
|
|
941
|
-
This GitHub Actions workflow file uses `workflow_run` and checks out code from the incoming pull request. When
|
|
942
|
-
using `workflow_run`, the Action runs in the context of the target repository, which includes access to all
|
|
943
|
-
repository secrets. Normally, this is safe because the Action only runs code from the target repository, not
|
|
944
|
-
the incoming PR. However, by checking out the incoming PR code, you're now using the incoming code for the
|
|
945
|
-
rest of the action. You may be inadvertently executing arbitrary code from the incoming PR with access to
|
|
946
|
-
repository secrets, which would let an attacker steal repository secrets. This normally happens by running
|
|
947
|
-
build scripts (e.g., `npm build` and `make`) or dependency installation scripts (e.g., `python setup.py
|
|
948
|
-
install`). Audit your workflow file to make sure no code from the incoming PR is executed. Please see
|
|
949
|
-
https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ for additional mitigations.
|
|
950
|
-
cwe:
|
|
951
|
-
- CWE-913
|
|
952
|
-
owasp:
|
|
953
|
-
- A01:2017
|
|
954
|
-
references:
|
|
955
|
-
- https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
|
|
956
|
-
- >-
|
|
957
|
-
https://github.com/justinsteven/advisories/blob/master/2021_github_actions_checkspelling_token_leak_via_advice_symlink.md
|
|
958
|
-
- https://www.legitsecurity.com/blog/github-privilege-escalation-vulnerability
|
|
959
|
-
tags:
|
|
960
|
-
- github-actions
|
|
961
|
-
- id: semgrep-github-action-push-without-branches
|
|
962
|
-
name: semgrep-github-action-push-without-branches
|
|
963
|
-
description: >-
|
|
964
|
-
The 'branches' field (in the push event configuration) contains no branches. This causes all branches to be
|
|
965
|
-
scanned and may result in unneccessary duplicate findings across the entire codebase.
|
|
966
|
-
category: security
|
|
967
|
-
severity: medium
|
|
968
|
-
confidence: medium
|
|
969
|
-
languages:
|
|
970
|
-
- yaml
|
|
971
|
-
patterns:
|
|
972
|
-
- regex: .*
|
|
973
|
-
message: >-
|
|
974
|
-
The 'branches' field (in the push event configuration) contains no branches. This causes all branches to be
|
|
975
|
-
scanned and may result in unneccessary duplicate findings across the entire codebase.
|
|
976
|
-
cwe: []
|
|
977
|
-
owasp: []
|
|
978
|
-
references: []
|
|
979
|
-
tags:
|
|
980
|
-
- github-action
|
|
981
|
-
- id: changes-with-when-never
|
|
982
|
-
name: changes-with-when-never
|
|
983
|
-
description: >-
|
|
984
|
-
This Gitlab CI YAML will never run on default branches due to a `changes` rule with `when:never`. To fix this,
|
|
985
|
-
make sure the triggering event is a push event. You can do this with `if: '$CI_PIPELINE_SOURCE == "push"'`. See
|
|
986
|
-
https://docs.gitlab.com/ee/ci/yaml/index.html#ruleschanges
|
|
987
|
-
category: security
|
|
988
|
-
severity: medium
|
|
989
|
-
confidence: medium
|
|
990
|
-
languages:
|
|
991
|
-
- yaml
|
|
992
|
-
patterns:
|
|
993
|
-
- pattern: |
|
|
994
|
-
- changes:
|
|
995
|
-
- ...
|
|
996
|
-
when: never
|
|
997
|
-
message: >-
|
|
998
|
-
This Gitlab CI YAML will never run on default branches due to a `changes` rule with `when:never`. To fix this,
|
|
999
|
-
make sure the triggering event is a push event. You can do this with `if: '$CI_PIPELINE_SOURCE == "push"'`.
|
|
1000
|
-
See https://docs.gitlab.com/ee/ci/yaml/index.html#ruleschanges
|
|
1001
|
-
cwe: []
|
|
1002
|
-
owasp: []
|
|
1003
|
-
references: []
|
|
1004
|
-
tags:
|
|
1005
|
-
- gitlab
|
|
1006
|
-
- gitlab-ci
|
|
1007
|
-
- id: no-fractional-cpu-limits
|
|
1008
|
-
name: no-fractional-cpu-limits
|
|
1009
|
-
description: >-
|
|
1010
|
-
When you set a fractional CPU limit on a container, the CPU cycles available will be throttled, even though most
|
|
1011
|
-
nodes can handle processes alternating between using 100% of the CPU.
|
|
1012
|
-
category: security
|
|
1013
|
-
severity: medium
|
|
1014
|
-
confidence: medium
|
|
1015
|
-
languages:
|
|
1016
|
-
- yaml
|
|
1017
|
-
patterns:
|
|
1018
|
-
- pattern: |
|
|
1019
|
-
cpu: $CPU_LIMIT
|
|
1020
|
-
message: >-
|
|
1021
|
-
When you set a fractional CPU limit on a container, the CPU cycles available will be throttled, even though
|
|
1022
|
-
most nodes can handle processes alternating between using 100% of the CPU.
|
|
1023
|
-
cwe: []
|
|
1024
|
-
owasp: []
|
|
1025
|
-
references: []
|
|
1026
|
-
tags:
|
|
1027
|
-
- kubernetes
|
|
1028
|
-
- id: allow-privilege-escalation-no-securitycontext
|
|
1029
|
-
name: allow-privilege-escalation-no-securitycontext
|
|
1030
|
-
description: >-
|
|
1031
|
-
In Kubernetes, each pod runs in its own isolated environment with its own set of security policies. However,
|
|
1032
|
-
certain container images may contain `setuid` or `setgid` binaries that could allow an attacker to perform
|
|
1033
|
-
privilege escalation and gain access to sensitive resources. To mitigate this risk, it's recommended to add a
|
|
1034
|
-
`securityContext` to the container in the pod, with the parameter `allowPrivilegeEscalation` set to `false`. This
|
|
1035
|
-
will prevent the container from running any privileged processes and limit the impact of any potential attacks. By
|
|
1036
|
-
adding a `securityContext` to your Kubernetes pod, you can help to ensure that your containerized applications are
|
|
1037
|
-
more secure and less vulnerable to privilege escalation attacks.
|
|
1038
|
-
category: security
|
|
1039
|
-
severity: medium
|
|
1040
|
-
confidence: medium
|
|
1041
|
-
languages:
|
|
1042
|
-
- yaml
|
|
1043
|
-
patterns:
|
|
1044
|
-
- pattern: |
|
|
1045
|
-
image: ...
|
|
1046
|
-
...
|
|
1047
|
-
message: >-
|
|
1048
|
-
In Kubernetes, each pod runs in its own isolated environment with its own set of security policies. However,
|
|
1049
|
-
certain container images may contain `setuid` or `setgid` binaries that could allow an attacker to perform
|
|
1050
|
-
privilege escalation and gain access to sensitive resources. To mitigate this risk, it's recommended to add a
|
|
1051
|
-
`securityContext` to the container in the pod, with the parameter `allowPrivilegeEscalation` set to `false`.
|
|
1052
|
-
This will prevent the container from running any privileged processes and limit the impact of any potential
|
|
1053
|
-
attacks. By adding a `securityContext` to your Kubernetes pod, you can help to ensure that your containerized
|
|
1054
|
-
applications are more secure and less vulnerable to privilege escalation attacks.
|
|
1055
|
-
cwe:
|
|
1056
|
-
- CWE-732
|
|
1057
|
-
owasp:
|
|
1058
|
-
- A05:2021
|
|
1059
|
-
- A06:2017
|
|
1060
|
-
- A02:2025
|
|
1061
|
-
references:
|
|
1062
|
-
- https://kubernetes.io/docs/concepts/policy/pod-security-policy/#privilege-escalation
|
|
1063
|
-
- https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
|
1064
|
-
- https://www.kernel.org/doc/Documentation/prctl/no_new_privs.txt
|
|
1065
|
-
- >-
|
|
1066
|
-
https://cheatsheetseries.owasp.org/cheatsheets/Docker_Security_Cheat_Sheet.html#rule-4-add-no-new-privileges-flag
|
|
1067
|
-
tags:
|
|
1068
|
-
- kubernetes
|
|
1069
|
-
- id: allow-privilege-escalation-true
|
|
1070
|
-
name: allow-privilege-escalation-true
|
|
1071
|
-
description: >-
|
|
1072
|
-
In Kubernetes, each pod runs in its own isolated environment with its own set of security policies. However,
|
|
1073
|
-
certain container images may contain `setuid` or `setgid` binaries that could allow an attacker to perform
|
|
1074
|
-
privilege escalation and gain access to sensitive resources. To mitigate this risk, it's recommended to add a
|
|
1075
|
-
`securityContext` to the container in the pod, with the parameter `allowPrivilegeEscalation` set to `false`.
|
|
1076
|
-
This will prevent the container from running any privileged processes and limit the impact of any potential
|
|
1077
|
-
attacks. In the container `$CONTAINER` this parameter is set to `true` which makes this container much more
|
|
1078
|
-
vulnerable to privelege escalation attacks.
|
|
1079
|
-
category: security
|
|
1080
|
-
severity: medium
|
|
1081
|
-
confidence: medium
|
|
1082
|
-
languages:
|
|
1083
|
-
- yaml
|
|
1084
|
-
patterns:
|
|
1085
|
-
- pattern: |
|
|
1086
|
-
allowPrivilegeEscalation: $TRUE
|
|
1087
|
-
message: >-
|
|
1088
|
-
In Kubernetes, each pod runs in its own isolated environment with its own set of security policies. However,
|
|
1089
|
-
certain container images may contain `setuid` or `setgid` binaries that could allow an attacker to perform
|
|
1090
|
-
privilege escalation and gain access to sensitive resources. To mitigate this risk, it's recommended to add a
|
|
1091
|
-
`securityContext` to the container in the pod, with the parameter `allowPrivilegeEscalation` set to `false`.
|
|
1092
|
-
This will prevent the container from running any privileged processes and limit the impact of any potential
|
|
1093
|
-
attacks. In the container `$CONTAINER` this parameter is set to `true` which makes this container much more
|
|
1094
|
-
vulnerable to privelege escalation attacks.
|
|
1095
|
-
cwe:
|
|
1096
|
-
- CWE-732
|
|
1097
|
-
owasp:
|
|
1098
|
-
- A05:2021
|
|
1099
|
-
- A06:2017
|
|
1100
|
-
- A02:2025
|
|
1101
|
-
references:
|
|
1102
|
-
- https://kubernetes.io/docs/concepts/policy/pod-security-policy/#privilege-escalation
|
|
1103
|
-
- https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
|
1104
|
-
- https://www.kernel.org/doc/Documentation/prctl/no_new_privs.txt
|
|
1105
|
-
- >-
|
|
1106
|
-
https://cheatsheetseries.owasp.org/cheatsheets/Docker_Security_Cheat_Sheet.html#rule-4-add-no-new-privileges-flag
|
|
1107
|
-
tags:
|
|
1108
|
-
- kubernetes
|
|
1109
|
-
- id: allow-privilege-escalation
|
|
1110
|
-
name: allow-privilege-escalation
|
|
1111
|
-
description: >-
|
|
1112
|
-
In Kubernetes, each pod runs in its own isolated environment with its own set of security policies. However,
|
|
1113
|
-
certain container images may contain `setuid` or `setgid` binaries that could allow an attacker to perform
|
|
1114
|
-
privilege escalation and gain access to sensitive resources. To mitigate this risk, it's recommended to add a
|
|
1115
|
-
`securityContext` to the container in the pod, with the parameter `allowPrivilegeEscalation` set to `false`. This
|
|
1116
|
-
will prevent the container from running any privileged processes and limit the impact of any potential attacks. By
|
|
1117
|
-
adding the `allowPrivilegeEscalation` parameter to your the `securityContext`, you can help to ensure that your
|
|
1118
|
-
containerized applications are more secure and less vulnerable to privilege escalation attacks.
|
|
1119
|
-
category: security
|
|
1120
|
-
severity: medium
|
|
1121
|
-
confidence: medium
|
|
1122
|
-
languages:
|
|
1123
|
-
- yaml
|
|
1124
|
-
patterns:
|
|
1125
|
-
- pattern: |
|
|
1126
|
-
image: ...
|
|
1127
|
-
...
|
|
1128
|
-
message: >-
|
|
1129
|
-
In Kubernetes, each pod runs in its own isolated environment with its own set of security policies. However,
|
|
1130
|
-
certain container images may contain `setuid` or `setgid` binaries that could allow an attacker to perform
|
|
1131
|
-
privilege escalation and gain access to sensitive resources. To mitigate this risk, it's recommended to add a
|
|
1132
|
-
`securityContext` to the container in the pod, with the parameter `allowPrivilegeEscalation` set to `false`.
|
|
1133
|
-
This will prevent the container from running any privileged processes and limit the impact of any potential
|
|
1134
|
-
attacks. By adding the `allowPrivilegeEscalation` parameter to your the `securityContext`, you can help to
|
|
1135
|
-
ensure that your containerized applications are more secure and less vulnerable to privilege escalation
|
|
1136
|
-
attacks.
|
|
1137
|
-
cwe:
|
|
1138
|
-
- CWE-732
|
|
1139
|
-
owasp:
|
|
1140
|
-
- A05:2021
|
|
1141
|
-
- A06:2017
|
|
1142
|
-
- A02:2025
|
|
1143
|
-
references:
|
|
1144
|
-
- https://kubernetes.io/docs/concepts/policy/pod-security-policy/#privilege-escalation
|
|
1145
|
-
- https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
|
1146
|
-
- https://www.kernel.org/doc/Documentation/prctl/no_new_privs.txt
|
|
1147
|
-
- >-
|
|
1148
|
-
https://cheatsheetseries.owasp.org/cheatsheets/Docker_Security_Cheat_Sheet.html#rule-4-add-no-new-privileges-flag
|
|
1149
|
-
tags:
|
|
1150
|
-
- kubernetes
|
|
1151
|
-
- id: flask-debugging-enabled
|
|
1152
|
-
name: flask-debugging-enabled
|
|
1153
|
-
description: Do not set FLASK_ENV to "development" since that sets `debug=True` in Flask. Use "dev" or a similar term instead.
|
|
1154
|
-
category: security
|
|
1155
|
-
severity: medium
|
|
1156
|
-
confidence: medium
|
|
1157
|
-
languages:
|
|
1158
|
-
- yaml
|
|
1159
|
-
patterns:
|
|
1160
|
-
- pattern: |
|
|
1161
|
-
{name: FLASK_ENV, value: "development"}
|
|
1162
|
-
message: >-
|
|
1163
|
-
Do not set FLASK_ENV to "development" since that sets `debug=True` in Flask. Use "dev" or a similar term
|
|
1164
|
-
instead.
|
|
1165
|
-
cwe:
|
|
1166
|
-
- CWE-489
|
|
1167
|
-
owasp:
|
|
1168
|
-
- A06:2017
|
|
1169
|
-
references:
|
|
1170
|
-
- https://flask.palletsprojects.com/en/2.0.x/debugging/
|
|
1171
|
-
- https://flask.palletsprojects.com/en/2.0.x/config/#ENV
|
|
1172
|
-
tags:
|
|
1173
|
-
- kubernetes
|
|
1174
|
-
- flask
|
|
1175
|
-
- id: exposing-docker-socket-hostpath
|
|
1176
|
-
name: exposing-docker-socket-hostpath
|
|
1177
|
-
description: >-
|
|
1178
|
-
Exposing host's Docker socket to containers via a volume. The owner of this socket is root. Giving someone access
|
|
1179
|
-
to it is equivalent to giving unrestricted root access to your host. Remove 'docker.sock' from hostpath to prevent
|
|
1180
|
-
this.
|
|
1181
|
-
category: file-ops
|
|
1182
|
-
severity: medium
|
|
1183
|
-
confidence: medium
|
|
1184
|
-
languages:
|
|
1185
|
-
- yaml
|
|
1186
|
-
patterns:
|
|
1187
|
-
- pattern: |
|
|
1188
|
-
hostPath:
|
|
1189
|
-
...
|
|
1190
|
-
path: /var/run/docker.sock
|
|
1191
|
-
message: >-
|
|
1192
|
-
Exposing host's Docker socket to containers via a volume. The owner of this socket is root. Giving someone
|
|
1193
|
-
access to it is equivalent to giving unrestricted root access to your host. Remove 'docker.sock' from hostpath
|
|
1194
|
-
to prevent this.
|
|
1195
|
-
cwe:
|
|
1196
|
-
- CWE-250
|
|
1197
|
-
owasp: []
|
|
1198
|
-
references:
|
|
1199
|
-
- https://kubernetes.io/docs/concepts/storage/volumes/#hostpath
|
|
1200
|
-
- https://kubernetes.io/docs/concepts/policy/pod-security-policy/#volumes-and-file-systems
|
|
1201
|
-
- https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
|
1202
|
-
- >-
|
|
1203
|
-
https://cheatsheetseries.owasp.org/cheatsheets/Docker_Security_Cheat_Sheet.html#rule-1-do-not-expose-the-docker-daemon-socket-even-to-the-containers
|
|
1204
|
-
tags:
|
|
1205
|
-
- kubernetes
|
|
1206
|
-
- id: hostipc-pod
|
|
1207
|
-
name: hostipc-pod
|
|
1208
|
-
description: >-
|
|
1209
|
-
Pod is sharing the host IPC namespace. This allows container processes to communicate with processes on the host
|
|
1210
|
-
which reduces isolation and bypasses container protection models. Remove the 'hostIPC' key to disable this
|
|
1211
|
-
functionality.
|
|
1212
|
-
category: security
|
|
1213
|
-
severity: medium
|
|
1214
|
-
confidence: medium
|
|
1215
|
-
languages:
|
|
1216
|
-
- yaml
|
|
1217
|
-
patterns:
|
|
1218
|
-
- pattern: |
|
|
1219
|
-
hostIPC: true
|
|
1220
|
-
message: >-
|
|
1221
|
-
Pod is sharing the host IPC namespace. This allows container processes to communicate with processes on the
|
|
1222
|
-
host which reduces isolation and bypasses container protection models. Remove the 'hostIPC' key to disable
|
|
1223
|
-
this functionality.
|
|
1224
|
-
cwe:
|
|
1225
|
-
- CWE-693
|
|
1226
|
-
owasp: []
|
|
1227
|
-
references:
|
|
1228
|
-
- https://kubernetes.io/docs/concepts/policy/pod-security-policy/#host-namespaces
|
|
1229
|
-
tags:
|
|
1230
|
-
- kubernetes
|
|
1231
|
-
- id: hostnetwork-pod
|
|
1232
|
-
name: hostnetwork-pod
|
|
1233
|
-
description: >-
|
|
1234
|
-
Pod may use the node network namespace. This gives the pod access to the loopback device, services listening on
|
|
1235
|
-
localhost, and could be used to snoop on network activity of other pods on the same node. Remove the 'hostNetwork'
|
|
1236
|
-
key to disable this functionality.
|
|
1237
|
-
category: security
|
|
1238
|
-
severity: medium
|
|
1239
|
-
confidence: medium
|
|
1240
|
-
languages:
|
|
1241
|
-
- yaml
|
|
1242
|
-
patterns:
|
|
1243
|
-
- pattern: |
|
|
1244
|
-
hostNetwork: true
|
|
1245
|
-
message: >-
|
|
1246
|
-
Pod may use the node network namespace. This gives the pod access to the loopback device, services listening
|
|
1247
|
-
on localhost, and could be used to snoop on network activity of other pods on the same node. Remove the
|
|
1248
|
-
'hostNetwork' key to disable this functionality.
|
|
1249
|
-
cwe:
|
|
1250
|
-
- CWE-406
|
|
1251
|
-
owasp: []
|
|
1252
|
-
references:
|
|
1253
|
-
- https://kubernetes.io/docs/concepts/policy/pod-security-policy/#host-namespaces
|
|
1254
|
-
tags:
|
|
1255
|
-
- kubernetes
|
|
1256
|
-
- id: hostpid-pod
|
|
1257
|
-
name: hostpid-pod
|
|
1258
|
-
description: >-
|
|
1259
|
-
Pod is sharing the host process ID namespace. When paired with ptrace this can be used to escalate privileges
|
|
1260
|
-
outside of the container. Remove the 'hostPID' key to disable this functionality.
|
|
1261
|
-
category: security
|
|
1262
|
-
severity: medium
|
|
1263
|
-
confidence: medium
|
|
1264
|
-
languages:
|
|
1265
|
-
- yaml
|
|
1266
|
-
patterns:
|
|
1267
|
-
- pattern: |
|
|
1268
|
-
hostPID: true
|
|
1269
|
-
message: >-
|
|
1270
|
-
Pod is sharing the host process ID namespace. When paired with ptrace this can be used to escalate privileges
|
|
1271
|
-
outside of the container. Remove the 'hostPID' key to disable this functionality.
|
|
1272
|
-
cwe:
|
|
1273
|
-
- CWE-269
|
|
1274
|
-
owasp:
|
|
1275
|
-
- A04:2021
|
|
1276
|
-
- A06:2025
|
|
1277
|
-
references:
|
|
1278
|
-
- https://kubernetes.io/docs/concepts/policy/pod-security-policy/#host-namespaces
|
|
1279
|
-
tags:
|
|
1280
|
-
- kubernetes
|
|
1281
|
-
- id: legacy-api-clusterrole-excessive-permissions
|
|
1282
|
-
name: legacy-api-clusterrole-excessive-permissions
|
|
1283
|
-
description: >-
|
|
1284
|
-
Semgrep detected a Kubernetes core API ClusterRole with excessive permissions. Attaching excessive permissions to
|
|
1285
|
-
a ClusterRole associated with the core namespace allows the V1 API to perform arbitrary actions on arbitrary
|
|
1286
|
-
resources attached to the cluster. Prefer explicit allowlists of verbs/resources when configuring the core API
|
|
1287
|
-
namespace.
|
|
1288
|
-
category: security
|
|
1289
|
-
severity: medium
|
|
1290
|
-
confidence: medium
|
|
1291
|
-
languages:
|
|
1292
|
-
- yaml
|
|
1293
|
-
patterns:
|
|
1294
|
-
- pattern: |
|
|
1295
|
-
"*"
|
|
1296
|
-
message: >-
|
|
1297
|
-
Semgrep detected a Kubernetes core API ClusterRole with excessive permissions. Attaching excessive permissions
|
|
1298
|
-
to a ClusterRole associated with the core namespace allows the V1 API to perform arbitrary actions on
|
|
1299
|
-
arbitrary resources attached to the cluster. Prefer explicit allowlists of verbs/resources when configuring
|
|
1300
|
-
the core API namespace.
|
|
1301
|
-
cwe:
|
|
1302
|
-
- CWE-269
|
|
1303
|
-
owasp:
|
|
1304
|
-
- A05:2021
|
|
1305
|
-
- A06:2017
|
|
1306
|
-
- A02:2025
|
|
1307
|
-
references:
|
|
1308
|
-
- https://kubernetes.io/docs/reference/access-authn-authz/rbac/#role-and-clusterrole
|
|
1309
|
-
- https://kubernetes.io/docs/concepts/security/rbac-good-practices/#general-good-practice
|
|
1310
|
-
- https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#api-groups
|
|
1311
|
-
tags:
|
|
1312
|
-
- kubernetes
|
|
1313
|
-
- id: privileged-container
|
|
1314
|
-
name: privileged-container
|
|
1315
|
-
description: >-
|
|
1316
|
-
Container or pod is running in privileged mode. This grants the container the equivalent of root capabilities on
|
|
1317
|
-
the host machine. This can lead to container escapes, privilege escalation, and other security concerns. Remove
|
|
1318
|
-
the 'privileged' key to disable this capability.
|
|
1319
|
-
category: security
|
|
1320
|
-
severity: medium
|
|
1321
|
-
confidence: medium
|
|
1322
|
-
languages:
|
|
1323
|
-
- yaml
|
|
1324
|
-
patterns:
|
|
1325
|
-
- regex: .*
|
|
1326
|
-
message: >-
|
|
1327
|
-
Container or pod is running in privileged mode. This grants the container the equivalent of root capabilities
|
|
1328
|
-
on the host machine. This can lead to container escapes, privilege escalation, and other security concerns.
|
|
1329
|
-
Remove the 'privileged' key to disable this capability.
|
|
1330
|
-
cwe:
|
|
1331
|
-
- CWE-250
|
|
1332
|
-
owasp: []
|
|
1333
|
-
references:
|
|
1334
|
-
- https://kubernetes.io/docs/concepts/policy/pod-security-policy/#privileged
|
|
1335
|
-
- https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
|
1336
|
-
- https://cheatsheetseries.owasp.org/cheatsheets/Docker_Security_Cheat_Sheet.html
|
|
1337
|
-
tags:
|
|
1338
|
-
- kubernetes
|
|
1339
|
-
- id: run-as-non-root-container-level-missing-security-context
|
|
1340
|
-
name: run-as-non-root-container-level-missing-security-context
|
|
1341
|
-
description: >-
|
|
1342
|
-
When running containers in Kubernetes, it's important to ensure that they are properly secured to prevent
|
|
1343
|
-
privilege escalation attacks. One potential vulnerability is when a container is allowed to run applications as
|
|
1344
|
-
the root user, which could allow an attacker to gain access to sensitive resources. To mitigate this risk, it's
|
|
1345
|
-
recommended to add a `securityContext` to the container, with the parameter `runAsNonRoot` set to `true`. This
|
|
1346
|
-
will ensure that the container runs as a non-root user, limiting the damage that could be caused by any potential
|
|
1347
|
-
attacks. By adding a `securityContext` to the container in your Kubernetes pod, you can help to ensure that your
|
|
1348
|
-
containerized applications are more secure and less vulnerable to privilege escalation attacks.
|
|
1349
|
-
category: security
|
|
1350
|
-
severity: low
|
|
1351
|
-
confidence: medium
|
|
1352
|
-
languages:
|
|
1353
|
-
- yaml
|
|
1354
|
-
patterns:
|
|
1355
|
-
- pattern: |
|
|
1356
|
-
- name: $CONTAINER
|
|
1357
|
-
$IMAGE: $IMAGEVAL
|
|
1358
|
-
...
|
|
1359
|
-
message: >-
|
|
1360
|
-
When running containers in Kubernetes, it's important to ensure that they are properly secured to prevent
|
|
1361
|
-
privilege escalation attacks. One potential vulnerability is when a container is allowed to run applications
|
|
1362
|
-
as the root user, which could allow an attacker to gain access to sensitive resources. To mitigate this risk,
|
|
1363
|
-
it's recommended to add a `securityContext` to the container, with the parameter `runAsNonRoot` set to `true`.
|
|
1364
|
-
This will ensure that the container runs as a non-root user, limiting the damage that could be caused by any
|
|
1365
|
-
potential attacks. By adding a `securityContext` to the container in your Kubernetes pod, you can help to
|
|
1366
|
-
ensure that your containerized applications are more secure and less vulnerable to privilege escalation
|
|
1367
|
-
attacks.
|
|
1368
|
-
cwe:
|
|
1369
|
-
- CWE-250
|
|
1370
|
-
owasp:
|
|
1371
|
-
- A05:2021
|
|
1372
|
-
- A06:2017
|
|
1373
|
-
- A02:2025
|
|
1374
|
-
references:
|
|
1375
|
-
- https://kubernetes.io/blog/2016/08/security-best-practices-kubernetes-deployment/
|
|
1376
|
-
- https://kubernetes.io/docs/concepts/policy/pod-security-policy/
|
|
1377
|
-
- https://cheatsheetseries.owasp.org/cheatsheets/Docker_Security_Cheat_Sheet.html#rule-2-set-a-user
|
|
1378
|
-
tags:
|
|
1379
|
-
- kubernetes
|
|
1380
|
-
- id: run-as-non-root-container-level
|
|
1381
|
-
name: run-as-non-root-container-level
|
|
1382
|
-
description: >-
|
|
1383
|
-
When running containers in Kubernetes, it's important to ensure that they are properly secured to prevent
|
|
1384
|
-
privilege escalation attacks. One potential vulnerability is when a container is allowed to run applications as
|
|
1385
|
-
the root user, which could allow an attacker to gain access to sensitive resources. To mitigate this risk, it's
|
|
1386
|
-
recommended to add a `securityContext` to the container, with the parameter `runAsNonRoot` set to `true`. This
|
|
1387
|
-
will ensure that the container runs as a non-root user, limiting the damage that could be caused by any potential
|
|
1388
|
-
attacks. By adding a `securityContext` to the container in your Kubernetes pod, you can help to ensure that your
|
|
1389
|
-
containerized applications are more secure and less vulnerable to privilege escalation attacks.
|
|
1390
|
-
category: security
|
|
1391
|
-
severity: low
|
|
1392
|
-
confidence: medium
|
|
1393
|
-
languages:
|
|
1394
|
-
- yaml
|
|
1395
|
-
patterns:
|
|
1396
|
-
- pattern: |
|
|
1397
|
-
- name: $CONTAINER
|
|
1398
|
-
image: ...
|
|
1399
|
-
...
|
|
1400
|
-
$SC:
|
|
1401
|
-
...
|
|
1402
|
-
message: >-
|
|
1403
|
-
When running containers in Kubernetes, it's important to ensure that they are properly secured to prevent
|
|
1404
|
-
privilege escalation attacks. One potential vulnerability is when a container is allowed to run applications
|
|
1405
|
-
as the root user, which could allow an attacker to gain access to sensitive resources. To mitigate this risk,
|
|
1406
|
-
it's recommended to add a `securityContext` to the container, with the parameter `runAsNonRoot` set to `true`.
|
|
1407
|
-
This will ensure that the container runs as a non-root user, limiting the damage that could be caused by any
|
|
1408
|
-
potential attacks. By adding a `securityContext` to the container in your Kubernetes pod, you can help to
|
|
1409
|
-
ensure that your containerized applications are more secure and less vulnerable to privilege escalation
|
|
1410
|
-
attacks.
|
|
1411
|
-
cwe:
|
|
1412
|
-
- CWE-250
|
|
1413
|
-
owasp:
|
|
1414
|
-
- A05:2021
|
|
1415
|
-
- A06:2017
|
|
1416
|
-
- A02:2025
|
|
1417
|
-
references:
|
|
1418
|
-
- https://kubernetes.io/blog/2016/08/security-best-practices-kubernetes-deployment/
|
|
1419
|
-
- https://kubernetes.io/docs/concepts/policy/pod-security-policy/
|
|
1420
|
-
- https://cheatsheetseries.owasp.org/cheatsheets/Docker_Security_Cheat_Sheet.html#rule-2-set-a-user
|
|
1421
|
-
tags:
|
|
1422
|
-
- kubernetes
|
|
1423
|
-
- id: run-as-non-root-security-context-pod-level
|
|
1424
|
-
name: run-as-non-root-security-context-pod-level
|
|
1425
|
-
description: >-
|
|
1426
|
-
When running containers in Kubernetes, it's important to ensure that they are properly secured to prevent
|
|
1427
|
-
privilege escalation attacks. One potential vulnerability is when a container is allowed to run applications as
|
|
1428
|
-
the root user, which could allow an attacker to gain access to sensitive resources. To mitigate this risk, it's
|
|
1429
|
-
recommended to add a `securityContext` to the container, with the parameter `runAsNonRoot` set to `true`. This
|
|
1430
|
-
will ensure that the container runs as a non-root user, limiting the damage that could be caused by any potential
|
|
1431
|
-
attacks. By adding a `securityContext` to the container in your Kubernetes pod, you can help to ensure that your
|
|
1432
|
-
containerized applications are more secure and less vulnerable to privilege escalation attacks.
|
|
1433
|
-
category: security
|
|
1434
|
-
severity: low
|
|
1435
|
-
confidence: medium
|
|
1436
|
-
languages:
|
|
1437
|
-
- yaml
|
|
1438
|
-
patterns:
|
|
1439
|
-
- regex: .*
|
|
1440
|
-
message: >-
|
|
1441
|
-
When running containers in Kubernetes, it's important to ensure that they are properly secured to prevent
|
|
1442
|
-
privilege escalation attacks. One potential vulnerability is when a container is allowed to run applications
|
|
1443
|
-
as the root user, which could allow an attacker to gain access to sensitive resources. To mitigate this risk,
|
|
1444
|
-
it's recommended to add a `securityContext` to the container, with the parameter `runAsNonRoot` set to `true`.
|
|
1445
|
-
This will ensure that the container runs as a non-root user, limiting the damage that could be caused by any
|
|
1446
|
-
potential attacks. By adding a `securityContext` to the container in your Kubernetes pod, you can help to
|
|
1447
|
-
ensure that your containerized applications are more secure and less vulnerable to privilege escalation
|
|
1448
|
-
attacks.
|
|
1449
|
-
cwe:
|
|
1450
|
-
- CWE-250
|
|
1451
|
-
owasp:
|
|
1452
|
-
- A05:2021
|
|
1453
|
-
- A06:2017
|
|
1454
|
-
- A02:2025
|
|
1455
|
-
references:
|
|
1456
|
-
- https://kubernetes.io/blog/2016/08/security-best-practices-kubernetes-deployment/
|
|
1457
|
-
- https://kubernetes.io/docs/concepts/policy/pod-security-policy/
|
|
1458
|
-
- https://cheatsheetseries.owasp.org/cheatsheets/Docker_Security_Cheat_Sheet.html#rule-2-set-a-user
|
|
1459
|
-
tags:
|
|
1460
|
-
- kubernetes
|
|
1461
|
-
- id: run-as-non-root-unsafe-value
|
|
1462
|
-
name: run-as-non-root-unsafe-value
|
|
1463
|
-
description: >-
|
|
1464
|
-
When running containers in Kubernetes, it's important to ensure that they are properly secured to prevent
|
|
1465
|
-
privilege escalation attacks. One potential vulnerability is when a container is allowed to run applications as
|
|
1466
|
-
the root user, which could allow an attacker to gain access to sensitive resources. To mitigate this risk, it's
|
|
1467
|
-
recommended to add a `securityContext` to the container, with the parameter `runAsNonRoot` set to `true`. This
|
|
1468
|
-
will ensure that the container runs as a non-root user, limiting the damage that could be caused by any potential
|
|
1469
|
-
attacks. By adding a `securityContext` to the container in your Kubernetes pod, you can help to ensure that your
|
|
1470
|
-
containerized applications are more secure and less vulnerable to privilege escalation attacks.
|
|
1471
|
-
category: security
|
|
1472
|
-
severity: low
|
|
1473
|
-
confidence: medium
|
|
1474
|
-
languages:
|
|
1475
|
-
- yaml
|
|
1476
|
-
patterns:
|
|
1477
|
-
- regex: .*
|
|
1478
|
-
message: >-
|
|
1479
|
-
When running containers in Kubernetes, it's important to ensure that they are properly secured to prevent
|
|
1480
|
-
privilege escalation attacks. One potential vulnerability is when a container is allowed to run applications
|
|
1481
|
-
as the root user, which could allow an attacker to gain access to sensitive resources. To mitigate this risk,
|
|
1482
|
-
it's recommended to add a `securityContext` to the container, with the parameter `runAsNonRoot` set to
|
|
1483
|
-
`true`. This will ensure that the container runs as a non-root user, limiting the damage that could be caused
|
|
1484
|
-
by any potential attacks. By adding a `securityContext` to the container in your Kubernetes pod, you can
|
|
1485
|
-
help to ensure that your containerized applications are more secure and less vulnerable to privilege
|
|
1486
|
-
escalation attacks.
|
|
1487
|
-
cwe:
|
|
1488
|
-
- CWE-250
|
|
1489
|
-
owasp:
|
|
1490
|
-
- A05:2021
|
|
1491
|
-
- A06:2017
|
|
1492
|
-
- A02:2025
|
|
1493
|
-
references:
|
|
1494
|
-
- https://kubernetes.io/blog/2016/08/security-best-practices-kubernetes-deployment/
|
|
1495
|
-
- https://kubernetes.io/docs/concepts/policy/pod-security-policy/
|
|
1496
|
-
- https://cheatsheetseries.owasp.org/cheatsheets/Docker_Security_Cheat_Sheet.html#rule-2-set-a-user
|
|
1497
|
-
tags:
|
|
1498
|
-
- kubernetes
|
|
1499
|
-
- id: run-as-non-root
|
|
1500
|
-
name: run-as-non-root
|
|
1501
|
-
description: >-
|
|
1502
|
-
When running containers in Kubernetes, it's important to ensure that they are properly secured to prevent
|
|
1503
|
-
privilege escalation attacks. One potential vulnerability is when a container is allowed to run applications as
|
|
1504
|
-
the root user, which could allow an attacker to gain access to sensitive resources. To mitigate this risk, it's
|
|
1505
|
-
recommended to add a `securityContext` to the container, with the parameter `runAsNonRoot` set to `true`. This
|
|
1506
|
-
will ensure that the container runs as a non-root user, limiting the damage that could be caused by any potential
|
|
1507
|
-
attacks. By adding a `securityContext` to the container in your Kubernetes pod, you can help to ensure that your
|
|
1508
|
-
containerized applications are more secure and less vulnerable to privilege escalation attacks.
|
|
1509
|
-
category: security
|
|
1510
|
-
severity: low
|
|
1511
|
-
confidence: medium
|
|
1512
|
-
languages:
|
|
1513
|
-
- yaml
|
|
1514
|
-
patterns:
|
|
1515
|
-
- regex: .*
|
|
1516
|
-
message: >-
|
|
1517
|
-
When running containers in Kubernetes, it's important to ensure that they are properly secured to prevent
|
|
1518
|
-
privilege escalation attacks. One potential vulnerability is when a container is allowed to run applications
|
|
1519
|
-
as the root user, which could allow an attacker to gain access to sensitive resources. To mitigate this risk,
|
|
1520
|
-
it's recommended to add a `securityContext` to the container, with the parameter `runAsNonRoot` set to
|
|
1521
|
-
`true`. This will ensure that the container runs as a non-root user, limiting the damage that could be caused
|
|
1522
|
-
by any potential attacks. By adding a `securityContext` to the container in your Kubernetes pod, you can
|
|
1523
|
-
help to ensure that your containerized applications are more secure and less vulnerable to privilege
|
|
1524
|
-
escalation attacks.
|
|
1525
|
-
cwe:
|
|
1526
|
-
- CWE-250
|
|
1527
|
-
owasp:
|
|
1528
|
-
- A05:2021
|
|
1529
|
-
- A06:2017
|
|
1530
|
-
- A02:2025
|
|
1531
|
-
references:
|
|
1532
|
-
- https://kubernetes.io/blog/2016/08/security-best-practices-kubernetes-deployment/
|
|
1533
|
-
- https://kubernetes.io/docs/concepts/policy/pod-security-policy/
|
|
1534
|
-
- https://cheatsheetseries.owasp.org/cheatsheets/Docker_Security_Cheat_Sheet.html#rule-2-set-a-user
|
|
1535
|
-
tags:
|
|
1536
|
-
- kubernetes
|
|
1537
|
-
- id: secrets-in-config-file
|
|
1538
|
-
name: secrets-in-config-file
|
|
1539
|
-
description: >-
|
|
1540
|
-
Secrets ($VALUE) should not be stored in infrastructure as code files. Use an alternative such as Bitnami Sealed
|
|
1541
|
-
Secrets or KSOPS to encrypt Kubernetes Secrets.
|
|
1542
|
-
category: secrets
|
|
1543
|
-
severity: medium
|
|
1544
|
-
confidence: medium
|
|
1545
|
-
languages:
|
|
1546
|
-
- yaml
|
|
1547
|
-
patterns:
|
|
1548
|
-
- pattern: |
|
|
1549
|
-
$KEY: $VALUE
|
|
1550
|
-
message: >-
|
|
1551
|
-
Secrets ($VALUE) should not be stored in infrastructure as code files. Use an alternative such as Bitnami
|
|
1552
|
-
Sealed Secrets or KSOPS to encrypt Kubernetes Secrets.
|
|
1553
|
-
cwe:
|
|
1554
|
-
- CWE-798
|
|
1555
|
-
owasp:
|
|
1556
|
-
- A07:2021
|
|
1557
|
-
- A07:2025
|
|
1558
|
-
references:
|
|
1559
|
-
- https://kubernetes.io/docs/concepts/configuration/secret/
|
|
1560
|
-
- https://media.defense.gov/2021/Aug/03/2002820425/-1/-1/0/CTR_Kubernetes_Hardening_Guidance_1.1_20220315.PDF
|
|
1561
|
-
- https://docs.gitlab.com/ee/user/clusters/agent/gitops/secrets_management.html
|
|
1562
|
-
- https://www.cncf.io/blog/2021/04/22/revealing-the-secrets-of-kubernetes-secrets/
|
|
1563
|
-
- https://github.com/bitnami-labs/sealed-secrets
|
|
1564
|
-
- https://www.cncf.io/blog/2022/01/25/secrets-management-essential-when-using-kubernetes/
|
|
1565
|
-
- https://blog.oddbit.com/post/2021-03-09-getting-started-with-ksops/
|
|
1566
|
-
tags:
|
|
1567
|
-
- kubernetes
|
|
1568
|
-
- id: skip-tls-verify-cluster
|
|
1569
|
-
name: skip-tls-verify-cluster
|
|
1570
|
-
description: >-
|
|
1571
|
-
Cluster is disabling TLS certificate verification when communicating with the server. This makes your HTTPS
|
|
1572
|
-
connections insecure. Remove the 'insecure-skip-tls-verify: true' key to secure communication.
|
|
1573
|
-
category: security
|
|
1574
|
-
severity: medium
|
|
1575
|
-
confidence: medium
|
|
1576
|
-
languages:
|
|
1577
|
-
- yaml
|
|
1578
|
-
patterns:
|
|
1579
|
-
- pattern: |
|
|
1580
|
-
cluster:
|
|
1581
|
-
...
|
|
1582
|
-
insecure-skip-tls-verify: true
|
|
1583
|
-
message: >-
|
|
1584
|
-
Cluster is disabling TLS certificate verification when communicating with the server. This makes your HTTPS
|
|
1585
|
-
connections insecure. Remove the 'insecure-skip-tls-verify: true' key to secure communication.
|
|
1586
|
-
cwe:
|
|
1587
|
-
- CWE-319
|
|
1588
|
-
owasp:
|
|
1589
|
-
- A03:2017
|
|
1590
|
-
- A02:2021
|
|
1591
|
-
- A04:2025
|
|
1592
|
-
references:
|
|
1593
|
-
- >-
|
|
1594
|
-
https://kubernetes.io/docs/reference/config-api/client-authentication.v1beta1/#client-authentication-k8s-io-v1beta1-Cluster
|
|
1595
|
-
tags:
|
|
1596
|
-
- kubernetes
|
|
1597
|
-
- id: skip-tls-verify-service
|
|
1598
|
-
name: skip-tls-verify-service
|
|
1599
|
-
description: >-
|
|
1600
|
-
Service is disabling TLS certificate verification when communicating with the server. This makes your HTTPS
|
|
1601
|
-
connections insecure. Remove the 'insecureSkipTLSVerify: true' key to secure communication.
|
|
1602
|
-
category: security
|
|
1603
|
-
severity: medium
|
|
1604
|
-
confidence: medium
|
|
1605
|
-
languages:
|
|
1606
|
-
- yaml
|
|
1607
|
-
patterns:
|
|
1608
|
-
- pattern: |
|
|
1609
|
-
spec:
|
|
1610
|
-
...
|
|
1611
|
-
insecureSkipTLSVerify: true
|
|
1612
|
-
message: >-
|
|
1613
|
-
Service is disabling TLS certificate verification when communicating with the server. This makes your HTTPS
|
|
1614
|
-
connections insecure. Remove the 'insecureSkipTLSVerify: true' key to secure communication.
|
|
1615
|
-
cwe:
|
|
1616
|
-
- CWE-319
|
|
1617
|
-
owasp:
|
|
1618
|
-
- A03:2017
|
|
1619
|
-
- A02:2021
|
|
1620
|
-
- A04:2025
|
|
1621
|
-
references:
|
|
1622
|
-
- https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#apiservice-v1-apiregistration-k8s-io
|
|
1623
|
-
tags:
|
|
1624
|
-
- kubernetes
|
|
1625
|
-
- id: writable-filesystem-container
|
|
1626
|
-
name: writable-filesystem-container
|
|
1627
|
-
description: >-
|
|
1628
|
-
Container $CONTAINER is running with a writable root filesystem. This may allow malicious applications to download
|
|
1629
|
-
and run additional payloads, or modify container files. If an application inside a container has to save something
|
|
1630
|
-
temporarily consider using a tmpfs. Add 'readOnlyRootFilesystem: true' to this container to prevent this.
|
|
1631
|
-
category: file-ops
|
|
1632
|
-
severity: medium
|
|
1633
|
-
confidence: medium
|
|
1634
|
-
languages:
|
|
1635
|
-
- yaml
|
|
1636
|
-
patterns:
|
|
1637
|
-
- pattern: |
|
|
1638
|
-
image: ...
|
|
1639
|
-
...
|
|
1640
|
-
message: >-
|
|
1641
|
-
Container $CONTAINER is running with a writable root filesystem. This may allow malicious applications to
|
|
1642
|
-
download and run additional payloads, or modify container files. If an application inside a container has to
|
|
1643
|
-
save something temporarily consider using a tmpfs. Add 'readOnlyRootFilesystem: true' to this container to
|
|
1644
|
-
prevent this.
|
|
1645
|
-
cwe:
|
|
1646
|
-
- CWE-732
|
|
1647
|
-
owasp:
|
|
1648
|
-
- A05:2021
|
|
1649
|
-
- A06:2017
|
|
1650
|
-
- A02:2025
|
|
1651
|
-
references:
|
|
1652
|
-
- https://kubernetes.io/docs/concepts/policy/pod-security-policy/#volumes-and-file-systems
|
|
1653
|
-
- https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
|
1654
|
-
- https://blog.atomist.com/security-of-docker-kubernetes/
|
|
1655
|
-
- >-
|
|
1656
|
-
https://cheatsheetseries.owasp.org/cheatsheets/Docker_Security_Cheat_Sheet.html#rule-8-set-filesystem-and-volumes-to-read-only
|
|
1657
|
-
tags:
|
|
1658
|
-
- kubernetes
|
|
1659
|
-
- id: api-key-in-query-parameter
|
|
1660
|
-
name: api-key-in-query-parameter
|
|
1661
|
-
description: >-
|
|
1662
|
-
The $SECURITY_SCHEME security scheme passes an API key in a query parameter. API keys should not be passed as
|
|
1663
|
-
query parameters in security schemes. Pass the API key in the header or body. If using a query parameter is
|
|
1664
|
-
necessary, ensure that the API key is tightly scoped and short lived.
|
|
1665
|
-
category: secrets
|
|
1666
|
-
severity: medium
|
|
1667
|
-
confidence: medium
|
|
1668
|
-
languages:
|
|
1669
|
-
- yaml
|
|
1670
|
-
patterns:
|
|
1671
|
-
- pattern: |
|
|
1672
|
-
$SECURITY_SCHEME:
|
|
1673
|
-
...
|
|
1674
|
-
type: apiKey
|
|
1675
|
-
...
|
|
1676
|
-
in: query
|
|
1677
|
-
|
|
1678
|
-
message: >-
|
|
1679
|
-
The $SECURITY_SCHEME security scheme passes an API key in a query parameter. API keys should not be passed as
|
|
1680
|
-
query parameters in security schemes. Pass the API key in the header or body. If using a query parameter is
|
|
1681
|
-
necessary, ensure that the API key is tightly scoped and short lived.
|
|
1682
|
-
cwe:
|
|
1683
|
-
- CWE-598
|
|
1684
|
-
owasp:
|
|
1685
|
-
- A04:2021
|
|
1686
|
-
- A07:2021
|
|
1687
|
-
references:
|
|
1688
|
-
- https://datatracker.ietf.org/doc/html/rfc6749
|
|
1689
|
-
- https://cwe.mitre.org/data/definitions/598.html
|
|
1690
|
-
- https://owasp.org/Top10/A04_2021-Insecure_Design/
|
|
1691
|
-
- https://owasp.org/Top10/A07_2021-Identification_and_Authentication_Failures/
|
|
1692
|
-
tags:
|
|
1693
|
-
- openapi
|
|
1694
|
-
- id: openai-consequential-action-false
|
|
1695
|
-
name: openai-consequential-action-false
|
|
1696
|
-
description: >-
|
|
1697
|
-
Found 'x-openai-isConsequential: false' in a state-changing HTTP method: $METHOD $PATH. This Action configuration
|
|
1698
|
-
will enable the 'Always Allow' option for state-changing HTTP methods, such as POST, PUT, PATCH, or DELETE. The
|
|
1699
|
-
risk of a user selecting the 'Always Allow' button is that the agent could perform unintended actions on behalf of
|
|
1700
|
-
the user. When working with sensitive functionality, it is always best to include a Human In The Loop (HITL) type
|
|
1701
|
-
of control. Consider the trade-off between security and user friction and then make a risk-based decision about
|
|
1702
|
-
this function.
|
|
1703
|
-
category: security
|
|
1704
|
-
severity: medium
|
|
1705
|
-
confidence: medium
|
|
1706
|
-
languages:
|
|
1707
|
-
- yaml
|
|
1708
|
-
patterns:
|
|
1709
|
-
- regex: .*
|
|
1710
|
-
message: >-
|
|
1711
|
-
Found 'x-openai-isConsequential: false' in a state-changing HTTP method: $METHOD $PATH. This Action
|
|
1712
|
-
configuration will enable the 'Always Allow' option for state-changing HTTP methods, such as POST, PUT, PATCH,
|
|
1713
|
-
or DELETE. The risk of a user selecting the 'Always Allow' button is that the agent could perform unintended
|
|
1714
|
-
actions on behalf of the user. When working with sensitive functionality, it is always best to include a Human
|
|
1715
|
-
In The Loop (HITL) type of control. Consider the trade-off between security and user friction and then make a
|
|
1716
|
-
risk-based decision about this function.
|
|
1717
|
-
cwe:
|
|
1718
|
-
- CWE-441
|
|
1719
|
-
owasp:
|
|
1720
|
-
- A04:2021
|
|
1721
|
-
references:
|
|
1722
|
-
- https://platform.openai.com/docs/actions/consequential-flag
|
|
1723
|
-
- https://owasp.org/Top10/A04_2021-Insecure_Design/
|
|
1724
|
-
- >-
|
|
1725
|
-
https://owasp.org/www-project-top-10-for-large-language-model-applications/assets/PDF/OWASP-Top-10-for-LLMs-2023-v1_1.pdf
|
|
1726
|
-
tags:
|
|
1727
|
-
- openapi
|
|
1728
|
-
- openai
|
|
1729
|
-
- id: use-of-basic-authentication
|
|
1730
|
-
name: use-of-basic-authentication
|
|
1731
|
-
description: >-
|
|
1732
|
-
Basic authentication is considered weak and should be avoided. Use a different authentication scheme, such of
|
|
1733
|
-
OAuth2, OpenID Connect, or mTLS.
|
|
1734
|
-
category: auth
|
|
1735
|
-
severity: high
|
|
1736
|
-
confidence: medium
|
|
1737
|
-
languages:
|
|
1738
|
-
- yaml
|
|
1739
|
-
patterns:
|
|
1740
|
-
- pattern: |
|
|
1741
|
-
type: http
|
|
1742
|
-
...
|
|
1743
|
-
scheme: basic
|
|
1744
|
-
message: >-
|
|
1745
|
-
Basic authentication is considered weak and should be avoided. Use a different authentication scheme, such of
|
|
1746
|
-
OAuth2, OpenID Connect, or mTLS.
|
|
1747
|
-
cwe:
|
|
1748
|
-
- CWE-287
|
|
1749
|
-
owasp:
|
|
1750
|
-
- A04:2021
|
|
1751
|
-
- A07:2021
|
|
1752
|
-
references:
|
|
1753
|
-
- https://cwe.mitre.org/data/definitions/287.html
|
|
1754
|
-
- https://owasp.org/Top10/A04_2021-Insecure_Design/
|
|
1755
|
-
- https://owasp.org/Top10/A07_2021-Identification_and_Authentication_Failures/
|
|
1756
|
-
tags:
|
|
1757
|
-
- openapi
|
|
1758
|
-
- id: lang-consistency-bash
|
|
1759
|
-
name: lang-consistency-bash
|
|
1760
|
-
description: Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'bash' instead.
|
|
1761
|
-
category: security
|
|
1762
|
-
severity: medium
|
|
1763
|
-
confidence: medium
|
|
1764
|
-
languages:
|
|
1765
|
-
- yaml
|
|
1766
|
-
patterns:
|
|
1767
|
-
- pattern: $X
|
|
1768
|
-
message: Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'bash' instead.
|
|
1769
|
-
cwe: []
|
|
1770
|
-
owasp: []
|
|
1771
|
-
references: []
|
|
1772
|
-
tags:
|
|
1773
|
-
- semgrep
|
|
1774
|
-
- id: lang-consistency-cpp
|
|
1775
|
-
name: lang-consistency-cpp
|
|
1776
|
-
description: Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'cpp' instead.
|
|
1777
|
-
category: security
|
|
1778
|
-
severity: medium
|
|
1779
|
-
confidence: medium
|
|
1780
|
-
languages:
|
|
1781
|
-
- yaml
|
|
1782
|
-
patterns:
|
|
1783
|
-
- pattern: $X
|
|
1784
|
-
message: Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'cpp' instead.
|
|
1785
|
-
cwe: []
|
|
1786
|
-
owasp: []
|
|
1787
|
-
references: []
|
|
1788
|
-
tags:
|
|
1789
|
-
- semgrep
|
|
1790
|
-
- id: lang-consistency-csharp
|
|
1791
|
-
name: lang-consistency-csharp
|
|
1792
|
-
description: Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'csharp' instead.
|
|
1793
|
-
category: security
|
|
1794
|
-
severity: medium
|
|
1795
|
-
confidence: medium
|
|
1796
|
-
languages:
|
|
1797
|
-
- yaml
|
|
1798
|
-
patterns:
|
|
1799
|
-
- pattern: $X
|
|
1800
|
-
message: Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'csharp' instead.
|
|
1801
|
-
cwe: []
|
|
1802
|
-
owasp: []
|
|
1803
|
-
references: []
|
|
1804
|
-
tags:
|
|
1805
|
-
- semgrep
|
|
1806
|
-
- id: lang-consistency-dockerfile
|
|
1807
|
-
name: lang-consistency-dockerfile
|
|
1808
|
-
description: Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'dockerfile' instead.
|
|
1809
|
-
category: file-ops
|
|
1810
|
-
severity: medium
|
|
1811
|
-
confidence: medium
|
|
1812
|
-
languages:
|
|
1813
|
-
- yaml
|
|
1814
|
-
patterns:
|
|
1815
|
-
- pattern: $X
|
|
1816
|
-
message: Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'dockerfile' instead.
|
|
1817
|
-
cwe: []
|
|
1818
|
-
owasp: []
|
|
1819
|
-
references: []
|
|
1820
|
-
tags:
|
|
1821
|
-
- semgrep
|
|
1822
|
-
- id: lang-consistency-elixir
|
|
1823
|
-
name: lang-consistency-elixir
|
|
1824
|
-
description: Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'elixir' instead.
|
|
1825
|
-
category: security
|
|
1826
|
-
severity: medium
|
|
1827
|
-
confidence: medium
|
|
1828
|
-
languages:
|
|
1829
|
-
- yaml
|
|
1830
|
-
patterns:
|
|
1831
|
-
- pattern: $X
|
|
1832
|
-
message: Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'elixir' instead.
|
|
1833
|
-
cwe: []
|
|
1834
|
-
owasp: []
|
|
1835
|
-
references: []
|
|
1836
|
-
tags:
|
|
1837
|
-
- semgrep
|
|
1838
|
-
- id: lang-consistency-go
|
|
1839
|
-
name: lang-consistency-go
|
|
1840
|
-
description: Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'go' instead.
|
|
1841
|
-
category: security
|
|
1842
|
-
severity: medium
|
|
1843
|
-
confidence: medium
|
|
1844
|
-
languages:
|
|
1845
|
-
- yaml
|
|
1846
|
-
patterns:
|
|
1847
|
-
- pattern: $X
|
|
1848
|
-
message: Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'go' instead.
|
|
1849
|
-
cwe: []
|
|
1850
|
-
owasp: []
|
|
1851
|
-
references: []
|
|
1852
|
-
tags:
|
|
1853
|
-
- semgrep
|
|
1854
|
-
- id: lang-consistency-hcl
|
|
1855
|
-
name: lang-consistency-hcl
|
|
1856
|
-
description: Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'hcl' instead.
|
|
1857
|
-
category: security
|
|
1858
|
-
severity: medium
|
|
1859
|
-
confidence: medium
|
|
1860
|
-
languages:
|
|
1861
|
-
- yaml
|
|
1862
|
-
patterns:
|
|
1863
|
-
- pattern: $X
|
|
1864
|
-
message: Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'hcl' instead.
|
|
1865
|
-
cwe: []
|
|
1866
|
-
owasp: []
|
|
1867
|
-
references: []
|
|
1868
|
-
tags:
|
|
1869
|
-
- semgrep
|
|
1870
|
-
- id: lang-consistency-js
|
|
1871
|
-
name: lang-consistency-js
|
|
1872
|
-
description: Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'js' instead.
|
|
1873
|
-
category: security
|
|
1874
|
-
severity: medium
|
|
1875
|
-
confidence: medium
|
|
1876
|
-
languages:
|
|
1877
|
-
- yaml
|
|
1878
|
-
patterns:
|
|
1879
|
-
- pattern: $X
|
|
1880
|
-
message: Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'js' instead.
|
|
1881
|
-
cwe: []
|
|
1882
|
-
owasp: []
|
|
1883
|
-
references: []
|
|
1884
|
-
tags:
|
|
1885
|
-
- semgrep
|
|
1886
|
-
- id: lang-consistency-kotlin
|
|
1887
|
-
name: lang-consistency-kotlin
|
|
1888
|
-
description: Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'kotlin' instead.
|
|
1889
|
-
category: security
|
|
1890
|
-
severity: medium
|
|
1891
|
-
confidence: medium
|
|
1892
|
-
languages:
|
|
1893
|
-
- yaml
|
|
1894
|
-
patterns:
|
|
1895
|
-
- pattern: $X
|
|
1896
|
-
message: Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'kotlin' instead.
|
|
1897
|
-
cwe: []
|
|
1898
|
-
owasp: []
|
|
1899
|
-
references: []
|
|
1900
|
-
tags:
|
|
1901
|
-
- semgrep
|
|
1902
|
-
- id: lang-consistency-python
|
|
1903
|
-
name: lang-consistency-python
|
|
1904
|
-
description: Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'python' instead.
|
|
1905
|
-
category: security
|
|
1906
|
-
severity: medium
|
|
1907
|
-
confidence: medium
|
|
1908
|
-
languages:
|
|
1909
|
-
- yaml
|
|
1910
|
-
patterns:
|
|
1911
|
-
- pattern: $X
|
|
1912
|
-
message: Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'python' instead.
|
|
1913
|
-
cwe: []
|
|
1914
|
-
owasp: []
|
|
1915
|
-
references: []
|
|
1916
|
-
tags:
|
|
1917
|
-
- semgrep
|
|
1918
|
-
- id: lang-consistency-regex
|
|
1919
|
-
name: lang-consistency-regex
|
|
1920
|
-
description: Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'regex' instead.
|
|
1921
|
-
category: security
|
|
1922
|
-
severity: medium
|
|
1923
|
-
confidence: medium
|
|
1924
|
-
languages:
|
|
1925
|
-
- yaml
|
|
1926
|
-
patterns:
|
|
1927
|
-
- pattern: $X
|
|
1928
|
-
message: Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'regex' instead.
|
|
1929
|
-
cwe: []
|
|
1930
|
-
owasp: []
|
|
1931
|
-
references: []
|
|
1932
|
-
tags:
|
|
1933
|
-
- semgrep
|
|
1934
|
-
- id: lang-consistency-solidity
|
|
1935
|
-
name: lang-consistency-solidity
|
|
1936
|
-
description: Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'solidity' instead.
|
|
1937
|
-
category: security
|
|
1938
|
-
severity: medium
|
|
1939
|
-
confidence: medium
|
|
1940
|
-
languages:
|
|
1941
|
-
- yaml
|
|
1942
|
-
patterns:
|
|
1943
|
-
- pattern: $X
|
|
1944
|
-
message: Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'solidity' instead.
|
|
1945
|
-
cwe: []
|
|
1946
|
-
owasp: []
|
|
1947
|
-
references: []
|
|
1948
|
-
tags:
|
|
1949
|
-
- semgrep
|
|
1950
|
-
- id: lang-consistency-ts
|
|
1951
|
-
name: lang-consistency-ts
|
|
1952
|
-
description: Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'ts' instead.
|
|
1953
|
-
category: security
|
|
1954
|
-
severity: medium
|
|
1955
|
-
confidence: medium
|
|
1956
|
-
languages:
|
|
1957
|
-
- yaml
|
|
1958
|
-
patterns:
|
|
1959
|
-
- pattern: $X
|
|
1960
|
-
message: Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'ts' instead.
|
|
1961
|
-
cwe: []
|
|
1962
|
-
owasp: []
|
|
1963
|
-
references: []
|
|
1964
|
-
tags:
|
|
1965
|
-
- semgrep
|
|
1966
|
-
- id: duplicate-id
|
|
1967
|
-
name: duplicate-id
|
|
1968
|
-
description: The 'id' field $X was used multiple times. The 'id' field needs to be unique.
|
|
1969
|
-
category: security
|
|
1970
|
-
severity: high
|
|
1971
|
-
confidence: medium
|
|
1972
|
-
languages:
|
|
1973
|
-
- yaml
|
|
1974
|
-
patterns:
|
|
1975
|
-
- pattern: |
|
|
1976
|
-
id: $X
|
|
1977
|
-
message: The 'id' field $X was used multiple times. The 'id' field needs to be unique.
|
|
1978
|
-
cwe: []
|
|
1979
|
-
owasp: []
|
|
1980
|
-
references: []
|
|
1981
|
-
tags:
|
|
1982
|
-
- semgrep
|
|
1983
|
-
- id: duplicate-pattern
|
|
1984
|
-
name: duplicate-pattern
|
|
1985
|
-
description: >-
|
|
1986
|
-
Two identical pattern clauses were detected. This will cause Semgrep to run the same pattern twice. Remove one of
|
|
1987
|
-
the duplicate pattern clauses.
|
|
1988
|
-
category: security
|
|
1989
|
-
severity: high
|
|
1990
|
-
confidence: medium
|
|
1991
|
-
languages:
|
|
1992
|
-
- yaml
|
|
1993
|
-
patterns:
|
|
1994
|
-
- pattern: |
|
|
1995
|
-
pattern: $X
|
|
1996
|
-
message: >-
|
|
1997
|
-
Two identical pattern clauses were detected. This will cause Semgrep to run the same pattern twice. Remove one
|
|
1998
|
-
of the duplicate pattern clauses.
|
|
1999
|
-
cwe: []
|
|
2000
|
-
owasp: []
|
|
2001
|
-
references: []
|
|
2002
|
-
tags:
|
|
2003
|
-
- semgrep
|
|
2004
|
-
- id: empty-message
|
|
2005
|
-
name: empty-message
|
|
2006
|
-
description: >-
|
|
2007
|
-
This rule has an empty message field. Consider adding a message field that communicates why this rule is an issue
|
|
2008
|
-
and how to fix it. This will increase the chance that the finding gets addressed.
|
|
2009
|
-
category: security
|
|
2010
|
-
severity: medium
|
|
2011
|
-
confidence: medium
|
|
2012
|
-
languages:
|
|
2013
|
-
- yaml
|
|
2014
|
-
patterns:
|
|
2015
|
-
- pattern: |
|
|
2016
|
-
message: ""
|
|
2017
|
-
message: >-
|
|
2018
|
-
This rule has an empty message field. Consider adding a message field that communicates why this rule is an
|
|
2019
|
-
issue and how to fix it. This will increase the chance that the finding gets addressed.
|
|
2020
|
-
cwe: []
|
|
2021
|
-
owasp: []
|
|
2022
|
-
references: []
|
|
2023
|
-
tags:
|
|
2024
|
-
- semgrep
|
|
2025
|
-
- id: interfile-true-under-metadata-and-no-options
|
|
2026
|
-
name: interfile-true-under-metadata-and-no-options
|
|
2027
|
-
description: '`interfile: true` should be under the `options` field, not the `metadata` field.'
|
|
2028
|
-
category: file-ops
|
|
2029
|
-
severity: medium
|
|
2030
|
-
confidence: medium
|
|
2031
|
-
languages:
|
|
2032
|
-
- yaml
|
|
2033
|
-
patterns:
|
|
2034
|
-
- pattern: |
|
|
2035
|
-
rules:
|
|
2036
|
-
- id: $ID
|
|
2037
|
-
...
|
|
2038
|
-
$METADATA:
|
|
2039
|
-
...
|
|
2040
|
-
$INTERFILE: true
|
|
2041
|
-
...
|
|
2042
|
-
...
|
|
2043
|
-
message: '`interfile: true` should be under the `options` field, not the `metadata` field.'
|
|
2044
|
-
cwe: []
|
|
2045
|
-
owasp: []
|
|
2046
|
-
references: []
|
|
2047
|
-
tags: []
|
|
2048
|
-
- id: interfile-true-under-metadata-and-options-already-present
|
|
2049
|
-
name: interfile-true-under-metadata-and-options-already-present
|
|
2050
|
-
description: '`interfile: true` should be under the `options` field, not the `metadata` field.'
|
|
2051
|
-
category: file-ops
|
|
2052
|
-
severity: medium
|
|
2053
|
-
confidence: medium
|
|
2054
|
-
languages:
|
|
2055
|
-
- yaml
|
|
2056
|
-
patterns:
|
|
2057
|
-
- pattern: |
|
|
2058
|
-
rules:
|
|
2059
|
-
- id: $ID
|
|
2060
|
-
...
|
|
2061
|
-
$METADATA:
|
|
2062
|
-
...
|
|
2063
|
-
$INTERFILE: true
|
|
2064
|
-
...
|
|
2065
|
-
...
|
|
2066
|
-
message: '`interfile: true` should be under the `options` field, not the `metadata` field.'
|
|
2067
|
-
cwe: []
|
|
2068
|
-
owasp: []
|
|
2069
|
-
references: []
|
|
2070
|
-
tags: []
|
|
2071
|
-
- id: yaml-key-indentation-check
|
|
2072
|
-
name: yaml-key-indentation-check
|
|
2073
|
-
description: >-
|
|
2074
|
-
It looks like you have an YAML indentation issue -- instead of writing `$KEY`, put a space between the hyphen and
|
|
2075
|
-
what comes after! Otherwise, it reads as a single string.
|
|
2076
|
-
category: secrets
|
|
2077
|
-
severity: medium
|
|
2078
|
-
confidence: medium
|
|
2079
|
-
languages:
|
|
2080
|
-
- yaml
|
|
2081
|
-
patterns:
|
|
2082
|
-
- regex: .*
|
|
2083
|
-
message: >-
|
|
2084
|
-
It looks like you have an YAML indentation issue -- instead of writing `$KEY`, put a space between the hyphen
|
|
2085
|
-
and what comes after! Otherwise, it reads as a single string.
|
|
2086
|
-
cwe: []
|
|
2087
|
-
owasp: []
|
|
2088
|
-
references:
|
|
2089
|
-
- https://semgrep.dev/docs/contributing/contributing-to-semgrep-rules-repository
|
|
2090
|
-
tags:
|
|
2091
|
-
- semgrep
|
|
2092
|
-
- id: message-whitespace-check
|
|
2093
|
-
name: message-whitespace-check
|
|
2094
|
-
description: >-
|
|
2095
|
-
It looks like you have an additional space in your rule message, this can look awkward in the finding output,
|
|
2096
|
-
please remove the additional whitespace!
|
|
2097
|
-
category: security
|
|
2098
|
-
severity: medium
|
|
2099
|
-
confidence: medium
|
|
2100
|
-
languages:
|
|
2101
|
-
- yaml
|
|
2102
|
-
patterns:
|
|
2103
|
-
- pattern: |
|
|
2104
|
-
message: >-
|
|
2105
|
-
$VALUE
|
|
2106
|
-
message: >-
|
|
2107
|
-
It looks like you have an additional space in your rule message, this can look awkward in the finding output,
|
|
2108
|
-
please remove the additional whitespace!
|
|
2109
|
-
- regex: \w.*
|
|
2110
|
-
message: >-
|
|
2111
|
-
It looks like you have an additional space in your rule message, this can look awkward in the finding output,
|
|
2112
|
-
please remove the additional whitespace!
|
|
2113
|
-
- regex: \s{2,}
|
|
2114
|
-
message: >-
|
|
2115
|
-
It looks like you have an additional space in your rule message, this can look awkward in the finding output,
|
|
2116
|
-
please remove the additional whitespace!
|
|
2117
|
-
cwe: []
|
|
2118
|
-
owasp: []
|
|
2119
|
-
references:
|
|
2120
|
-
- https://semgrep.dev/docs/contributing/contributing-to-semgrep-rules-repository
|
|
2121
|
-
tags:
|
|
2122
|
-
- semgrep
|
|
2123
|
-
- id: metadata-category
|
|
2124
|
-
name: metadata-category
|
|
2125
|
-
description: >-
|
|
2126
|
-
This Semgrep rule is missing a valid 'category' field in the 'metadata'. 'category' must be one of 'security',
|
|
2127
|
-
'correctness', 'best-practice', 'performance', 'maintainability', or 'portability'.
|
|
2128
|
-
category: security
|
|
2129
|
-
severity: low
|
|
2130
|
-
confidence: medium
|
|
2131
|
-
languages:
|
|
2132
|
-
- yaml
|
|
2133
|
-
patterns:
|
|
2134
|
-
- pattern: 'id: $RULEID'
|
|
2135
|
-
message: >-
|
|
2136
|
-
This Semgrep rule is missing a valid 'category' field in the 'metadata'. 'category' must be one of 'security',
|
|
2137
|
-
'correctness', 'best-practice', 'performance', 'maintainability', or 'portability'.
|
|
2138
|
-
cwe: []
|
|
2139
|
-
owasp: []
|
|
2140
|
-
references: []
|
|
2141
|
-
tags:
|
|
2142
|
-
- semgrep
|
|
2143
|
-
- id: metadata-confidence-incorrect-value
|
|
2144
|
-
name: metadata-confidence-incorrect-value
|
|
2145
|
-
description: >-
|
|
2146
|
-
Semgrep rule confidence: $VALUE detected, but the value must be LOW, MEDIUM, or HIGH. For more information visit:
|
|
2147
|
-
https://semgrep.dev/docs/contributing/contributing-to-semgrep-rules-repository/
|
|
2148
|
-
category: security
|
|
2149
|
-
severity: medium
|
|
2150
|
-
confidence: medium
|
|
2151
|
-
languages:
|
|
2152
|
-
- yaml
|
|
2153
|
-
patterns:
|
|
2154
|
-
- pattern: |
|
|
2155
|
-
confidence: $VALUE
|
|
2156
|
-
message: >-
|
|
2157
|
-
Semgrep rule confidence: $VALUE detected, but the value must be LOW, MEDIUM, or HIGH. For more information
|
|
2158
|
-
visit: https://semgrep.dev/docs/contributing/contributing-to-semgrep-rules-repository/
|
|
2159
|
-
cwe: []
|
|
2160
|
-
owasp: []
|
|
2161
|
-
references:
|
|
2162
|
-
- https://semgrep.dev/docs/contributing/contributing-to-semgrep-rules-repository/
|
|
2163
|
-
tags:
|
|
2164
|
-
- semgrep
|
|
2165
|
-
- id: metadata-confidence
|
|
2166
|
-
name: metadata-confidence
|
|
2167
|
-
description: >-
|
|
2168
|
-
This Semgrep rule is missing a valid 'confidence' field in the 'metadata'. which should be either LOW, MEDIUM, or
|
|
2169
|
-
HIGH. For more information visit https://semgrep.dev/docs/contributing/contributing-to-semgrep-rules-repository/
|
|
2170
|
-
category: security
|
|
2171
|
-
severity: medium
|
|
2172
|
-
confidence: medium
|
|
2173
|
-
languages:
|
|
2174
|
-
- yaml
|
|
2175
|
-
patterns:
|
|
2176
|
-
- regex: .*
|
|
2177
|
-
message: >-
|
|
2178
|
-
This Semgrep rule is missing a valid 'confidence' field in the 'metadata'. which should be either LOW, MEDIUM,
|
|
2179
|
-
or HIGH. For more information visit
|
|
2180
|
-
https://semgrep.dev/docs/contributing/contributing-to-semgrep-rules-repository/
|
|
2181
|
-
cwe: []
|
|
2182
|
-
owasp: []
|
|
2183
|
-
references:
|
|
2184
|
-
- https://semgrep.dev/docs/contributing/contributing-to-semgrep-rules-repository
|
|
2185
|
-
tags:
|
|
2186
|
-
- semgrep
|
|
2187
|
-
- id: example-allowed
|
|
2188
|
-
name: example-allowed
|
|
2189
|
-
description: Example
|
|
2190
|
-
category: security
|
|
2191
|
-
severity: high
|
|
2192
|
-
confidence: medium
|
|
2193
|
-
languages:
|
|
2194
|
-
- json
|
|
2195
|
-
- yaml
|
|
2196
|
-
patterns:
|
|
2197
|
-
- pattern: ...
|
|
2198
|
-
message: Example
|
|
2199
|
-
cwe:
|
|
2200
|
-
- CWE-257
|
|
2201
|
-
owasp: []
|
|
2202
|
-
references: []
|
|
2203
|
-
tags: []
|
|
2204
|
-
- id: example-prohibited
|
|
2205
|
-
name: example-prohibited
|
|
2206
|
-
description: Example
|
|
2207
|
-
category: security
|
|
2208
|
-
severity: high
|
|
2209
|
-
confidence: medium
|
|
2210
|
-
languages:
|
|
2211
|
-
- json
|
|
2212
|
-
- yaml
|
|
2213
|
-
patterns:
|
|
2214
|
-
- pattern: ...
|
|
2215
|
-
message: Example
|
|
2216
|
-
cwe:
|
|
2217
|
-
- CWE-320
|
|
2218
|
-
owasp: []
|
|
2219
|
-
references: []
|
|
2220
|
-
tags: []
|
|
2221
|
-
- id: metadata-cwe-prohibited-or-discouraged
|
|
2222
|
-
name: metadata-cwe-prohibited-or-discouraged
|
|
2223
|
-
description: Vulnerability mapping for this CWE is discouraged or prohibited.
|
|
2224
|
-
category: security
|
|
2225
|
-
severity: high
|
|
2226
|
-
confidence: medium
|
|
2227
|
-
languages:
|
|
2228
|
-
- yaml
|
|
2229
|
-
patterns:
|
|
2230
|
-
- pattern: 'cwe: $CWE'
|
|
2231
|
-
message: Vulnerability mapping for this CWE is discouraged or prohibited.
|
|
2232
|
-
cwe: []
|
|
2233
|
-
owasp: []
|
|
2234
|
-
references: []
|
|
2235
|
-
tags:
|
|
2236
|
-
- cwe
|
|
2237
|
-
- semgrep
|
|
2238
|
-
- id: example-1
|
|
2239
|
-
name: example-1
|
|
2240
|
-
description: Example
|
|
2241
|
-
category: security
|
|
2242
|
-
severity: high
|
|
2243
|
-
confidence: medium
|
|
2244
|
-
languages:
|
|
2245
|
-
- json
|
|
2246
|
-
- yaml
|
|
2247
|
-
patterns:
|
|
2248
|
-
- pattern: ...
|
|
2249
|
-
message: Example
|
|
2250
|
-
cwe:
|
|
2251
|
-
- CWE-123
|
|
2252
|
-
owasp: []
|
|
2253
|
-
references: []
|
|
2254
|
-
tags: []
|
|
2255
|
-
- id: example-2
|
|
2256
|
-
name: example-2
|
|
2257
|
-
description: Example
|
|
2258
|
-
category: security
|
|
2259
|
-
severity: high
|
|
2260
|
-
confidence: medium
|
|
2261
|
-
languages:
|
|
2262
|
-
- json
|
|
2263
|
-
- yaml
|
|
2264
|
-
patterns:
|
|
2265
|
-
- pattern: ...
|
|
2266
|
-
message: Example
|
|
2267
|
-
cwe: []
|
|
2268
|
-
owasp: []
|
|
2269
|
-
references: []
|
|
2270
|
-
tags: []
|
|
2271
|
-
- id: example-3
|
|
2272
|
-
name: example-3
|
|
2273
|
-
description: Example
|
|
2274
|
-
category: security
|
|
2275
|
-
severity: high
|
|
2276
|
-
confidence: medium
|
|
2277
|
-
languages:
|
|
2278
|
-
- json
|
|
2279
|
-
- yaml
|
|
2280
|
-
patterns:
|
|
2281
|
-
- pattern: ...
|
|
2282
|
-
message: Example
|
|
2283
|
-
cwe:
|
|
2284
|
-
- CWE-123
|
|
2285
|
-
owasp: []
|
|
2286
|
-
references: []
|
|
2287
|
-
tags: []
|
|
2288
|
-
- id: example-4
|
|
2289
|
-
name: example-4
|
|
2290
|
-
description: Example
|
|
2291
|
-
category: security
|
|
2292
|
-
severity: high
|
|
2293
|
-
confidence: medium
|
|
2294
|
-
languages:
|
|
2295
|
-
- json
|
|
2296
|
-
- yaml
|
|
2297
|
-
patterns:
|
|
2298
|
-
- pattern: ...
|
|
2299
|
-
message: Example
|
|
2300
|
-
cwe:
|
|
2301
|
-
- CWE-123
|
|
2302
|
-
owasp: []
|
|
2303
|
-
references: []
|
|
2304
|
-
tags: []
|
|
2305
|
-
- id: metadata-cwe
|
|
2306
|
-
name: metadata-cwe
|
|
2307
|
-
description: '$...CWE The cwe tag in rule metadata should always be in the format "CWE-000: Title".'
|
|
2308
|
-
category: security
|
|
2309
|
-
severity: high
|
|
2310
|
-
confidence: medium
|
|
2311
|
-
languages:
|
|
2312
|
-
- yaml
|
|
2313
|
-
patterns:
|
|
2314
|
-
- pattern: 'cwe: ...'
|
|
2315
|
-
message: '$...CWE The cwe tag in rule metadata should always be in the format "CWE-000: Title".'
|
|
2316
|
-
cwe: []
|
|
2317
|
-
owasp: []
|
|
2318
|
-
references: []
|
|
2319
|
-
tags:
|
|
2320
|
-
- semgrep
|
|
2321
|
-
- id: metadata-deepsemgrep
|
|
2322
|
-
name: metadata-deepsemgrep
|
|
2323
|
-
description: 'We no longer support `deepsemgrep: true`, please use `interfile:true`'
|
|
2324
|
-
category: security
|
|
2325
|
-
severity: medium
|
|
2326
|
-
confidence: medium
|
|
2327
|
-
languages:
|
|
2328
|
-
- yaml
|
|
2329
|
-
patterns:
|
|
2330
|
-
- regex: .*
|
|
2331
|
-
message: 'We no longer support `deepsemgrep: true`, please use `interfile:true`'
|
|
2332
|
-
cwe: []
|
|
2333
|
-
owasp: []
|
|
2334
|
-
references:
|
|
2335
|
-
- https://semgrep.dev/
|
|
2336
|
-
tags:
|
|
2337
|
-
- semgrep
|
|
2338
|
-
- id: metadata-impact-incorrect-value
|
|
2339
|
-
name: metadata-impact-incorrect-value
|
|
2340
|
-
description: >-
|
|
2341
|
-
Semgrep rule impact: $VALUE detected, but the value must be LOW, MEDIUM, or HIGH. For more information visit:
|
|
2342
|
-
https://semgrep.dev/docs/contributing/contributing-to-semgrep-rules-repository/
|
|
2343
|
-
category: security
|
|
2344
|
-
severity: medium
|
|
2345
|
-
confidence: medium
|
|
2346
|
-
languages:
|
|
2347
|
-
- yaml
|
|
2348
|
-
patterns:
|
|
2349
|
-
- pattern: |
|
|
2350
|
-
impact: $VALUE
|
|
2351
|
-
message: >-
|
|
2352
|
-
Semgrep rule impact: $VALUE detected, but the value must be LOW, MEDIUM, or HIGH. For more information visit:
|
|
2353
|
-
https://semgrep.dev/docs/contributing/contributing-to-semgrep-rules-repository/
|
|
2354
|
-
cwe: []
|
|
2355
|
-
owasp: []
|
|
2356
|
-
references:
|
|
2357
|
-
- https://semgrep.dev/docs/contributing/contributing-to-semgrep-rules-repository/
|
|
2358
|
-
tags:
|
|
2359
|
-
- semgrep
|
|
2360
|
-
- id: metadata-impact
|
|
2361
|
-
name: metadata-impact
|
|
2362
|
-
description: >-
|
|
2363
|
-
This Semgrep rule is missing a valid 'impact' field in the 'metadata'. which should be either LOW, MEDIUM, or
|
|
2364
|
-
HIGH. For more information visit https://semgrep.dev/docs/contributing/contributing-to-semgrep-rules-repository/
|
|
2365
|
-
category: security
|
|
2366
|
-
severity: medium
|
|
2367
|
-
confidence: medium
|
|
2368
|
-
languages:
|
|
2369
|
-
- yaml
|
|
2370
|
-
patterns:
|
|
2371
|
-
- regex: .*
|
|
2372
|
-
message: >-
|
|
2373
|
-
This Semgrep rule is missing a valid 'impact' field in the 'metadata'. which should be either LOW, MEDIUM, or
|
|
2374
|
-
HIGH. For more information visit
|
|
2375
|
-
https://semgrep.dev/docs/contributing/contributing-to-semgrep-rules-repository/
|
|
2376
|
-
cwe: []
|
|
2377
|
-
owasp: []
|
|
2378
|
-
references:
|
|
2379
|
-
- https://semgrep.dev/docs/writing-rules/rule-syntax/#TODO
|
|
2380
|
-
tags:
|
|
2381
|
-
- semgrep
|
|
2382
|
-
- id: metadata-incorrect-option
|
|
2383
|
-
name: metadata-incorrect-option
|
|
2384
|
-
description: It looks like $KEY is not in the default list of expected options, if this is a new key update this rule
|
|
2385
|
-
category: security
|
|
2386
|
-
severity: low
|
|
2387
|
-
confidence: medium
|
|
2388
|
-
languages:
|
|
2389
|
-
- yaml
|
|
2390
|
-
patterns:
|
|
2391
|
-
- pattern: |
|
|
2392
|
-
$KEY: $VALUE
|
|
2393
|
-
message: It looks like $KEY is not in the default list of expected options, if this is a new key update this rule
|
|
2394
|
-
cwe: []
|
|
2395
|
-
owasp: []
|
|
2396
|
-
references:
|
|
2397
|
-
- https://semgrep.dev/docs/contributing/contributing-to-semgrep-rules-repository
|
|
2398
|
-
tags:
|
|
2399
|
-
- semgrep
|
|
2400
|
-
- id: metadata-license
|
|
2401
|
-
name: metadata-license
|
|
2402
|
-
description: The license should not be set in rule metadata, it gets added by Semgrep app at the registry level.
|
|
2403
|
-
category: security
|
|
2404
|
-
severity: high
|
|
2405
|
-
confidence: medium
|
|
2406
|
-
languages:
|
|
2407
|
-
- yaml
|
|
2408
|
-
patterns:
|
|
2409
|
-
- pattern: |
|
|
2410
|
-
license: ...
|
|
2411
|
-
message: The license should not be set in rule metadata, it gets added by Semgrep app at the registry level.
|
|
2412
|
-
cwe: []
|
|
2413
|
-
owasp: []
|
|
2414
|
-
references: []
|
|
2415
|
-
tags:
|
|
2416
|
-
- semgrep
|
|
2417
|
-
- id: metadata-likelihood-incorrect-value
|
|
2418
|
-
name: metadata-likelihood-incorrect-value
|
|
2419
|
-
description: >-
|
|
2420
|
-
Semgrep rule likelihood: $VALUE detected, but the value must be LOW, MEDIUM, or HIGH. For more information visit:
|
|
2421
|
-
https://semgrep.dev/docs/contributing/contributing-to-semgrep-rules-repository/
|
|
2422
|
-
category: security
|
|
2423
|
-
severity: medium
|
|
2424
|
-
confidence: medium
|
|
2425
|
-
languages:
|
|
2426
|
-
- yaml
|
|
2427
|
-
patterns:
|
|
2428
|
-
- pattern: |
|
|
2429
|
-
likelihood: $VALUE
|
|
2430
|
-
message: >-
|
|
2431
|
-
Semgrep rule likelihood: $VALUE detected, but the value must be LOW, MEDIUM, or HIGH. For more information
|
|
2432
|
-
visit: https://semgrep.dev/docs/contributing/contributing-to-semgrep-rules-repository/
|
|
2433
|
-
cwe: []
|
|
2434
|
-
owasp: []
|
|
2435
|
-
references:
|
|
2436
|
-
- https://semgrep.dev/docs/contributing/contributing-to-semgrep-rules-repository/
|
|
2437
|
-
tags:
|
|
2438
|
-
- semgrep
|
|
2439
|
-
- id: metadata-likelihood
|
|
2440
|
-
name: metadata-likelihood
|
|
2441
|
-
description: >-
|
|
2442
|
-
This Semgrep rule is missing a valid 'likelihood' field in the 'metadata'. which should be either LOW, MEDIUM, or
|
|
2443
|
-
HIGH. For more information visit https://semgrep.dev/docs/contributing/contributing-to-semgrep-rules-repository/
|
|
2444
|
-
category: security
|
|
2445
|
-
severity: medium
|
|
2446
|
-
confidence: medium
|
|
2447
|
-
languages:
|
|
2448
|
-
- yaml
|
|
2449
|
-
patterns:
|
|
2450
|
-
- regex: .*
|
|
2451
|
-
message: >-
|
|
2452
|
-
This Semgrep rule is missing a valid 'likelihood' field in the 'metadata'. which should be either LOW, MEDIUM,
|
|
2453
|
-
or HIGH. For more information visit
|
|
2454
|
-
https://semgrep.dev/docs/contributing/contributing-to-semgrep-rules-repository/
|
|
2455
|
-
cwe: []
|
|
2456
|
-
owasp: []
|
|
2457
|
-
references:
|
|
2458
|
-
- https://semgrep.dev/docs/contributing/contributing-to-semgrep-rules-repository/
|
|
2459
|
-
tags:
|
|
2460
|
-
- semgrep
|
|
2461
|
-
- id: example-5
|
|
2462
|
-
name: example-5
|
|
2463
|
-
description: Example
|
|
2464
|
-
category: security
|
|
2465
|
-
severity: high
|
|
2466
|
-
confidence: medium
|
|
2467
|
-
languages:
|
|
2468
|
-
- json
|
|
2469
|
-
- yaml
|
|
2470
|
-
patterns:
|
|
2471
|
-
- pattern: ...
|
|
2472
|
-
message: Example
|
|
2473
|
-
cwe: []
|
|
2474
|
-
owasp:
|
|
2475
|
-
- A05:2021
|
|
2476
|
-
- A06:2017
|
|
2477
|
-
references: []
|
|
2478
|
-
tags: []
|
|
2479
|
-
- id: example-6
|
|
2480
|
-
name: example-6
|
|
2481
|
-
description: Example
|
|
2482
|
-
category: security
|
|
2483
|
-
severity: high
|
|
2484
|
-
confidence: medium
|
|
2485
|
-
languages:
|
|
2486
|
-
- json
|
|
2487
|
-
- yaml
|
|
2488
|
-
patterns:
|
|
2489
|
-
- pattern: ...
|
|
2490
|
-
message: Example
|
|
2491
|
-
cwe: []
|
|
2492
|
-
owasp:
|
|
2493
|
-
- A5:2021
|
|
2494
|
-
- A06:2017
|
|
2495
|
-
references: []
|
|
2496
|
-
tags: []
|
|
2497
|
-
- id: metadata-owasp
|
|
2498
|
-
name: metadata-owasp
|
|
2499
|
-
description: >-
|
|
2500
|
-
The `owasp` tag in Semgrep rule metadata should start with the format "A00:YYYY", where A00 is the OWASP top ten
|
|
2501
|
-
number and YYYY is the OWASP top ten year.
|
|
2502
|
-
category: security
|
|
2503
|
-
severity: high
|
|
2504
|
-
confidence: medium
|
|
2505
|
-
languages:
|
|
2506
|
-
- json
|
|
2507
|
-
- yaml
|
|
2508
|
-
patterns:
|
|
2509
|
-
- regex: .*
|
|
2510
|
-
message: >-
|
|
2511
|
-
The `owasp` tag in Semgrep rule metadata should start with the format "A00:YYYY", where A00 is the OWASP top
|
|
2512
|
-
ten number and YYYY is the OWASP top ten year.
|
|
2513
|
-
cwe: []
|
|
2514
|
-
owasp: []
|
|
2515
|
-
references: []
|
|
2516
|
-
tags:
|
|
2517
|
-
- semgrep
|
|
2518
|
-
- id: metadata-references
|
|
2519
|
-
name: metadata-references
|
|
2520
|
-
description: The references in rule metadata should always be a list, even if there's only one.
|
|
2521
|
-
category: security
|
|
2522
|
-
severity: high
|
|
2523
|
-
confidence: medium
|
|
2524
|
-
languages:
|
|
2525
|
-
- json
|
|
2526
|
-
- yaml
|
|
2527
|
-
patterns:
|
|
2528
|
-
- pattern: |
|
|
2529
|
-
references: ...
|
|
2530
|
-
message: The references in rule metadata should always be a list, even if there's only one.
|
|
2531
|
-
cwe: []
|
|
2532
|
-
owasp: []
|
|
2533
|
-
references: []
|
|
2534
|
-
tags:
|
|
2535
|
-
- semgrep
|
|
2536
|
-
- id: metadata-subcategory-incorrect-value
|
|
2537
|
-
name: metadata-subcategory-incorrect-value
|
|
2538
|
-
description: >-
|
|
2539
|
-
Semgrep rule likelihood: $VALUE detected, but the value must be vuln, audit, or secure default. For more
|
|
2540
|
-
information visit: https://semgrep.dev/docs/contributing/contributing-to-semgrep-rules-repository/
|
|
2541
|
-
category: security
|
|
2542
|
-
severity: medium
|
|
2543
|
-
confidence: medium
|
|
2544
|
-
languages:
|
|
2545
|
-
- yaml
|
|
2546
|
-
patterns:
|
|
2547
|
-
- pattern: |
|
|
2548
|
-
subcategory:
|
|
2549
|
-
- $VALUE
|
|
2550
|
-
message: >-
|
|
2551
|
-
Semgrep rule likelihood: $VALUE detected, but the value must be vuln, audit, or secure default. For more
|
|
2552
|
-
information visit: https://semgrep.dev/docs/contributing/contributing-to-semgrep-rules-repository/
|
|
2553
|
-
cwe: []
|
|
2554
|
-
owasp: []
|
|
2555
|
-
references:
|
|
2556
|
-
- https://semgrep.dev/docs/contributing/contributing-to-semgrep-rules-repository/
|
|
2557
|
-
tags:
|
|
2558
|
-
- semgrep
|
|
2559
|
-
- id: metadata-subcategory
|
|
2560
|
-
name: metadata-subcategory
|
|
2561
|
-
description: >-
|
|
2562
|
-
This Semgrep rule is missing a valid 'subcategory' field in the 'metadata'. which should be either audit, vuln, or
|
|
2563
|
-
secure default. For more information visit
|
|
2564
|
-
https://semgrep.dev/docs/contributing/contributing-to-semgrep-rules-repository/
|
|
2565
|
-
category: security
|
|
2566
|
-
severity: medium
|
|
2567
|
-
confidence: medium
|
|
2568
|
-
languages:
|
|
2569
|
-
- yaml
|
|
2570
|
-
patterns:
|
|
2571
|
-
- regex: .*
|
|
2572
|
-
message: >-
|
|
2573
|
-
This Semgrep rule is missing a valid 'subcategory' field in the 'metadata'. which should be either audit,
|
|
2574
|
-
vuln, or secure default. For more information visit
|
|
2575
|
-
https://semgrep.dev/docs/contributing/contributing-to-semgrep-rules-repository/
|
|
2576
|
-
cwe: []
|
|
2577
|
-
owasp: []
|
|
2578
|
-
references:
|
|
2579
|
-
- https://semgrep.dev/docs/contributing/contributing-to-semgrep-rules-repository/
|
|
2580
|
-
tags:
|
|
2581
|
-
- semgrep
|
|
2582
|
-
- id: metadata-technology
|
|
2583
|
-
name: metadata-technology
|
|
2584
|
-
description: >-
|
|
2585
|
-
This Semgrep rule is missing a 'technology' field in the 'metadata'. Consider adding a list of technologies based
|
|
2586
|
-
on the rule's associated library or framework, or another piece of relevant information.
|
|
2587
|
-
category: security
|
|
2588
|
-
severity: low
|
|
2589
|
-
confidence: medium
|
|
2590
|
-
languages:
|
|
2591
|
-
- yaml
|
|
2592
|
-
patterns:
|
|
2593
|
-
- regex: .*
|
|
2594
|
-
message: >-
|
|
2595
|
-
This Semgrep rule is missing a 'technology' field in the 'metadata'. Consider adding a list of technologies
|
|
2596
|
-
based on the rule's associated library or framework, or another piece of relevant information.
|
|
2597
|
-
cwe: []
|
|
2598
|
-
owasp: []
|
|
2599
|
-
references: []
|
|
2600
|
-
tags:
|
|
2601
|
-
- semgrep
|
|
2602
|
-
- id: missing-language-field
|
|
2603
|
-
name: missing-language-field
|
|
2604
|
-
description: Please include a 'languages' field for your rule!
|
|
2605
|
-
category: security
|
|
2606
|
-
severity: medium
|
|
2607
|
-
confidence: medium
|
|
2608
|
-
languages:
|
|
2609
|
-
- yaml
|
|
2610
|
-
patterns:
|
|
2611
|
-
- pattern: 'id: $RULEID'
|
|
2612
|
-
message: Please include a 'languages' field for your rule!
|
|
2613
|
-
cwe: []
|
|
2614
|
-
owasp: []
|
|
2615
|
-
references: []
|
|
2616
|
-
tags:
|
|
2617
|
-
- semgrep
|
|
2618
|
-
- id: missing-message-field
|
|
2619
|
-
name: missing-message-field
|
|
2620
|
-
description: >-
|
|
2621
|
-
This rule does not have a message. Semgrep requires that rules have a message. Include a message to explain what
|
|
2622
|
-
the rule does. Consider writing a message that explains why this is an issue and how to fix it.
|
|
2623
|
-
category: security
|
|
2624
|
-
severity: medium
|
|
2625
|
-
confidence: medium
|
|
2626
|
-
languages:
|
|
2627
|
-
- yaml
|
|
2628
|
-
patterns:
|
|
2629
|
-
- pattern: 'id: $RULEID'
|
|
2630
|
-
message: >-
|
|
2631
|
-
This rule does not have a message. Semgrep requires that rules have a message. Include a message to explain
|
|
2632
|
-
what the rule does. Consider writing a message that explains why this is an issue and how to fix it.
|
|
2633
|
-
cwe: []
|
|
2634
|
-
owasp: []
|
|
2635
|
-
references: []
|
|
2636
|
-
tags:
|
|
2637
|
-
- semgrep
|
|
2638
|
-
- id: multi-line-message
|
|
2639
|
-
name: multi-line-message
|
|
2640
|
-
description: >-
|
|
2641
|
-
This rule has a multi-line message field, which may display poorly in a terminal. Consider ensuring it is on one
|
|
2642
|
-
line. For example, use `message: >-`, not `message: |`.
|
|
2643
|
-
category: security
|
|
2644
|
-
severity: medium
|
|
2645
|
-
confidence: medium
|
|
2646
|
-
languages:
|
|
2647
|
-
- yaml
|
|
2648
|
-
patterns:
|
|
2649
|
-
- pattern: |
|
|
2650
|
-
message: "=~/[\\n\\r]/"
|
|
2651
|
-
message: >-
|
|
2652
|
-
This rule has a multi-line message field, which may display poorly in a terminal. Consider ensuring it is on
|
|
2653
|
-
one line. For example, use `message: >-`, not `message: |`.
|
|
2654
|
-
cwe: []
|
|
2655
|
-
owasp: []
|
|
2656
|
-
references:
|
|
2657
|
-
- https://github.com/semgrep/semgrep-rules/issues/1431
|
|
2658
|
-
tags:
|
|
2659
|
-
- semgrep
|
|
2660
|
-
- id: missing-deconstructed-value
|
|
2661
|
-
name: missing-deconstructed-value
|
|
2662
|
-
description: >-
|
|
2663
|
-
Looks like this value is deconstructing a const/var/let you need to use all three `const {...} =` `var {...} =`
|
|
2664
|
-
and `let {...} =` to provide accurate coverage consider adding the missing patterns in a `pattern-inside` for
|
|
2665
|
-
better coverage.
|
|
2666
|
-
category: security
|
|
2667
|
-
severity: medium
|
|
2668
|
-
confidence: medium
|
|
2669
|
-
languages:
|
|
2670
|
-
- yaml
|
|
2671
|
-
patterns:
|
|
2672
|
-
- regex: .*
|
|
2673
|
-
message: >-
|
|
2674
|
-
Looks like this value is deconstructing a const/var/let you need to use all three `const {...} =` `var {...}
|
|
2675
|
-
=` and `let {...} =` to provide accurate coverage consider adding the missing patterns in a `pattern-inside`
|
|
2676
|
-
for better coverage.
|
|
2677
|
-
cwe: []
|
|
2678
|
-
owasp: []
|
|
2679
|
-
references:
|
|
2680
|
-
- https://semgrep.dev/docs/contributing/contributing-to-semgrep-rules-repository
|
|
2681
|
-
tags:
|
|
2682
|
-
- semgrep
|
|
2683
|
-
- id: slow-pattern-general-func
|
|
2684
|
-
name: slow-pattern-general-func
|
|
2685
|
-
description: Using patterns like `function (...) {...}` is too general it will probably slow down the rule performance.
|
|
2686
|
-
category: security
|
|
2687
|
-
severity: medium
|
|
2688
|
-
confidence: medium
|
|
2689
|
-
languages:
|
|
2690
|
-
- yaml
|
|
2691
|
-
patterns:
|
|
2692
|
-
- regex: function[^{]*{[\s\n]*\.\.\.[\s\n]*}
|
|
2693
|
-
message: Using patterns like `function (...) {...}` is too general it will probably slow down the rule performance.
|
|
2694
|
-
cwe: []
|
|
2695
|
-
owasp: []
|
|
2696
|
-
references: []
|
|
2697
|
-
tags:
|
|
2698
|
-
- semgrep
|
|
2699
|
-
- id: slow-pattern-general-property
|
|
2700
|
-
name: slow-pattern-general-property
|
|
2701
|
-
description: Using patterns like `$X.$Y` may be too general and may slow down the rule performance.
|
|
2702
|
-
category: security
|
|
2703
|
-
severity: medium
|
|
2704
|
-
confidence: medium
|
|
2705
|
-
languages:
|
|
2706
|
-
- yaml
|
|
2707
|
-
patterns:
|
|
2708
|
-
- regex: \$[A-Z]*\.\$[A-Z]*
|
|
2709
|
-
message: Using patterns like `$X.$Y` may be too general and may slow down the rule performance.
|
|
2710
|
-
cwe: []
|
|
2711
|
-
owasp: []
|
|
2712
|
-
references: []
|
|
2713
|
-
tags:
|
|
2714
|
-
- semgrep
|
|
2715
|
-
- id: slow-pattern-single-metavariable
|
|
2716
|
-
name: slow-pattern-single-metavariable
|
|
2717
|
-
description: >-
|
|
2718
|
-
Using a single metavariable as a pattern drastically slows down the rule performance because it will match every
|
|
2719
|
-
expression in a file. Instead, try to match something specific such as a function name, or anchor on a statement
|
|
2720
|
-
that may occur above or below the pattern. The more specific you can be, the faster the pattern will run.
|
|
2721
|
-
category: security
|
|
2722
|
-
severity: medium
|
|
2723
|
-
confidence: medium
|
|
2724
|
-
languages:
|
|
2725
|
-
- yaml
|
|
2726
|
-
patterns:
|
|
2727
|
-
- regex: .*
|
|
2728
|
-
message: >-
|
|
2729
|
-
Using a single metavariable as a pattern drastically slows down the rule performance because it will match
|
|
2730
|
-
every expression in a file. Instead, try to match something specific such as a function name, or anchor on a
|
|
2731
|
-
statement that may occur above or below the pattern. The more specific you can be, the faster the pattern will
|
|
2732
|
-
run.
|
|
2733
|
-
cwe: []
|
|
2734
|
-
owasp: []
|
|
2735
|
-
references: []
|
|
2736
|
-
tags:
|
|
2737
|
-
- semgrep
|
|
2738
|
-
- id: slow-pattern-top-ellipsis
|
|
2739
|
-
name: slow-pattern-top-ellipsis
|
|
2740
|
-
description: Using the ellipsis operator `...` at the top of the pattern drastically slows down the rule performance.
|
|
2741
|
-
category: security
|
|
2742
|
-
severity: medium
|
|
2743
|
-
confidence: medium
|
|
2744
|
-
languages:
|
|
2745
|
-
- yaml
|
|
2746
|
-
patterns:
|
|
2747
|
-
- regex: \|\s*\n\s*\.\.\.\s*\n[^\n]*\n\s*\.\.\.
|
|
2748
|
-
message: Using the ellipsis operator `...` at the top of the pattern drastically slows down the rule performance.
|
|
2749
|
-
cwe: []
|
|
2750
|
-
owasp: []
|
|
2751
|
-
references: []
|
|
2752
|
-
tags:
|
|
2753
|
-
- semgrep
|
|
2754
|
-
- id: unnecessary-parent-operator
|
|
2755
|
-
name: unnecessary-parent-operator
|
|
2756
|
-
description: Unnecessary parent operator. Remove one to fix.
|
|
2757
|
-
category: security
|
|
2758
|
-
severity: medium
|
|
2759
|
-
confidence: medium
|
|
2760
|
-
languages:
|
|
2761
|
-
- yaml
|
|
2762
|
-
patterns:
|
|
2763
|
-
- regex: .*
|
|
2764
|
-
message: Unnecessary parent operator. Remove one to fix.
|
|
2765
|
-
cwe: []
|
|
2766
|
-
owasp: []
|
|
2767
|
-
references: []
|
|
2768
|
-
tags:
|
|
2769
|
-
- semgrep
|
|
2770
|
-
- id: unsatisfiable-rule
|
|
2771
|
-
name: unsatisfiable-rule
|
|
2772
|
-
description: You can not use 'pattern' $A and 'pattern-not' $A together; this will always be empty.
|
|
2773
|
-
category: security
|
|
2774
|
-
severity: high
|
|
2775
|
-
confidence: medium
|
|
2776
|
-
languages:
|
|
2777
|
-
- yaml
|
|
2778
|
-
patterns:
|
|
2779
|
-
- regex: .*
|
|
2780
|
-
message: You can not use 'pattern' $A and 'pattern-not' $A together; this will always be empty.
|
|
2781
|
-
cwe: []
|
|
2782
|
-
owasp: []
|
|
2783
|
-
references: []
|
|
2784
|
-
tags:
|
|
2785
|
-
- semgrep
|