Skip to content

Commit d622ca2

Browse files
authored
feat: add workspaceRelationship (#7889)
1 parent 0627992 commit d622ca2

27 files changed

+614
-136
lines changed

docs/docs/references/configuration/cli/trivy_filesystem.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ trivy filesystem [flags] PATH
6969
--parallel int number of goroutines enabled for parallel scanning, set 0 to auto-detect parallelism (default 5)
7070
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
7171
--password-stdin password from stdin. Comma-separated passwords are not supported.
72-
--pkg-relationships strings list of package relationships (unknown,root,direct,indirect) (default [unknown,root,direct,indirect])
72+
--pkg-relationships strings list of package relationships (unknown,root,workspace,direct,indirect) (default [unknown,root,workspace,direct,indirect])
7373
--pkg-types strings list of package types (os,library) (default [os,library])
7474
--redis-ca string redis ca file location, if using redis as cache backend
7575
--redis-cert string redis certificate file location, if using redis as cache backend

docs/docs/references/configuration/cli/trivy_image.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ trivy image [flags] IMAGE_NAME
8787
--parallel int number of goroutines enabled for parallel scanning, set 0 to auto-detect parallelism (default 5)
8888
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
8989
--password-stdin password from stdin. Comma-separated passwords are not supported.
90-
--pkg-relationships strings list of package relationships (unknown,root,direct,indirect) (default [unknown,root,direct,indirect])
90+
--pkg-relationships strings list of package relationships (unknown,root,workspace,direct,indirect) (default [unknown,root,workspace,direct,indirect])
9191
--pkg-types strings list of package types (os,library) (default [os,library])
9292
--platform string set platform in the form os/arch if image is multi-platform capable
9393
--podman-host string unix podman socket path to use for podman scanning

docs/docs/references/configuration/cli/trivy_kubernetes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ trivy kubernetes [flags] [CONTEXT]
8484
--parallel int number of goroutines enabled for parallel scanning, set 0 to auto-detect parallelism (default 5)
8585
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
8686
--password-stdin password from stdin. Comma-separated passwords are not supported.
87-
--pkg-relationships strings list of package relationships (unknown,root,direct,indirect) (default [unknown,root,direct,indirect])
87+
--pkg-relationships strings list of package relationships (unknown,root,workspace,direct,indirect) (default [unknown,root,workspace,direct,indirect])
8888
--pkg-types strings list of package types (os,library) (default [os,library])
8989
--qps float specify the maximum QPS to the master from this client (default 5)
9090
--redis-ca string redis ca file location, if using redis as cache backend

docs/docs/references/configuration/cli/trivy_repository.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ trivy repository [flags] (REPO_PATH | REPO_URL)
6969
--parallel int number of goroutines enabled for parallel scanning, set 0 to auto-detect parallelism (default 5)
7070
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
7171
--password-stdin password from stdin. Comma-separated passwords are not supported.
72-
--pkg-relationships strings list of package relationships (unknown,root,direct,indirect) (default [unknown,root,direct,indirect])
72+
--pkg-relationships strings list of package relationships (unknown,root,workspace,direct,indirect) (default [unknown,root,workspace,direct,indirect])
7373
--pkg-types strings list of package types (os,library) (default [os,library])
7474
--redis-ca string redis ca file location, if using redis as cache backend
7575
--redis-cert string redis certificate file location, if using redis as cache backend

docs/docs/references/configuration/cli/trivy_rootfs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ trivy rootfs [flags] ROOTDIR
7171
--parallel int number of goroutines enabled for parallel scanning, set 0 to auto-detect parallelism (default 5)
7272
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
7373
--password-stdin password from stdin. Comma-separated passwords are not supported.
74-
--pkg-relationships strings list of package relationships (unknown,root,direct,indirect) (default [unknown,root,direct,indirect])
74+
--pkg-relationships strings list of package relationships (unknown,root,workspace,direct,indirect) (default [unknown,root,workspace,direct,indirect])
7575
--pkg-types strings list of package types (os,library) (default [os,library])
7676
--redis-ca string redis ca file location, if using redis as cache backend
7777
--redis-cert string redis certificate file location, if using redis as cache backend

docs/docs/references/configuration/cli/trivy_sbom.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ trivy sbom [flags] SBOM_PATH
4949
--output-plugin-arg string [EXPERIMENTAL] output plugin arguments
5050
--password strings password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
5151
--password-stdin password from stdin. Comma-separated passwords are not supported.
52-
--pkg-relationships strings list of package relationships (unknown,root,direct,indirect) (default [unknown,root,direct,indirect])
52+
--pkg-relationships strings list of package relationships (unknown,root,workspace,direct,indirect) (default [unknown,root,workspace,direct,indirect])
5353
--pkg-types strings list of package types (os,library) (default [os,library])
5454
--redis-ca string redis ca file location, if using redis as cache backend
5555
--redis-cert string redis certificate file location, if using redis as cache backend

docs/docs/references/configuration/cli/trivy_vm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ trivy vm [flags] VM_IMAGE
6161
-o, --output string output file name
6262
--output-plugin-arg string [EXPERIMENTAL] output plugin arguments
6363
--parallel int number of goroutines enabled for parallel scanning, set 0 to auto-detect parallelism (default 5)
64-
--pkg-relationships strings list of package relationships (unknown,root,direct,indirect) (default [unknown,root,direct,indirect])
64+
--pkg-relationships strings list of package relationships (unknown,root,workspace,direct,indirect) (default [unknown,root,workspace,direct,indirect])
6565
--pkg-types strings list of package types (os,library) (default [os,library])
6666
--redis-ca string redis ca file location, if using redis as cache backend
6767
--redis-cert string redis certificate file location, if using redis as cache backend

docs/docs/references/configuration/config-file.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,7 @@ pkg:
447447
relationships:
448448
- unknown
449449
- root
450+
- workspace
450451
- direct
451452
- indirect
452453

integration/testdata/composer.lock.json.golden

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

integration/testdata/conan.json.golden

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"Name": "poco",
2727
"Identifier": {
2828
"PURL": "pkg:conan/[email protected]",
29-
"UID": "312753cebe80c0eb"
29+
"UID": "1c5e3b385e0d9c68"
3030
},
3131
"Version": "1.9.4",
3232
"Relationship": "direct",
@@ -50,7 +50,7 @@
5050
"Name": "bzip2",
5151
"Identifier": {
5252
"PURL": "pkg:conan/[email protected]",
53-
"UID": "6e2ff993df2d9107"
53+
"UID": "fcee910413ab7575"
5454
},
5555
"Version": "1.0.8",
5656
"Indirect": true,
@@ -68,7 +68,7 @@
6868
"Name": "expat",
6969
"Identifier": {
7070
"PURL": "pkg:conan/[email protected]",
71-
"UID": "71c2d92d60f7f21c"
71+
"UID": "1a3fe92a43620875"
7272
},
7373
"Version": "2.4.8",
7474
"Indirect": true,
@@ -86,7 +86,7 @@
8686
"Name": "openssl",
8787
"Identifier": {
8888
"PURL": "pkg:conan/[email protected]",
89-
"UID": "13c605db6afa69dd"
89+
"UID": "d009c32d2d560ed1"
9090
},
9191
"Version": "1.1.1q",
9292
"Indirect": true,
@@ -104,7 +104,7 @@
104104
"Name": "pcre",
105105
"Identifier": {
106106
"PURL": "pkg:conan/[email protected]",
107-
"UID": "4e01c692a67e12e4"
107+
"UID": "452827dd216c920e"
108108
},
109109
"Version": "8.43",
110110
"Indirect": true,
@@ -126,7 +126,7 @@
126126
"Name": "sqlite3",
127127
"Identifier": {
128128
"PURL": "pkg:conan/[email protected]",
129-
"UID": "43bc9c58092c7c9e"
129+
"UID": "8e926335e2fce900"
130130
},
131131
"Version": "3.39.2",
132132
"Indirect": true,
@@ -144,7 +144,7 @@
144144
"Name": "zlib",
145145
"Identifier": {
146146
"PURL": "pkg:conan/[email protected]",
147-
"UID": "d6faf8d6dfd1985"
147+
"UID": "dfef9b967a82df9f"
148148
},
149149
"Version": "1.2.12",
150150
"Indirect": true,
@@ -165,7 +165,7 @@
165165
"PkgName": "pcre",
166166
"PkgIdentifier": {
167167
"PURL": "pkg:conan/[email protected]",
168-
"UID": "4e01c692a67e12e4"
168+
"UID": "452827dd216c920e"
169169
},
170170
"InstalledVersion": "8.43",
171171
"FixedVersion": "8.45",

integration/testdata/gomod-skip.json.golden

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"PkgName": "github.com/docker/distribution",
2828
"PkgIdentifier": {
2929
"PURL": "pkg:golang/github.com/docker/[email protected]%2Bincompatible",
30-
"UID": "9d949a7b01249e68"
30+
"UID": "782e16d5a74c9fa6"
3131
},
3232
"InstalledVersion": "v2.7.1+incompatible",
3333
"FixedVersion": "v2.8.0",
@@ -54,7 +54,7 @@
5454
"PkgName": "github.com/open-policy-agent/opa",
5555
"PkgIdentifier": {
5656
"PURL": "pkg:golang/github.com/open-policy-agent/[email protected]",
57-
"UID": "e89e2b0d8977e2a"
57+
"UID": "3e43f458a7c60c10"
5858
},
5959
"InstalledVersion": "v0.35.0",
6060
"FixedVersion": "0.37.0",
@@ -101,7 +101,7 @@
101101
"PkgName": "golang.org/x/text",
102102
"PkgIdentifier": {
103103
"PURL": "pkg:golang/golang.org/x/[email protected]",
104-
"UID": "3050088ce9eb2ce4"
104+
"UID": "9c987ed7494d95be"
105105
},
106106
"InstalledVersion": "v0.3.6",
107107
"FixedVersion": "0.3.7",
@@ -134,7 +134,7 @@
134134
"PkgName": "github.com/docker/distribution",
135135
"PkgIdentifier": {
136136
"PURL": "pkg:golang/github.com/docker/[email protected]%2Bincompatible",
137-
"UID": "2f7f0fa81860b8f1"
137+
"UID": "97673687db393443"
138138
},
139139
"InstalledVersion": "v2.7.1+incompatible",
140140
"FixedVersion": "v2.8.0",

integration/testdata/gomod-vex.json.golden

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"PkgName": "github.com/docker/distribution",
2828
"PkgIdentifier": {
2929
"PURL": "pkg:golang/github.com/docker/[email protected]%2Bincompatible",
30-
"UID": "9d949a7b01249e68"
30+
"UID": "782e16d5a74c9fa6"
3131
},
3232
"InstalledVersion": "v2.7.1+incompatible",
3333
"FixedVersion": "v2.8.0",
@@ -54,7 +54,7 @@
5454
"PkgName": "golang.org/x/text",
5555
"PkgIdentifier": {
5656
"PURL": "pkg:golang/golang.org/x/[email protected]",
57-
"UID": "3050088ce9eb2ce4"
57+
"UID": "9c987ed7494d95be"
5858
},
5959
"InstalledVersion": "v0.3.6",
6060
"FixedVersion": "0.3.7",
@@ -87,7 +87,7 @@
8787
"PkgName": "github.com/docker/distribution",
8888
"PkgIdentifier": {
8989
"PURL": "pkg:golang/github.com/docker/[email protected]%2Bincompatible",
90-
"UID": "2f7f0fa81860b8f1"
90+
"UID": "97673687db393443"
9191
},
9292
"InstalledVersion": "v2.7.1+incompatible",
9393
"FixedVersion": "v2.8.0",
@@ -121,7 +121,7 @@
121121
"PkgName": "github.com/docker/distribution",
122122
"PkgIdentifier": {
123123
"PURL": "pkg:golang/github.com/docker/[email protected]%2Bincompatible",
124-
"UID": "3ad40723ed2fce22"
124+
"UID": "48e3a06649df4bd4"
125125
},
126126
"InstalledVersion": "v2.7.1+incompatible",
127127
"FixedVersion": "v2.8.0",

integration/testdata/gomod.json.golden

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"PkgName": "github.com/docker/distribution",
2828
"PkgIdentifier": {
2929
"PURL": "pkg:golang/github.com/docker/[email protected]%2Bincompatible",
30-
"UID": "9d949a7b01249e68"
30+
"UID": "782e16d5a74c9fa6"
3131
},
3232
"InstalledVersion": "v2.7.1+incompatible",
3333
"FixedVersion": "v2.8.0",
@@ -54,7 +54,7 @@
5454
"PkgName": "github.com/open-policy-agent/opa",
5555
"PkgIdentifier": {
5656
"PURL": "pkg:golang/github.com/open-policy-agent/[email protected]",
57-
"UID": "e89e2b0d8977e2a"
57+
"UID": "3e43f458a7c60c10"
5858
},
5959
"InstalledVersion": "v0.35.0",
6060
"FixedVersion": "0.37.0",
@@ -101,7 +101,7 @@
101101
"PkgName": "golang.org/x/text",
102102
"PkgIdentifier": {
103103
"PURL": "pkg:golang/golang.org/x/[email protected]",
104-
"UID": "3050088ce9eb2ce4"
104+
"UID": "9c987ed7494d95be"
105105
},
106106
"InstalledVersion": "v0.3.6",
107107
"FixedVersion": "0.3.7",
@@ -134,7 +134,7 @@
134134
"PkgName": "github.com/docker/distribution",
135135
"PkgIdentifier": {
136136
"PURL": "pkg:golang/github.com/docker/[email protected]%2Bincompatible",
137-
"UID": "2f7f0fa81860b8f1"
137+
"UID": "97673687db393443"
138138
},
139139
"InstalledVersion": "v2.7.1+incompatible",
140140
"FixedVersion": "v2.8.0",
@@ -168,7 +168,7 @@
168168
"PkgName": "github.com/docker/distribution",
169169
"PkgIdentifier": {
170170
"PURL": "pkg:golang/github.com/docker/[email protected]%2Bincompatible",
171-
"UID": "3ad40723ed2fce22"
171+
"UID": "48e3a06649df4bd4"
172172
},
173173
"InstalledVersion": "v2.7.1+incompatible",
174174
"FixedVersion": "v2.8.0",

integration/testdata/nuget.json.golden

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"Name": "Newtonsoft.Json",
2727
"Identifier": {
2828
"PURL": "pkg:nuget/[email protected]",
29-
"UID": "d4249b2442e303e9"
29+
"UID": "1cec16ca9d4718aa"
3030
},
3131
"Version": "12.0.3",
3232
"Relationship": "direct",
@@ -43,7 +43,7 @@
4343
"Name": "NuGet.Frameworks",
4444
"Identifier": {
4545
"PURL": "pkg:nuget/[email protected]",
46-
"UID": "6fa0c117039de82a"
46+
"UID": "ed284c615e250d47"
4747
},
4848
"Version": "5.7.0",
4949
"Relationship": "direct",
@@ -66,7 +66,7 @@
6666
"PkgName": "Newtonsoft.Json",
6767
"PkgIdentifier": {
6868
"PURL": "pkg:nuget/[email protected]",
69-
"UID": "d4249b2442e303e9"
69+
"UID": "1cec16ca9d4718aa"
7070
},
7171
"InstalledVersion": "12.0.3",
7272
"FixedVersion": "13.0.1",

integration/testdata/pnpm.json.golden

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"Name": "jquery",
2727
"Identifier": {
2828
"PURL": "pkg:npm/[email protected]",
29-
"UID": "53ca18565a4b6a47"
29+
"UID": "2a8ffed0b32cf950"
3030
},
3131
"Version": "3.3.9",
3232
"Licenses": [
@@ -40,7 +40,7 @@
4040
"Name": "lodash",
4141
"Identifier": {
4242
"PURL": "pkg:npm/[email protected]",
43-
"UID": "31eadfcf58a6b128"
43+
"UID": "29795971f23e7bf6"
4444
},
4545
"Version": "4.17.4",
4646
"Licenses": [
@@ -57,7 +57,7 @@
5757
"PkgName": "jquery",
5858
"PkgIdentifier": {
5959
"PURL": "pkg:npm/[email protected]",
60-
"UID": "53ca18565a4b6a47"
60+
"UID": "2a8ffed0b32cf950"
6161
},
6262
"InstalledVersion": "3.3.9",
6363
"FixedVersion": "3.4.0",
@@ -190,7 +190,7 @@
190190
"PkgName": "lodash",
191191
"PkgIdentifier": {
192192
"PURL": "pkg:npm/[email protected]",
193-
"UID": "31eadfcf58a6b128"
193+
"UID": "29795971f23e7bf6"
194194
},
195195
"InstalledVersion": "4.17.4",
196196
"FixedVersion": "4.17.12",

integration/testdata/poetry.json.golden

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"Name": "click",
2727
"Identifier": {
2828
"PURL": "pkg:pypi/[email protected]",
29-
"UID": "37edb5c90a97272e"
29+
"UID": "d76da06fc75f0439"
3030
},
3131
"Version": "8.1.3",
3232
"Relationship": "direct",
@@ -40,7 +40,7 @@
4040
"Name": "werkzeug",
4141
"Identifier": {
4242
"PURL": "pkg:pypi/[email protected]",
43-
"UID": "4176be111ad01070"
43+
"UID": "d14d05cca13c7a6b"
4444
},
4545
"Version": "0.14",
4646
"Relationship": "direct",
@@ -51,7 +51,7 @@
5151
"Name": "colorama",
5252
"Identifier": {
5353
"PURL": "pkg:pypi/[email protected]",
54-
"UID": "895013c17f373da3"
54+
"UID": "c7ed705c1cc43242"
5555
},
5656
"Version": "0.4.6",
5757
"Indirect": true,
@@ -66,7 +66,7 @@
6666
"PkgName": "werkzeug",
6767
"PkgIdentifier": {
6868
"PURL": "pkg:pypi/[email protected]",
69-
"UID": "4176be111ad01070"
69+
"UID": "d14d05cca13c7a6b"
7070
},
7171
"InstalledVersion": "0.14",
7272
"FixedVersion": "0.15.3",

0 commit comments

Comments
 (0)