Skip to content

Commit

Permalink
feat(image): add --server option for remote scans (#1871)
Browse files Browse the repository at this point in the history
Co-authored-by: knqyf263 <knqyf263@gmail.com>
  • Loading branch information
afdesk and knqyf263 committed May 15, 2022
1 parent 70899b3 commit 6045dfe
Show file tree
Hide file tree
Showing 5 changed files with 165 additions and 16 deletions.
8 changes: 5 additions & 3 deletions docs/docs/references/cli/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

```bash
NAME:
trivy client - client mode
trivy client - DEPRECATED client mode, use `trivy image` with `--server` option for remote scans now.

USAGE:
trivy client [command options] image_name
trivy image --server value

OPTIONS:
trivy client [deprecated command options] image_name

DEPRECATED OPTIONS:
--template value, -t value output template [$TRIVY_TEMPLATE]
--format value, -f value format (table, json, sarif, template) (default: "table") [$TRIVY_FORMAT]
--input value, -i value input file path instead of image name [$TRIVY_INPUT]
Expand Down
4 changes: 4 additions & 0 deletions docs/docs/references/cli/image.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,9 @@ OPTIONS:
--db-repository value OCI repository to retrieve trivy-db from (default: "ghcr.io/aquasecurity/trivy-db") [$TRIVY_DB_REPOSITORY]
--skip-files value specify the file paths to skip traversal (accepts multiple inputs) [$TRIVY_SKIP_FILES]
--skip-dirs value specify the directories where the traversal is skipped (accepts multiple inputs) [$TRIVY_SKIP_DIRS]
--server value server address [$TRIVY_SERVER]
--token value for authentication in client/server mode [$TRIVY_TOKEN]
--token-header value specify a header name for token in client/server mode (default: "Trivy-Token") [$TRIVY_TOKEN_HEADER]
--custom-headers value custom headers in client/server mode (accepts multiple inputs) [$TRIVY_CUSTOM_HEADERS]
--help, -h show help (default: false)
```
9 changes: 5 additions & 4 deletions docs/docs/references/cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Trivy has several sub commands, image, fs, repo, client and server.

``` bash
NAME:
trivy - A simple and comprehensive vulnerability scanner for containers
trivy - Scanner for vulnerabilities in container images, file systems, and Git repositories, as well as for configuration issues and hard-coded secrets

USAGE:
trivy [global options] command [command options] target
Expand All @@ -12,12 +12,14 @@ VERSION:

COMMANDS:
image, i scan an image
filesystem, fs scan local filesystem
filesystem, fs scan local filesystem for language-specific dependencies and config files
rootfs scan rootfs
repository, repo scan remote repository
client, c client mode
server, s server mode
config, conf scan config files
plugin, p manage plugins
kubernetes, k8s scan kubernetes vulnerabilities and misconfigurations
sbom generate SBOM for an artifact
version print the version
help, h Shows a list of commands or help for one command

Expand All @@ -27,5 +29,4 @@ GLOBAL OPTIONS:
--cache-dir value cache directory (default: "/Users/teppei/Library/Caches/trivy") [$TRIVY_CACHE_DIR]
--help, -h show help (default: false)
--version, -v print the version (default: false)

```

0 comments on commit 6045dfe

Please sign in to comment.