You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can see a full list of default skip patterns [here][default-secret-patterns].
247
+
248
+
You can override this list with `skip-patterns` in the configuration file.
249
+
250
+
!!! warning
251
+
When `skip-patterns` is specified, it **replaces** the default list entirely — defaults are not merged.
252
+
To keep the defaults and add new patterns, include them explicitly.
253
+
254
+
``` yaml
255
+
skip-patterns:
256
+
- "**/vendor/**"
257
+
- "**/testdata/**"
258
+
- "**/custom.lock"
259
+
- "**/*.xyz"
260
+
```
261
+
262
+
To disable all skipping, set it to an empty list:
263
+
264
+
``` yaml
265
+
skip-patterns: []
266
+
```
267
+
234
268
## Recommendation
235
-
We would recommend specifying `--skip-dirs` for faster secret scanning.
269
+
We would recommend specifying `--skip-dirs` or `--skip-files` for faster secret scanning. Also there is a way to use [skip-patterns](#skip-patterns) in the secret config to speed up your scanning.
236
270
In container image scanning, Trivy walks the file tree rooted at `/` and scans all the files other than [built-in allowed paths][builtin-allow].
237
271
It will take a while if your image contains a lot of files even though Trivy tries to avoid scanning layers from a base image.
238
-
If you want to make scanning faster, `--skip-dirs` and `--skip-files` helps so that Trivy will skip scanning those files and directories.
272
+
Adding glob patterns such as `**/vendor/**` helps so that Trivy will skip those paths entirely.
239
273
You can see more options [here](../configuration/others.md).
240
274
241
275
`allow-rules`is also helpful. See the [allow-rules](#allow-rules) section.
@@ -311,6 +345,7 @@ This feature is inspired by [gitleaks][gitleaks].
0 commit comments