Skip to content

Commit 33074cf

Browse files
authored
chore(deps): Move compliance types to defsec (#3842)
Signed-off-by: Simar <[email protected]>
1 parent ba9b041 commit 33074cf

File tree

8 files changed

+81
-103
lines changed

8 files changed

+81
-103
lines changed

go.mod

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ require (
1313
github.com/NYTimes/gziphandler v1.1.1
1414
github.com/alicebob/miniredis/v2 v2.23.0
1515
github.com/aquasecurity/bolt-fixtures v0.0.0-20200903104109-d34e7f983986
16-
github.com/aquasecurity/defsec v0.84.0
16+
github.com/aquasecurity/defsec v0.84.1
1717
github.com/aquasecurity/go-dep-parser v0.0.0-20230315140444-2c62bb5726f4
1818
github.com/aquasecurity/go-gem-version v0.0.0-20201115065557-8eed6fe000ce
1919
github.com/aquasecurity/go-npm-version v0.0.0-20201110091526-0b796d180798
@@ -67,7 +67,7 @@ require (
6767
github.com/masahiro331/go-vmdk-parser v0.0.0-20221225061455-612096e4bbbd
6868
github.com/masahiro331/go-xfs-filesystem v0.0.0-20221225060805-c02764233454
6969
github.com/mitchellh/hashstructure/v2 v2.0.2
70-
github.com/moby/buildkit v0.10.4
70+
github.com/moby/buildkit v0.11.4
7171
github.com/open-policy-agent/opa v0.44.1-0.20220927105354-00e835a7cc15
7272
github.com/opencontainers/go-digest v1.0.0
7373
github.com/opencontainers/image-spec v1.1.0-rc2
@@ -78,7 +78,7 @@ require (
7878
github.com/secure-systems-lab/go-securesystemslib v0.4.0
7979
github.com/sigstore/rekor v1.0.1
8080
github.com/sosedoff/gitkit v0.3.0
81-
github.com/spdx/tools-golang v0.3.0
81+
github.com/spdx/tools-golang v0.3.1-0.20230104082527-d6f58551be3f
8282
github.com/spf13/cast v1.5.0
8383
github.com/spf13/cobra v1.6.1
8484
github.com/spf13/pflag v1.0.5
@@ -196,15 +196,15 @@ require (
196196
github.com/containerd/cgroups v1.0.4 // indirect
197197
github.com/containerd/continuity v0.3.0 // indirect
198198
github.com/containerd/fifo v1.0.0 // indirect
199-
github.com/containerd/stargz-snapshotter/estargz v0.12.1 // indirect
199+
github.com/containerd/stargz-snapshotter/estargz v0.13.0 // indirect
200200
github.com/containerd/ttrpc v1.1.0 // indirect
201201
github.com/containerd/typeurl v1.0.2 // indirect
202202
github.com/cyphar/filepath-securejoin v0.2.3 // indirect
203203
github.com/davecgh/go-spew v1.1.1 // indirect
204204
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
205205
github.com/dimchansky/utfbom v1.1.1 // indirect
206206
github.com/dlclark/regexp2 v1.4.0 // indirect
207-
github.com/docker/cli v20.10.21+incompatible // indirect
207+
github.com/docker/cli v23.0.0-rc.1+incompatible // indirect
208208
github.com/docker/distribution v2.8.1+incompatible // indirect
209209
github.com/docker/docker-credential-helpers v0.7.0 // indirect
210210
github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c // indirect
@@ -236,7 +236,7 @@ require (
236236
github.com/gofrs/uuid v4.0.0+incompatible // indirect
237237
github.com/gogo/googleapis v1.4.1 // indirect
238238
github.com/gogo/protobuf v1.3.2 // indirect
239-
github.com/golang-jwt/jwt/v4 v4.2.0 // indirect
239+
github.com/golang-jwt/jwt/v4 v4.4.2 // indirect
240240
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
241241
github.com/google/btree v1.0.1 // indirect
242242
github.com/google/gnostic v0.5.7-v3refs // indirect
@@ -265,7 +265,7 @@ require (
265265
github.com/json-iterator/go v1.1.12 // indirect
266266
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
267267
github.com/kevinburke/ssh_config v1.2.0 // indirect
268-
github.com/klauspost/compress v1.15.11 // indirect
268+
github.com/klauspost/compress v1.15.12 // indirect
269269
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
270270
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
271271
github.com/liamg/iamgo v0.0.9 // indirect
@@ -289,9 +289,9 @@ require (
289289
github.com/moby/locker v1.0.1 // indirect
290290
github.com/moby/patternmatcher v0.5.0 // indirect
291291
github.com/moby/spdystream v0.2.0 // indirect
292-
github.com/moby/sys/mountinfo v0.6.0 // indirect
292+
github.com/moby/sys/mountinfo v0.6.2 // indirect
293293
github.com/moby/sys/sequential v0.5.0 // indirect
294-
github.com/moby/sys/signal v0.6.0 // indirect
294+
github.com/moby/sys/signal v0.7.0 // indirect
295295
github.com/moby/term v0.0.0-20221205130635-1aeaba878587 // indirect
296296
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
297297
github.com/modern-go/reflect2 v1.0.2 // indirect
@@ -302,7 +302,7 @@ require (
302302
github.com/olekukonko/tablewriter v0.0.5 // indirect
303303
github.com/opencontainers/runc v1.1.3 // indirect
304304
github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 // indirect
305-
github.com/opencontainers/selinux v1.10.1 // indirect
305+
github.com/opencontainers/selinux v1.10.2 // indirect
306306
github.com/opentracing/opentracing-go v1.2.0 // indirect
307307
github.com/owenrumney/squealer v1.1.1 // indirect
308308
github.com/pelletier/go-toml/v2 v2.0.6 // indirect

go.sum

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,8 @@ github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6
312312
github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo=
313313
github.com/aquasecurity/bolt-fixtures v0.0.0-20200903104109-d34e7f983986 h1:2a30xLN2sUZcMXl50hg+PJCIDdJgIvIbVcKqLJ/ZrtM=
314314
github.com/aquasecurity/bolt-fixtures v0.0.0-20200903104109-d34e7f983986/go.mod h1:NT+jyeCzXk6vXR5MTkdn4z64TgGfE5HMLC8qfj5unl8=
315-
github.com/aquasecurity/defsec v0.84.0 h1:31HunilGj3xcgze5AqB7dtdiYwMXzXzDXEqYwx/OUhg=
316-
github.com/aquasecurity/defsec v0.84.0/go.mod h1:qrD/P88T3puVWDAHM/daPfgvJaVzBprdmROxtRpCT4A=
315+
github.com/aquasecurity/defsec v0.84.1 h1:YwhQprDEy4ZN/c7aDV57O5UkxOusHwtfeENI7wm4/L8=
316+
github.com/aquasecurity/defsec v0.84.1/go.mod h1:AywB8D+RX4X8p2luSlz4ha3w9+q2kuTHtTvJLNxaYjI=
317317
github.com/aquasecurity/go-dep-parser v0.0.0-20230315140444-2c62bb5726f4 h1:L9ogxesMkRaH3ct2bn2whA6nEJU7ZUMcaKjGDU9TwX8=
318318
github.com/aquasecurity/go-dep-parser v0.0.0-20230315140444-2c62bb5726f4/go.mod h1:sG02b+zain+8EkcKAVnggE1X1+OrXRjkTzUmFNk7/Lc=
319319
github.com/aquasecurity/go-gem-version v0.0.0-20201115065557-8eed6fe000ce h1:QgBRgJvtEOBtUXilDb1MLi1p1MWoyFDXAu5DEUl5nwM=
@@ -624,8 +624,8 @@ github.com/containerd/nri v0.0.0-20210316161719-dbaa18c31c14/go.mod h1:lmxnXF6oM
624624
github.com/containerd/nri v0.1.0/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY=
625625
github.com/containerd/stargz-snapshotter/estargz v0.4.1/go.mod h1:x7Q9dg9QYb4+ELgxmo4gBUeJB0tl5dqH1Sdz0nJU1QM=
626626
github.com/containerd/stargz-snapshotter/estargz v0.7.0/go.mod h1:83VWDqHnurTKliEB0YvWMiCfLDwv4Cjj1X9Vk98GJZw=
627-
github.com/containerd/stargz-snapshotter/estargz v0.12.1 h1:+7nYmHJb0tEkcRaAW+MHqoKaJYZmkikupxCqVtmPuY0=
628-
github.com/containerd/stargz-snapshotter/estargz v0.12.1/go.mod h1:12VUuCq3qPq4y8yUW+l5w3+oXV3cx2Po3KSe/SmPGqw=
627+
github.com/containerd/stargz-snapshotter/estargz v0.13.0 h1:fD7AwuVV+B40p0d9qVkH/Au1qhp8hn/HWJHIYjpEcfw=
628+
github.com/containerd/stargz-snapshotter/estargz v0.13.0/go.mod h1:m+9VaGJGlhCnrcEUod8mYumTmRgblwd3rC5UCEh2Yp0=
629629
github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o=
630630
github.com/containerd/ttrpc v0.0.0-20190828172938-92c8520ef9f8/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o=
631631
github.com/containerd/ttrpc v0.0.0-20191028202541-4f1b8fe65a5c/go.mod h1:LPm1u0xBw8r8NOKoOdNMeVHSawSsltak+Ihv+etqsE8=
@@ -701,8 +701,8 @@ github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55k
701701
github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
702702
github.com/docker/cli v0.0.0-20191017083524-a8ff7f821017/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
703703
github.com/docker/cli v20.10.7+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
704-
github.com/docker/cli v20.10.21+incompatible h1:qVkgyYUnOLQ98LtXBrwd/duVqPT2X4SHndOuGsfwyhU=
705-
github.com/docker/cli v20.10.21+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
704+
github.com/docker/cli v23.0.0-rc.1+incompatible h1:Vl3pcUK4/LFAD56Ys3BrqgAtuwpWd/IO3amuSL0ZbP0=
705+
github.com/docker/cli v23.0.0-rc.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
706706
github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY=
707707
github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
708708
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
@@ -926,8 +926,9 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69
926926
github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY=
927927
github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
928928
github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
929-
github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU=
930929
github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
930+
github.com/golang-jwt/jwt/v4 v4.4.2 h1:rcc4lwaZgFMCZ5jxF9ABolDcIHdBytAFgqFPbSJQAYs=
931+
github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
931932
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
932933
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
933934
github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ=
@@ -1186,8 +1187,9 @@ github.com/klauspost/compress v1.11.13/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdY
11861187
github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg=
11871188
github.com/klauspost/compress v1.13.0/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg=
11881189
github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
1189-
github.com/klauspost/compress v1.15.11 h1:Lcadnb3RKGin4FYM/orgq0qde+nc15E5Cbqg4B9Sx9c=
11901190
github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM=
1191+
github.com/klauspost/compress v1.15.12 h1:YClS/PImqYbn+UILDnqxQCZ3RehC9N318SU3kElDUEM=
1192+
github.com/klauspost/compress v1.15.12/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM=
11911193
github.com/knqyf263/go-apk-version v0.0.0-20200609155635-041fdbb8563f h1:GvCU5GXhHq+7LeOzx/haG7HSIZokl3/0GkoUFzsRJjg=
11921194
github.com/knqyf263/go-apk-version v0.0.0-20200609155635-041fdbb8563f/go.mod h1:q59u9px8b7UTj0nIjEjvmTWekazka6xIt6Uogz5Dm+8=
11931195
github.com/knqyf263/go-deb-version v0.0.0-20230223133812-3ed183d23422 h1:PPPlUUqPP6fLudIK4n0l0VU4KT2cQGnheW9x8pNiCHI=
@@ -1338,8 +1340,8 @@ github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQ
13381340
github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
13391341
github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=
13401342
github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
1341-
github.com/moby/buildkit v0.10.4 h1:FvC+buO8isGpUFZ1abdSLdGHZVqg9sqI4BbFL8tlzP4=
1342-
github.com/moby/buildkit v0.10.4/go.mod h1:Yajz9vt1Zw5q9Pp4pdb3TCSUXJBIroIQGQ3TTs/sLug=
1343+
github.com/moby/buildkit v0.11.4 h1:mleVHr+n7HUD65QNUkgkT3d8muTzhYUoHE9FM3Ej05s=
1344+
github.com/moby/buildkit v0.11.4/go.mod h1:P5Qi041LvCfhkfYBHry+Rwoo3Wi6H971J2ggE+PcIoo=
13431345
github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg=
13441346
github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc=
13451347
github.com/moby/patternmatcher v0.5.0 h1:YCZgJOeULcxLw1Q+sVR636pmS7sPEn1Qo2iAN6M7DBo=
@@ -1349,12 +1351,12 @@ github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0Gq
13491351
github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A=
13501352
github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A=
13511353
github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU=
1352-
github.com/moby/sys/mountinfo v0.6.0 h1:gUDhXQx58YNrpHlK4nSL+7y2pxFZkUcXqzFDKWdC0Oo=
1353-
github.com/moby/sys/mountinfo v0.6.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU=
1354+
github.com/moby/sys/mountinfo v0.6.2 h1:BzJjoreD5BMFNmD9Rus6gdd1pLuecOFPt8wC+Vygl78=
1355+
github.com/moby/sys/mountinfo v0.6.2/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI=
13541356
github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc=
13551357
github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo=
1356-
github.com/moby/sys/signal v0.6.0 h1:aDpY94H8VlhTGa9sNYUFCFsMZIUh5wm0B6XkIoJj/iY=
1357-
github.com/moby/sys/signal v0.6.0/go.mod h1:GQ6ObYZfqacOwTtlXvcmh9A26dVRul/hbOZn88Kg8Tg=
1358+
github.com/moby/sys/signal v0.7.0 h1:25RW3d5TnQEoKvRbEKUGay6DCQ46IxAVTT9CUMgmsSI=
1359+
github.com/moby/sys/signal v0.7.0/go.mod h1:GQ6ObYZfqacOwTtlXvcmh9A26dVRul/hbOZn88Kg8Tg=
13581360
github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ=
13591361
github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo=
13601362
github.com/moby/term v0.0.0-20221205130635-1aeaba878587 h1:HfkjXDfhgVaN5rmueG8cL8KKeFNecRCXFhaJ2qZ5SKA=
@@ -1438,8 +1440,8 @@ github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqi
14381440
github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3ogry1nUQF8Evvo=
14391441
github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8=
14401442
github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI=
1441-
github.com/opencontainers/selinux v1.10.1 h1:09LIPVRP3uuZGQvgR+SgMSNBd1Eb3vlRbGqQpoHsF8w=
1442-
github.com/opencontainers/selinux v1.10.1/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI=
1443+
github.com/opencontainers/selinux v1.10.2 h1:NFy2xCsjn7+WspbfZkUd5zyVeisV7VFbPSP96+8/ha4=
1444+
github.com/opencontainers/selinux v1.10.2/go.mod h1:cARutUbaUrlRClyvxOICCgKixCs6L05aUsohzA3EkHQ=
14431445
github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs=
14441446
github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
14451447
github.com/owenrumney/go-sarif v1.1.1/go.mod h1:dNDiPlF04ESR/6fHlPyq7gHKmrM0sHUvAGjsoh8ZH0U=

pkg/cloud/aws/commands/run_test.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import (
88
"testing"
99
"time"
1010

11+
defsecTypes "github.com/aquasecurity/defsec/pkg/types"
12+
1113
dbTypes "github.com/aquasecurity/trivy-db/pkg/types"
1214
"github.com/aquasecurity/trivy/pkg/compliance/spec"
1315
"github.com/aquasecurity/trivy/pkg/flag"
@@ -649,18 +651,18 @@ deny[res] {
649651
},
650652
ReportOptions: flag.ReportOptions{
651653
Compliance: spec.ComplianceSpec{
652-
Spec: spec.Spec{
654+
Spec: defsecTypes.Spec{
653655
// TODO: refactor defsec so that the parsed spec can be passed
654656
ID: "@testdata/example-spec.yaml",
655657
Title: "my-custom-spec",
656658
Description: "My fancy spec",
657659
Version: "1.2",
658-
Controls: []spec.Control{
660+
Controls: []defsecTypes.Control{
659661
{
660662
ID: "1.1",
661663
Name: "Unencrypted S3 bucket",
662664
Description: "S3 Buckets should be encrypted to protect the data that is stored within them if access is compromised.",
663-
Checks: []spec.SpecCheck{
665+
Checks: []defsecTypes.SpecCheck{
664666
{ID: "AVD-AWS-0088"},
665667
},
666668
Severity: "HIGH",

pkg/compliance/report/report.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ package report
33
import (
44
"io"
55

6+
defsecTypes "github.com/aquasecurity/defsec/pkg/types"
7+
68
"golang.org/x/xerrors"
79

810
dbTypes "github.com/aquasecurity/trivy-db/pkg/types"
@@ -40,7 +42,7 @@ type ControlCheckResult struct {
4042
ID string
4143
Name string
4244
Description string
43-
DefaultStatus spec.ControlStatus `json:",omitempty"`
45+
DefaultStatus defsecTypes.ControlStatus `json:",omitempty"`
4446
Severity string
4547
Results types.Results
4648
}
@@ -94,7 +96,7 @@ func (r ComplianceReport) empty() bool {
9496
}
9597

9698
// buildControlCheckResults create compliance results data
97-
func buildControlCheckResults(checksMap map[string]types.Results, controls []spec.Control) []*ControlCheckResult {
99+
func buildControlCheckResults(checksMap map[string]types.Results, controls []defsecTypes.Control) []*ControlCheckResult {
98100
complianceResults := make([]*ControlCheckResult, 0)
99101
for _, control := range controls {
100102
var results types.Results
@@ -114,7 +116,7 @@ func buildControlCheckResults(checksMap map[string]types.Results, controls []spe
114116
}
115117

116118
// buildComplianceReportResults create compliance results data
117-
func buildComplianceReportResults(checksMap map[string]types.Results, spec spec.Spec) *ComplianceReport {
119+
func buildComplianceReportResults(checksMap map[string]types.Results, spec defsecTypes.Spec) *ComplianceReport {
118120
controlCheckResult := buildControlCheckResults(checksMap, spec.Controls)
119121
return &ComplianceReport{
120122
ID: spec.ID,

pkg/compliance/report/report_test.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import (
44
"fmt"
55
"testing"
66

7+
defsecTypes "github.com/aquasecurity/defsec/pkg/types"
8+
79
"github.com/stretchr/testify/assert"
810

911
dbTypes "github.com/aquasecurity/trivy-db/pkg/types"
@@ -97,21 +99,21 @@ func TestBuildComplianceReport(t *testing.T) {
9799
},
98100
},
99101
cs: spec.ComplianceSpec{
100-
Spec: spec.Spec{
102+
Spec: defsecTypes.Spec{
101103
ID: "1234",
102104
Title: "NSA",
103105
Description: "National Security Agency - Kubernetes Hardening Guidance",
104106
Version: "1.0",
105107
RelatedResources: []string{
106108
"https://example.com",
107109
},
108-
Controls: []spec.Control{
110+
Controls: []defsecTypes.Control{
109111
{
110112
ID: "1.0",
111113
Name: "Non-root containers",
112114
Description: "Check that container is not running as root",
113115
Severity: "MEDIUM",
114-
Checks: []spec.SpecCheck{
116+
Checks: []defsecTypes.SpecCheck{
115117
{ID: "AVD-KSV-0001"},
116118
},
117119
},
@@ -120,7 +122,7 @@ func TestBuildComplianceReport(t *testing.T) {
120122
Name: "Immutable container file systems",
121123
Description: "Check that container root file system is immutable",
122124
Severity: "LOW",
123-
Checks: []spec.SpecCheck{
125+
Checks: []defsecTypes.SpecCheck{
124126
{ID: "AVD-KSV-0002"},
125127
},
126128
},
@@ -129,7 +131,7 @@ func TestBuildComplianceReport(t *testing.T) {
129131
Name: "tzdata - new upstream version",
130132
Description: "Bad tzdata package",
131133
Severity: "CRITICAL",
132-
Checks: []spec.SpecCheck{
134+
Checks: []defsecTypes.SpecCheck{
133135
{ID: "DLA-2424-1"},
134136
},
135137
},

pkg/compliance/spec/compliance.go

Lines changed: 6 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import (
55
"os"
66
"strings"
77

8+
defsecTypes "github.com/aquasecurity/defsec/pkg/types"
9+
810
"golang.org/x/exp/maps"
911
"golang.org/x/xerrors"
1012
"gopkg.in/yaml.v3"
@@ -17,49 +19,13 @@ type Severity string
1719

1820
// ComplianceSpec represent the compliance specification
1921
type ComplianceSpec struct {
20-
Spec Spec `yaml:"spec"`
21-
}
22-
23-
type Spec struct {
24-
ID string `yaml:"id"`
25-
Title string `yaml:"title"`
26-
Description string `yaml:"description"`
27-
Version string `yaml:"version"`
28-
RelatedResources []string `yaml:"relatedResources"`
29-
Controls []Control `yaml:"controls"`
30-
}
31-
32-
// Control represent the cps controls data and mapping checks
33-
type Control struct {
34-
ID string `yaml:"id"`
35-
Name string `yaml:"name"`
36-
Description string `yaml:"description,omitempty"`
37-
Checks []SpecCheck `yaml:"checks"`
38-
Severity Severity `yaml:"severity"`
39-
DefaultStatus ControlStatus `yaml:"defaultStatus,omitempty"`
22+
Spec defsecTypes.Spec `yaml:"spec"`
4023
}
4124

42-
// SpecCheck represent the scanner who perform the control check
43-
type SpecCheck struct {
44-
ID string `yaml:"id"`
45-
}
46-
47-
// ControlCheck provides the result of conducting a single audit step.
48-
type ControlCheck struct {
49-
ID string `yaml:"id"`
50-
Name string `yaml:"name"`
51-
Description string `yaml:"description,omitempty"`
52-
PassTotal int `yaml:"passTotal"`
53-
FailTotal int `yaml:"failTotal"`
54-
Severity Severity `yaml:"severity"`
55-
}
56-
57-
type ControlStatus string
58-
5925
const (
60-
FailStatus ControlStatus = "FAIL"
61-
PassStatus ControlStatus = "PASS"
62-
WarnStatus ControlStatus = "WARN"
26+
FailStatus defsecTypes.ControlStatus = "FAIL"
27+
PassStatus defsecTypes.ControlStatus = "PASS"
28+
WarnStatus defsecTypes.ControlStatus = "WARN"
6329
)
6430

6531
// Scanners reads spec control and determines the scanners by check ID prefix

0 commit comments

Comments
 (0)