File tree Expand file tree Collapse file tree 5 files changed +14
-10
lines changed
references/configuration/cli Expand file tree Collapse file tree 5 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ trivy [global flags] command [flags] target
51
51
* [ trivy kubernetes] ( trivy_kubernetes.md ) - [ EXPERIMENTAL] Scan kubernetes cluster
52
52
* [ trivy module] ( trivy_module.md ) - Manage modules
53
53
* [ trivy plugin] ( trivy_plugin.md ) - Manage plugins
54
- * [ trivy repository] ( trivy_repository.md ) - Scan a remote repository
54
+ * [ trivy repository] ( trivy_repository.md ) - Scan a repository
55
55
* [ trivy rootfs] ( trivy_rootfs.md ) - Scan rootfs
56
56
* [ trivy sbom] ( trivy_sbom.md ) - Scan SBOM for vulnerabilities
57
57
* [ trivy server] ( trivy_server.md ) - Server mode
Original file line number Diff line number Diff line change 1
1
## trivy repository
2
2
3
- Scan a remote repository
3
+ Scan a repository
4
4
5
5
```
6
- trivy repository [flags] REPO_URL
6
+ trivy repository [flags] (REPO_PATH | REPO_URL)
7
7
```
8
8
9
9
### Examples
10
10
11
11
```
12
12
# Scan your remote git repository
13
13
$ trivy repo https://github.com/knqyf263/trivy-ci-test
14
+ # Scan your local git repository
15
+ $ trivy repo /path/to/your/repository
14
16
```
15
17
16
18
### Options
Original file line number Diff line number Diff line change @@ -86,23 +86,23 @@ It is disabled by default and can be enabled with `--scanners config`.
86
86
See [ here] ( ../scanner/misconfiguration/index.md ) for the detail.
87
87
88
88
``` shell
89
- $ trivy repo --scanners config [YOUR_REPO_URL]
89
+ $ trivy repo --scanners config (REPO_PATH | REPO_URL)
90
90
```
91
91
92
92
### Secrets
93
93
It is enabled by default.
94
94
See [ here] ( ../scanner/secret.md ) for the detail.
95
95
96
96
``` shell
97
- $ trivy repo [YOUR_REPO_URL]
97
+ $ trivy repo (REPO_PATH | REPO_URL)
98
98
```
99
99
100
100
### Licenses
101
101
It is disabled by default.
102
102
See [ here] ( ../scanner/license.md ) for the detail.
103
103
104
104
``` shell
105
- $ trivy repo --scanners license [YOUR_REPO_URL]
105
+ $ trivy repo --scanners license (REPO_PATH | REPO_URL)
106
106
```
107
107
108
108
## SBOM generation
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ image -- Scan a container image
58
58
kubernetes -- scan kubernetes cluster
59
59
module -- Manage modules
60
60
plugin -- Manage plugins
61
- repository -- Scan a remote repository
61
+ repository -- Scan a repository
62
62
rootfs -- Scan rootfs
63
63
sbom -- Scan SBOM for vulnerabilities
64
64
server -- Server mode
Original file line number Diff line number Diff line change @@ -443,12 +443,14 @@ func NewRepositoryCommand(globalFlags *flag.GlobalFlagGroup) *cobra.Command {
443
443
repoFlags .ReportFlagGroup .ExitOnEOL = nil // disable '--exit-on-eol'
444
444
445
445
cmd := & cobra.Command {
446
- Use : "repository [flags] REPO_URL" ,
446
+ Use : "repository [flags] (REPO_PATH | REPO_URL) " ,
447
447
Aliases : []string {"repo" },
448
448
GroupID : groupScanning ,
449
- Short : "Scan a remote repository" ,
449
+ Short : "Scan a repository" ,
450
450
Example : ` # Scan your remote git repository
451
- $ trivy repo https://github.com/knqyf263/trivy-ci-test` ,
451
+ $ trivy repo https://github.com/knqyf263/trivy-ci-test
452
+ # Scan your local git repository
453
+ $ trivy repo /path/to/your/repository` ,
452
454
PreRunE : func (cmd * cobra.Command , args []string ) error {
453
455
if err := repoFlags .Bind (cmd ); err != nil {
454
456
return xerrors .Errorf ("flag bind error: %w" , err )
You can’t perform that action at this time.
0 commit comments