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
Trivy has client/server mode. Trivy server has vulnerability database and Trivy client doesn't have to download vulnerability database. It is useful if you want to scan images at multiple locations and do not want to download the database at every location.
1091
+
1092
+
### Server
1093
+
At first, you need to launch Trivy server. It downloads vulnerability database automatically and continue to fetch the latest DB in the background.
1094
+
```
1095
+
$ trivy server --listen localhost:8080
1096
+
2019-12-12T15:17:06.551+0200 INFO Need to update DB
1097
+
2019-12-12T15:17:56.706+0200 INFO Reopening DB...
1098
+
2019-12-12T15:17:56.707+0200 INFO Listening localhost:8080...
`--only-update`, `--refresh` and `--auto-refresh` are deprecated since they are unnecessary now. These options will be removed at the next version
@@ -1297,6 +1344,7 @@ Trivy scans a tar image with the following format.
1297
1344
-https://github.com/RustSec/advisory-db
1298
1345
1299
1346
# Usage
1347
+
## Standalone
1300
1348
1301
1349
```
1302
1350
NAME:
@@ -1333,6 +1381,53 @@ OPTIONS:
1333
1381
1334
1382
```
1335
1383
1384
+
## Sub commands
1385
+
Trivy has two sub commands, client and server.
1386
+
1387
+
```
1388
+
NAME:
1389
+
trivy client - client mode
1390
+
1391
+
USAGE:
1392
+
trivy client [command options] [arguments...]
1393
+
1394
+
OPTIONS:
1395
+
--template value, -t value output template [$TRIVY_TEMPLATE]
1396
+
--format value, -f value format (table, json, template) (default: "table") [$TRIVY_FORMAT]
1397
+
--input value, -i value input file path instead of image name [$TRIVY_INPUT]
1398
+
--severity value, -s value severities of vulnerabilities to be displayed (comma separated) (default: "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL") [$TRIVY_SEVERITY]
1399
+
--output value, -o value output file name [$TRIVY_OUTPUT]
1400
+
--exit-code value Exit code when vulnerabilities were found (default: 0) [$TRIVY_EXIT_CODE]
1401
+
--clear-cache, -c clear image caches without scanning [$TRIVY_CLEAR_CACHE]
1402
+
--quiet, -q suppress progress bar and log output [$TRIVY_QUIET]
1403
+
--ignore-unfixed display only fixed vulnerabilities [$TRIVY_IGNORE_UNFIXED]
1404
+
--debug, -d debug mode [$TRIVY_DEBUG]
1405
+
--vuln-type value comma-separated list of vulnerability types (os,library) (default: "os,library") [$TRIVY_VULN_TYPE]
1406
+
--ignorefile value specify .trivyignore file (default: ".trivyignore") [$TRIVY_IGNOREFILE]
1407
+
--cache-dir value use as cache directory, but image cache is stored in /path/to/cache/fanal (default: "/Users/teppei/Library/Caches/trivy") [$TRIVY_CACHE_DIR]
1408
+
--timeout value docker timeout (default: 1m0s) [$TRIVY_TIMEOUT]
1409
+
--token value for authentication [$TRIVY_TOKEN]
1410
+
--remote value server address (default: "http://localhost:4954") [$TRIVY_REMOTE]
1411
+
```
1412
+
1413
+
```
1414
+
NAME:
1415
+
trivy server - server mode
1416
+
1417
+
USAGE:
1418
+
trivy server [command options] [arguments...]
1419
+
1420
+
OPTIONS:
1421
+
--skip-update skip db update [$TRIVY_SKIP_UPDATE]
1422
+
--download-db-only download/update vulnerability database but don't run a scan [$TRIVY_DOWNLOAD_DB_ONLY]
1423
+
--reset remove all caches and database [$TRIVY_RESET]
1424
+
--quiet, -q suppress progress bar and log output [$TRIVY_QUIET]
1425
+
--debug, -d debug mode [$TRIVY_DEBUG]
1426
+
--cache-dir value use as cache directory, but image cache is stored in /path/to/cache/fanal (default: "/Users/teppei/Library/Caches/trivy") [$TRIVY_CACHE_DIR]
1427
+
--token value for authentication [$TRIVY_TOKEN]
1428
+
--listen value listen address (default: "localhost:4954") [$TRIVY_LISTEN]
0 commit comments