Compare commits
1192 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1be1e2e638 | ||
|
|
45bc9e0de4 | ||
|
|
3334e78fa3 | ||
|
|
27fb1bfdee | ||
|
|
845ae31e5d | ||
|
|
11a5b91a1a | ||
|
|
5eab464987 | ||
|
|
a00d00eb94 | ||
|
|
9bc326909f | ||
|
|
8559841677 | ||
|
|
0650e0e1d5 | ||
|
|
43b6496274 | ||
|
|
9181bc1f70 | ||
|
|
48e021ea6b | ||
|
|
107752df65 | ||
|
|
bd0c60364a | ||
|
|
76662d5dd7 | ||
|
|
be47b688c7 | ||
|
|
cc18f92cf3 | ||
|
|
572a6193e7 | ||
|
|
914c6f0921 | ||
|
|
3f02feeff3 | ||
|
|
57bb77c060 | ||
|
|
b19b56c341 | ||
|
|
b43b19ba54 | ||
|
|
14805002d3 | ||
|
|
83bb97ab13 | ||
|
|
79a1ba32d5 | ||
|
|
ff1c43a791 | ||
|
|
b608b116cc | ||
|
|
2c3b60f4c9 | ||
|
|
a6b8642134 | ||
|
|
90b80662c6 | ||
|
|
dcefc6bf3c | ||
|
|
601e25fb2f | ||
|
|
0bebec19f0 | ||
|
|
707ea94234 | ||
|
|
8e1fe769e4 | ||
|
|
4b36e97dce | ||
|
|
f0df725c5a | ||
|
|
009675c825 | ||
|
|
3ed86aa3d0 | ||
|
|
f31dea4bd6 | ||
|
|
d37c50a2b3 | ||
|
|
693d20516b | ||
|
|
65d89b99d1 | ||
|
|
a119ef86ea | ||
|
|
c8283cebde | ||
|
|
6c8b042548 | ||
|
|
c42f360f57 | ||
|
|
20c21caccf | ||
|
|
54388ffd16 | ||
|
|
99a2519816 | ||
|
|
d113b93139 | ||
|
|
5ab6d25880 | ||
|
|
0767cb8443 | ||
|
|
428ee19cae | ||
|
|
3e00dc346f | ||
|
|
cf2f0b2d1c | ||
|
|
70f507e1af | ||
|
|
befabc6b99 | ||
|
|
ee69abb78f | ||
|
|
8901f7be62 | ||
|
|
4e6bbbc8cc | ||
|
|
d70f346f53 | ||
|
|
3efb2fdeda | ||
|
|
ed590966a3 | ||
|
|
a2f39a34c5 | ||
|
|
5a10631023 | ||
|
|
4072115e5a | ||
|
|
7cad265b7a | ||
|
|
f8b5733112 | ||
|
|
10796a2910 | ||
|
|
abff1398c2 | ||
|
|
b40f60c405 | ||
|
|
67236f6aac | ||
|
|
00de24b16e | ||
|
|
5976d1fa07 | ||
|
|
f14bed4532 | ||
|
|
1ee05189f0 | ||
|
|
0000252ce4 | ||
|
|
ca0d972cdb | ||
|
|
0336555773 | ||
|
|
dd9cd9528f | ||
|
|
edb06826b4 | ||
|
|
c02b15b371 | ||
|
|
63ef760c69 | ||
|
|
3fa703c034 | ||
|
|
4d78747c40 | ||
|
|
67572dff6d | ||
|
|
e76d5ff98a | ||
|
|
011ea60db4 | ||
|
|
6445309de4 | ||
|
|
6e9c2c36da | ||
|
|
18eeea2f62 | ||
|
|
02b6914212 | ||
|
|
79096e1161 | ||
|
|
fc2e80cfe0 | ||
|
|
5f8d69d72e | ||
|
|
7916aafffb | ||
|
|
1b1ed39c7d | ||
|
|
234a360a7a | ||
|
|
b864b3b926 | ||
|
|
ad34c989de | ||
|
|
7148de3252 | ||
|
|
927acf9579 | ||
|
|
33074cfab3 | ||
|
|
ba9b0410c9 | ||
|
|
a754a04e2b | ||
|
|
9e4b57fb43 | ||
|
|
09fd299f96 | ||
|
|
09e13022c2 | ||
|
|
52cbfebcdd | ||
|
|
d6a2d6369a | ||
|
|
a12f58be57 | ||
|
|
ee518350c5 | ||
|
|
3987a679f9 | ||
|
|
2bb25e766b | ||
|
|
00c763bc10 | ||
|
|
cac5881bbb | ||
|
|
bd9c6e613e | ||
|
|
20f10673b9 | ||
|
|
1fac7bf1ba | ||
|
|
aaf265881e | ||
|
|
f8307635ad | ||
|
|
1aa3b7dc28 | ||
|
|
57904c0f97 | ||
|
|
bdccf72338 | ||
|
|
800473a8bc | ||
|
|
e6ab389f9e | ||
|
|
6614398ab4 | ||
|
|
1dc6fee781 | ||
|
|
3357ed096b | ||
|
|
1064636b3d | ||
|
|
60b7ef5a55 | ||
|
|
497c955a4b | ||
|
|
5d54310d76 | ||
|
|
44cf1e2f57 | ||
|
|
743b4b0d97 | ||
|
|
6de43855f8 | ||
|
|
9a0ceef166 | ||
|
|
0501b46d48 | ||
|
|
ee3004d292 | ||
|
|
5c8e604f56 | ||
|
|
bc0836623c | ||
|
|
23cdac02ee | ||
|
|
302c8ae24c | ||
|
|
34120f4201 | ||
|
|
e399ed8439 | ||
|
|
ef7b762e48 | ||
|
|
00daebc161 | ||
|
|
98d1031552 | ||
|
|
b791362871 | ||
|
|
719fdb1b11 | ||
|
|
3ff5699b4b | ||
|
|
33909d9df3 | ||
|
|
d85a3e087b | ||
|
|
551899c24e | ||
|
|
3aaa2cfb75 | ||
|
|
9d1300c3e7 | ||
|
|
793cc43d4c | ||
|
|
6a3294e476 | ||
|
|
e9dc21d88a | ||
|
|
12976d42df | ||
|
|
1dc2b349c6 | ||
|
|
92eaf636ca | ||
|
|
9af436b999 | ||
|
|
88ee68d0c6 | ||
|
|
75c96bd968 | ||
|
|
baea3997d2 | ||
|
|
7ca0db17ea | ||
|
|
866999e454 | ||
|
|
b7bfb9a207 | ||
|
|
9badef27ac | ||
|
|
d856595b8e | ||
|
|
fe7c26a741 | ||
|
|
f251dfc5ce | ||
|
|
9be8062c10 | ||
|
|
370098dbf4 | ||
|
|
32acd293fd | ||
|
|
aa8e185e03 | ||
|
|
86603bb9c5 | ||
|
|
7b1e173f51 | ||
|
|
85d5d61bc7 | ||
|
|
2c17260ba8 | ||
|
|
c54f1aa8f0 | ||
|
|
625ea58122 | ||
|
|
623c7f9432 | ||
|
|
d291c34f51 | ||
|
|
6cac6c917f | ||
|
|
12b563b974 | ||
|
|
72a14c67af | ||
|
|
4c01d73fb7 | ||
|
|
10dd5d1a95 | ||
|
|
439c541fd3 | ||
|
|
200e04a767 | ||
|
|
a533ca87e6 | ||
|
|
4bccbe6e1c | ||
|
|
d0562085df | ||
|
|
f5e65749b4 | ||
|
|
d3da459d45 | ||
|
|
7f8868b7d8 | ||
|
|
364379b7b2 | ||
|
|
0205475fa9 | ||
|
|
e9d2af9174 | ||
|
|
b169424089 | ||
|
|
7bf1e192ec | ||
|
|
023e45b896 | ||
|
|
0fe62a93df | ||
|
|
0373e0822d | ||
|
|
a2e21f9b5c | ||
|
|
7d778b75f7 | ||
|
|
9e9dbea717 | ||
|
|
d99a7b82f7 | ||
|
|
cb5af0b33b | ||
|
|
6eec9ac0a4 | ||
|
|
1eca973cbf | ||
|
|
fb0d8f3f30 | ||
|
|
501d424d1f | ||
|
|
475dc17bc8 | ||
|
|
ed173b8295 | ||
|
|
1b368be367 | ||
|
|
66a83d5cdb | ||
|
|
81bee0f11e | ||
|
|
e1076085d9 | ||
|
|
aaf845d02e | ||
|
|
ed5bb0ba92 | ||
|
|
3158bfe605 | ||
|
|
85b6c4aa15 | ||
|
|
60bddae64c | ||
|
|
e0bb04c915 | ||
|
|
c25e826bb5 | ||
|
|
07ddc85a46 | ||
|
|
e88507c999 | ||
|
|
e2dfee208f | ||
|
|
c575d6f7de | ||
|
|
036d5a8233 | ||
|
|
e6d7f15762 | ||
|
|
a1d4427c8b | ||
|
|
682351a131 | ||
|
|
ff0c4516db | ||
|
|
ee12442b8d | ||
|
|
2033e05b6b | ||
|
|
6bc564e887 | ||
|
|
b3b8d4dd6e | ||
|
|
b88bccae6e | ||
|
|
fbd8a13d54 | ||
|
|
0f545cfa96 | ||
|
|
76c883dc43 | ||
|
|
a8b671bc29 | ||
|
|
a5919ca363 | ||
|
|
89016da21e | ||
|
|
c3759c6d83 | ||
|
|
044fb9761e | ||
|
|
ad2e648b33 | ||
|
|
ad25a776cc | ||
|
|
9039df4993 | ||
|
|
60cf4fe49f | ||
|
|
9470e3cd27 | ||
|
|
d274d1568a | ||
|
|
2a870f8a82 | ||
|
|
5974023b7f | ||
|
|
02aa8c2c50 | ||
|
|
6e6171fead | ||
|
|
066f27792f | ||
|
|
8cc3284106 | ||
|
|
8d71346143 | ||
|
|
5b944d20ac | ||
|
|
9c645b99e2 | ||
|
|
e2cd782d3a | ||
|
|
4813cf5cfd | ||
|
|
025e5099d2 | ||
|
|
4d59a1ef9b | ||
|
|
eaa5bcf7d2 | ||
|
|
a888440922 | ||
|
|
62b369ee39 | ||
|
|
c110c4e028 | ||
|
|
bc759efdc3 | ||
|
|
fe3831e0fe | ||
|
|
b0cebec324 | ||
|
|
a66d3fe3f0 | ||
|
|
5190f9566b | ||
|
|
b00f3c60f6 | ||
|
|
a70f885113 | ||
|
|
1ec1fe64e8 | ||
|
|
68eda79357 | ||
|
|
b95d435a6a | ||
|
|
ac6b7c3354 | ||
|
|
cfabdf9138 | ||
|
|
56e3d8de09 | ||
|
|
bbccb4484a | ||
|
|
e879b0697c | ||
|
|
e92266f2c8 | ||
|
|
01c7fb14bc | ||
|
|
23d0613879 | ||
|
|
407c2407d1 | ||
|
|
93c5d2dc71 | ||
|
|
2809794964 | ||
|
|
08b55c3347 | ||
|
|
52300e6069 | ||
|
|
a7ac6acaa2 | ||
|
|
4436a202ff | ||
|
|
34d505ad14 | ||
|
|
ea956026c8 | ||
|
|
aea298b3dc | ||
|
|
c67fe17b4e | ||
|
|
f907255672 | ||
|
|
8f95743502 | ||
|
|
8744534c28 | ||
|
|
c278d86614 | ||
|
|
fa2281f723 | ||
|
|
a3eece4fef | ||
|
|
7a6cf5a27c | ||
|
|
dd26bd2306 | ||
|
|
cbba6d101a | ||
|
|
fa2e3ac2c1 | ||
|
|
5c434753ce | ||
|
|
d29b0edcc7 | ||
|
|
967e32f4a2 | ||
|
|
947741660b | ||
|
|
97ce61eef0 | ||
|
|
17e13c4dbd | ||
|
|
b1a2c4e9c8 | ||
|
|
bd30e983e3 | ||
|
|
22d92e4ad6 | ||
|
|
531eaa8f06 | ||
|
|
8569d43a7a | ||
|
|
604a73d325 | ||
|
|
7594b1f041 | ||
|
|
fd5cafb26d | ||
|
|
6ab9380b29 | ||
|
|
4a5d64355c | ||
|
|
2206e008ea | ||
|
|
861bc03e2d | ||
|
|
f115895d30 | ||
|
|
cc8cef1936 | ||
|
|
a0033f6b61 | ||
|
|
cb5744dcaf | ||
|
|
1ddd6d30b8 | ||
|
|
30c8d75674 | ||
|
|
8e7b44f720 | ||
|
|
dfff371f84 | ||
|
|
eb571fdc40 | ||
|
|
757178341d | ||
|
|
01df475852 | ||
|
|
6b3be150f1 | ||
|
|
9ebdc51d3a | ||
|
|
42e81ad0a6 | ||
|
|
55ec898953 | ||
|
|
0644ceba1b | ||
|
|
50af7a2f46 | ||
|
|
c455d14209 | ||
|
|
8fb9d31617 | ||
|
|
8562b8cf33 | ||
|
|
aff9a3e0d9 | ||
|
|
001671ed79 | ||
|
|
4e7ab4842c | ||
|
|
a6091a7e43 | ||
|
|
6da148cca8 | ||
|
|
df9cf88163 | ||
|
|
32fe108c0a | ||
|
|
8fcca9c8cf | ||
|
|
02f77bc120 | ||
|
|
aa3ff09ad9 | ||
|
|
f26b45294d | ||
|
|
3b6d7d8cb1 | ||
|
|
e9a2549955 | ||
|
|
3aa19122f4 | ||
|
|
fc820570b7 | ||
|
|
3a1f05e331 | ||
|
|
7912f585a3 | ||
|
|
9468056c0f | ||
|
|
7cc83cc2f6 | ||
|
|
5b975de234 | ||
|
|
b6cef12534 | ||
|
|
07651480fa | ||
|
|
9e649b87b5 | ||
|
|
af89249dea | ||
|
|
f4e970f374 | ||
|
|
8ae4627941 | ||
|
|
0501e70375 | ||
|
|
a377c8d04f | ||
|
|
02a73f0138 | ||
|
|
18581f345b | ||
|
|
63b8e4d6a0 | ||
|
|
cbedd712db | ||
|
|
b22e37e0c6 | ||
|
|
9b0e9794cb | ||
|
|
5e25182c98 | ||
|
|
9947e5111c | ||
|
|
d2a15a7377 | ||
|
|
f2efc9c554 | ||
|
|
34653c711b | ||
|
|
e252ea83e0 | ||
|
|
439d216634 | ||
|
|
9f5113a920 | ||
|
|
c1e24d5344 | ||
|
|
212af07e27 | ||
|
|
68f374ac9a | ||
|
|
d35c668f5c | ||
|
|
2150ffc701 | ||
|
|
ca434f7f26 | ||
|
|
a8ff5f06b5 | ||
|
|
561b2e7566 | ||
|
|
4a3583da95 | ||
|
|
4be9eebf07 | ||
|
|
a260d35dc1 | ||
|
|
558189f763 | ||
|
|
c2eb6ee301 | ||
|
|
68f79526bb | ||
|
|
be78da6c40 | ||
|
|
92b5a1931e | ||
|
|
babd7e7526 | ||
|
|
8ad9b8a939 | ||
|
|
a78684c340 | ||
|
|
7309ed0a5b | ||
|
|
9515a5ce8b | ||
|
|
955aff66df | ||
|
|
db56d238fd | ||
|
|
05a723246e | ||
|
|
2c39d4729a | ||
|
|
16a7dc10e0 | ||
|
|
ce4ba7c99c | ||
|
|
4ffe74643e | ||
|
|
8b1cee845b | ||
|
|
f5cbbb3fde | ||
|
|
6882bdf561 | ||
|
|
6ea9a61cf3 | ||
|
|
3ee4c96f13 | ||
|
|
5745961194 | ||
|
|
e01253d54d | ||
|
|
0c1a42d4f3 | ||
|
|
237b8dcd06 | ||
|
|
047a0b3d88 | ||
|
|
585985edb3 | ||
|
|
d30fa00adc | ||
|
|
38c1513af6 | ||
|
|
ba29ce648c | ||
|
|
018eda618b | ||
|
|
20f1e5991a | ||
|
|
192fd78ca2 | ||
|
|
597836c3a2 | ||
|
|
6c7bd67c04 | ||
|
|
41270434fe | ||
|
|
b677d7e2e8 | ||
|
|
8e03bbb422 | ||
|
|
27005c7d6a | ||
|
|
b6e394dc80 | ||
|
|
9f6680a1fa | ||
|
|
db0aaf18e6 | ||
|
|
bb3220c3de | ||
|
|
c51f2b82e4 | ||
|
|
552732b5d7 | ||
|
|
3165c376e2 | ||
|
|
dac2b4a281 | ||
|
|
39f83afefe | ||
|
|
0ce95830c8 | ||
|
|
2f37961661 | ||
|
|
db14ef3cb5 | ||
|
|
acb65d565a | ||
|
|
a18cd7c00a | ||
|
|
2de903ca35 | ||
|
|
63c3b8ed19 | ||
|
|
6717665ab0 | ||
|
|
41a8496716 | ||
|
|
0f1f2c1b29 | ||
|
|
b389a6f4fc | ||
|
|
9ef9fce589 | ||
|
|
7b3225d0d8 | ||
|
|
37733edc4b | ||
|
|
44d7e8dde1 | ||
|
|
4839075c28 | ||
|
|
6b4ddaaef2 | ||
|
|
a18f398ac0 | ||
|
|
4dcce14051 | ||
|
|
db4544711a | ||
|
|
a246d0f280 | ||
|
|
1800017a9a | ||
|
|
218e41a435 | ||
|
|
a000adeed0 | ||
|
|
43113bc01f | ||
|
|
5f0bf1445a | ||
|
|
2580ea1583 | ||
|
|
2473b2c881 | ||
|
|
9d018d44b9 | ||
|
|
db67f16ac6 | ||
|
|
77616bebae | ||
|
|
fcccfced23 | ||
|
|
8bc215ccf6 | ||
|
|
d8d8e62793 | ||
|
|
b0e89d4c57 | ||
|
|
da6f1b6f25 | ||
|
|
2f2952c658 | ||
|
|
8bc56bf2fc | ||
|
|
9c1ce5afe8 | ||
|
|
3cd10b2358 | ||
|
|
f369bd3e3d | ||
|
|
fefe7c4a7b | ||
|
|
9c92e3d185 | ||
|
|
d343d13ac6 | ||
|
|
917f388852 | ||
|
|
aef02aa174 | ||
|
|
ed1fa89117 | ||
|
|
a5d4f7fbd9 | ||
|
|
ddffb1b451 | ||
|
|
bc85441f7d | ||
|
|
b259b25ce4 | ||
|
|
f8edda8479 | ||
|
|
687941390e | ||
|
|
babfb17465 | ||
|
|
517d2e0109 | ||
|
|
01123854b4 | ||
|
|
317a026616 | ||
|
|
390c256c38 | ||
|
|
63c33bfa43 | ||
|
|
de365c8e92 | ||
|
|
50db7da947 | ||
|
|
e848e6d009 | ||
|
|
df0b5e40db | ||
|
|
006b8a5c29 | ||
|
|
8d10de8b4f | ||
|
|
169c55c688 | ||
|
|
9b21831440 | ||
|
|
94db37e541 | ||
|
|
d9838053df | ||
|
|
d8a9572930 | ||
|
|
3ab3050992 | ||
|
|
75984f347b | ||
|
|
525c2530d5 | ||
|
|
5e327e41a6 | ||
|
|
469d771a59 | ||
|
|
6bc8c87bc1 | ||
|
|
6ab832d099 | ||
|
|
3a10497a6f | ||
|
|
55825d760b | ||
|
|
6bb0e4b036 | ||
|
|
44d53bed48 | ||
|
|
f396c677a2 | ||
|
|
3cd88abec5 | ||
|
|
ea91fb91b0 | ||
|
|
d0ca610a96 | ||
|
|
d0ba59a44d | ||
|
|
d7742b6c17 | ||
|
|
27027cf40d | ||
|
|
c2a7ad5c01 | ||
|
|
dfb86f41f8 | ||
|
|
946ce1672d | ||
|
|
f9c17bd2d8 | ||
|
|
cccfade374 | ||
|
|
5a65548662 | ||
|
|
fa8a8ba7dc | ||
|
|
769ed554b0 | ||
|
|
5f9a963ef6 | ||
|
|
d93a997800 | ||
|
|
f9be138aab | ||
|
|
c7f0bc92ae | ||
|
|
c2f3731873 | ||
|
|
7b4f2dc72f | ||
|
|
84677903a6 | ||
|
|
e1e02d785f | ||
|
|
80c7b91637 | ||
|
|
07c3ac4de1 | ||
|
|
9da45f7bbd | ||
|
|
6138f57bf9 | ||
|
|
2cbe8dfebd | ||
|
|
e393ce1477 | ||
|
|
ae5a2d06b4 | ||
|
|
f8dd616545 | ||
|
|
63cbbd071a | ||
|
|
6d015d32aa | ||
|
|
30c9f90bf8 | ||
|
|
783e7cfe0c | ||
|
|
45dae7c2cf | ||
|
|
469028dca5 | ||
|
|
ae9ba340af | ||
|
|
783cf6fe74 | ||
|
|
603825a4f9 | ||
|
|
a3a66df007 | ||
|
|
bb06f6f8cf | ||
|
|
6b501219de | ||
|
|
57192bd5ae | ||
|
|
9f8685c14e | ||
|
|
ed322ac666 | ||
|
|
8d4dba02c9 | ||
|
|
a6685b1bad | ||
|
|
56265a9b98 | ||
|
|
c6f68e361d | ||
|
|
6ae4b360fd | ||
|
|
6def863470 | ||
|
|
e98bde3396 | ||
|
|
736e3f11f7 | ||
|
|
5b7e0a858d | ||
|
|
7699153c66 | ||
|
|
a70fd758ec | ||
|
|
e99bf302b6 | ||
|
|
64854fc850 | ||
|
|
e77cfd6487 | ||
|
|
e778ac3e21 | ||
|
|
aedcf5b58c | ||
|
|
5b821d3b13 | ||
|
|
f0720f3ce5 | ||
|
|
581fe1ed55 | ||
|
|
7a4e0687fc | ||
|
|
422b0fc0f1 | ||
|
|
260756d5b9 | ||
|
|
9b22035967 | ||
|
|
c96090ca2c | ||
|
|
14be70aa51 | ||
|
|
71980feca1 | ||
|
|
d94df3d9be | ||
|
|
d213223044 | ||
|
|
8e0c537392 | ||
|
|
005d0243df | ||
|
|
7de7a1f8f3 | ||
|
|
f64534651a | ||
|
|
164094968f | ||
|
|
6be6f74d5c | ||
|
|
ac2fdc87ae | ||
|
|
fe2ae8edc8 | ||
|
|
0ed39fc805 | ||
|
|
7111301fa4 | ||
|
|
c36a373def | ||
|
|
e060026ec8 | ||
|
|
8d03e5af9f | ||
|
|
938c0d1866 | ||
|
|
6e8b50ede9 | ||
|
|
4a197efcb2 | ||
|
|
e2c3bc4124 | ||
|
|
57ed577459 | ||
|
|
4656850c04 | ||
|
|
c537c91d75 | ||
|
|
ee58d53fc8 | ||
|
|
776ef1a31e | ||
|
|
6ed789e88b | ||
|
|
bc27198d3e | ||
|
|
4c35084f27 | ||
|
|
394c948130 | ||
|
|
6b515bc736 | ||
|
|
25416ae6d8 | ||
|
|
85cca55930 | ||
|
|
b944ac6286 | ||
|
|
9809a07bf1 | ||
|
|
e9831cec2f | ||
|
|
04c01f6297 | ||
|
|
86e19bb677 | ||
|
|
484ddd897d | ||
|
|
9e7404e76d | ||
|
|
6ce9404c16 | ||
|
|
85c6529cb5 | ||
|
|
6c983cbf45 | ||
|
|
1ac4fd8a61 | ||
|
|
094db23a03 | ||
|
|
b6f615b535 | ||
|
|
d6d0a60d16 | ||
|
|
6f1035269d | ||
|
|
396e404eeb | ||
|
|
79e941df0d | ||
|
|
cb76acbd9f | ||
|
|
3d2fc78852 | ||
|
|
3e3c119555 | ||
|
|
685a92e09a | ||
|
|
1e0b03d47f | ||
|
|
6765c77c38 | ||
|
|
644ada1279 | ||
|
|
c9f9a9c917 | ||
|
|
bcc231d3ba | ||
|
|
7cecade3a1 | ||
|
|
a9ddb39d5f | ||
|
|
a02c06bafd | ||
|
|
e85881231f | ||
|
|
8d13f3da95 | ||
|
|
276daae672 | ||
|
|
546e7bd6b1 | ||
|
|
b69c4de757 | ||
|
|
33b8521aee | ||
|
|
c0ad4f705e | ||
|
|
a6f4ab3735 | ||
|
|
8ae754a7d2 | ||
|
|
313ade3386 | ||
|
|
b331e771aa | ||
|
|
bfe5c6f14f | ||
|
|
363a3e40ea | ||
|
|
b213956cea | ||
|
|
efbc968ca8 | ||
|
|
9a601d49ef | ||
|
|
a589353bb3 | ||
|
|
f38f8d66fb | ||
|
|
decad9b429 | ||
|
|
9c531904ad | ||
|
|
2b1de93249 | ||
|
|
5423196f4c | ||
|
|
6fb477097c | ||
|
|
df669592ed | ||
|
|
74fcd3f881 | ||
|
|
d523424fda | ||
|
|
42267f94c5 | ||
|
|
4d382a0302 | ||
|
|
1343996fec | ||
|
|
8a877c5b29 | ||
|
|
59f1a04ba5 | ||
|
|
d5a62c9a5c | ||
|
|
f1c6af3121 | ||
|
|
0977dfcde8 | ||
|
|
6b2cd7e8da | ||
|
|
96ce2db949 | ||
|
|
6c25b8326e | ||
|
|
3912768470 | ||
|
|
a17c3eec2a | ||
|
|
d8b59efea9 | ||
|
|
60a81fcb95 | ||
|
|
c73650d967 | ||
|
|
6cfdffda18 | ||
|
|
510ce1a782 | ||
|
|
92c0452b74 | ||
|
|
1eb73f3fea | ||
|
|
270dc7346f | ||
|
|
a6ff0d12bb | ||
|
|
43997f33c8 | ||
|
|
64c91249ef | ||
|
|
7baccf2088 | ||
|
|
7dd7e2ba00 | ||
|
|
67d94774ba | ||
|
|
3e6dc37728 | ||
|
|
2dc5c9152e | ||
|
|
6daf62ebeb | ||
|
|
f9ee4943b1 | ||
|
|
c3e227b625 | ||
|
|
ca390411f3 | ||
|
|
c676361681 | ||
|
|
126fe0abba | ||
|
|
f7d02538f6 | ||
|
|
f982167c0a | ||
|
|
d3a73e4db7 | ||
|
|
5d5b93ed69 | ||
|
|
36498501bf | ||
|
|
3c0e354743 | ||
|
|
f5e655e22a | ||
|
|
af5882bc3e | ||
|
|
3d2921343b | ||
|
|
df47d1be15 | ||
|
|
ef8d77351f | ||
|
|
e18f38af3c | ||
|
|
0e937b5367 | ||
|
|
911c5e971a | ||
|
|
6fd1887e64 | ||
|
|
4059e94aba | ||
|
|
24005c3ed0 | ||
|
|
84af32a7fe | ||
|
|
193680b1ed | ||
|
|
22db37e9da | ||
|
|
4ab696eaa2 | ||
|
|
b7ec642572 | ||
|
|
1e1ccbec52 | ||
|
|
4ceae2a052 | ||
|
|
4e7e842682 | ||
|
|
089d34e866 | ||
|
|
bfb0f2a193 | ||
|
|
894fa25106 | ||
|
|
94f999ec07 | ||
|
|
7a84438925 | ||
|
|
898aaaa11c | ||
|
|
c8682b55e2 | ||
|
|
f776a91d18 | ||
|
|
267adde71b | ||
|
|
95285015df | ||
|
|
0911eea9c0 | ||
|
|
cc5d76b4ee | ||
|
|
be3993b60a | ||
|
|
3487accd99 | ||
|
|
c8e07a4bf8 | ||
|
|
4249a1cadb | ||
|
|
52934d2340 | ||
|
|
329f071b30 | ||
|
|
154ccc6e35 | ||
|
|
49cfa08d25 | ||
|
|
bcc0218200 | ||
|
|
5feabc10ee | ||
|
|
fa03e9e983 | ||
|
|
6d8ae1959c | ||
|
|
d137df24f7 | ||
|
|
d08f3dfd6d | ||
|
|
346496f943 | ||
|
|
2e870836dd | ||
|
|
4066b57a84 | ||
|
|
1f5b26254b | ||
|
|
eb0da23d53 | ||
|
|
4f9e46c8d3 | ||
|
|
1a6d9cb1b0 | ||
|
|
acaa8dd0be | ||
|
|
db6eb9a15b | ||
|
|
1d1f8f91c0 | ||
|
|
04040b95f8 | ||
|
|
142d67f296 | ||
|
|
34de675d87 | ||
|
|
4dd5732125 | ||
|
|
1e788040c5 | ||
|
|
ca57d318da | ||
|
|
03b16ea0ba | ||
|
|
bec2e29c59 | ||
|
|
b4ddc80c99 | ||
|
|
2061873f22 | ||
|
|
254a96e1d3 | ||
|
|
dff5dcea70 | ||
|
|
c7e8d201dc | ||
|
|
471e7cd5a4 | ||
|
|
8cd973739a | ||
|
|
67004a2b12 | ||
|
|
528d07ef37 | ||
|
|
065b301414 | ||
|
|
0e28f7ccb6 | ||
|
|
910b8e6017 | ||
|
|
5f69847698 | ||
|
|
3637c00b51 | ||
|
|
8bdd3feb3f | ||
|
|
85351adfa8 | ||
|
|
fbf50203cc | ||
|
|
18fde60392 | ||
|
|
c2f38ee378 | ||
|
|
a545e3af04 | ||
|
|
c039177958 | ||
|
|
86e72c0a43 | ||
|
|
177826a458 | ||
|
|
133c838902 | ||
|
|
da3d588276 | ||
|
|
9766c47042 | ||
|
|
db66572127 | ||
|
|
c3e132ade5 | ||
|
|
b194140c52 | ||
|
|
d048791355 | ||
|
|
005fe25c75 | ||
|
|
aac7cf576e | ||
|
|
fe1f9c916f | ||
|
|
9e3709fb09 | ||
|
|
ee54733e7b | ||
|
|
e913433934 | ||
|
|
483697b416 | ||
|
|
dcadfa883d | ||
|
|
bfd6eef94c | ||
|
|
69be985153 | ||
|
|
4d625c21e6 | ||
|
|
7663c9f902 | ||
|
|
c3279fd9b2 | ||
|
|
7443cba9b5 | ||
|
|
49301ccf6d | ||
|
|
6e222bd809 | ||
|
|
8c522a76af | ||
|
|
7fe75d50a0 | ||
|
|
0e84c4dcbf | ||
|
|
82d9d4b77f | ||
|
|
525aadf14c | ||
|
|
b72fa66c77 | ||
|
|
f2e05d55d0 | ||
|
|
1e9376bea4 | ||
|
|
0805e8667e | ||
|
|
f8eb21d63a | ||
|
|
ed00632796 | ||
|
|
1277e211ca | ||
|
|
5c663d389d | ||
|
|
411e5b8c97 | ||
|
|
327688504c | ||
|
|
b9a7fd1547 | ||
|
|
9825529600 | ||
|
|
4310d51b7e | ||
|
|
c04a638d1a | ||
|
|
ffb5c8520f | ||
|
|
533498f4f0 | ||
|
|
2768c280c9 | ||
|
|
4e8832de4f | ||
|
|
4b6109746e | ||
|
|
c6daf1a896 | ||
|
|
d2a4db8887 | ||
|
|
abf0055634 | ||
|
|
9806fa6f92 | ||
|
|
c4fdc40f82 | ||
|
|
1bb7e4894e | ||
|
|
d081855849 | ||
|
|
ab0cb4f73b | ||
|
|
49a72f216f | ||
|
|
0c8521a856 | ||
|
|
89fa4a27ab | ||
|
|
0d2edbfa36 | ||
|
|
996961a33f | ||
|
|
e9251fe0a8 | ||
|
|
965400a481 | ||
|
|
310dd3f5c0 | ||
|
|
91d4d9e385 | ||
|
|
88094b1142 | ||
|
|
c287239236 | ||
|
|
0a17306666 | ||
|
|
c506f43613 | ||
|
|
7e09a9f84a | ||
|
|
f733307991 | ||
|
|
bb5abd4cc7 | ||
|
|
18d683af15 | ||
|
|
6793d65417 | ||
|
|
776f0ec16d | ||
|
|
0523fbc6be | ||
|
|
95afbb1a11 | ||
|
|
7d550ea025 | ||
|
|
1ac6e8aef6 | ||
|
|
b640ef099c | ||
|
|
a688cdf7af | ||
|
|
0abfcf53e4 | ||
|
|
e0dfc37ef5 | ||
|
|
3f52e32786 | ||
|
|
0dbcb834ef | ||
|
|
6ad9b2558a | ||
|
|
6726d12587 | ||
|
|
41c0dbb767 | ||
|
|
0d03242cfc | ||
|
|
8a6775ad14 | ||
|
|
2674ce89ea | ||
|
|
802cc6fb26 | ||
|
|
b0de7fc645 | ||
|
|
223b1fd118 | ||
|
|
0ad38f33bc | ||
|
|
894d65898d | ||
|
|
7c72035b87 | ||
|
|
1829e36541 | ||
|
|
d974076fe1 | ||
|
|
5eb94f785b | ||
|
|
173b3eb654 | ||
|
|
c80126ab41 | ||
|
|
7e9fd6719c | ||
|
|
b76899c318 | ||
|
|
a2b995a671 | ||
|
|
12463ce1b0 | ||
|
|
9b78112814 | ||
|
|
ad721cf154 | ||
|
|
96f7cc774a | ||
|
|
843813c0f3 | ||
|
|
94460305f3 | ||
|
|
f7329d0d9f | ||
|
|
b04be6834a | ||
|
|
791cf73bcb | ||
|
|
92d1b61b5d | ||
|
|
7f5b5a6aa8 | ||
|
|
dd49885a45 | ||
|
|
eec42da179 | ||
|
|
074587e22a | ||
|
|
9a4e3b1ffa | ||
|
|
f76c806687 | ||
|
|
f21e5919a1 | ||
|
|
1dce67f41b | ||
|
|
8020b0fcfb | ||
|
|
fa57fce6c9 | ||
|
|
08e9240efd | ||
|
|
41c38375b5 | ||
|
|
34c3c46056 | ||
|
|
bb20d89469 | ||
|
|
62ccd79436 | ||
|
|
1c877da6fd | ||
|
|
ff9631b94f | ||
|
|
255bbe1477 | ||
|
|
6c11c0c5a6 | ||
|
|
1ac15af66b | ||
|
|
473fe3a487 | ||
|
|
b01a7b7207 | ||
|
|
beaf89351c | ||
|
|
57eafb5545 | ||
|
|
6434945ee2 | ||
|
|
fd1fbf9c54 | ||
|
|
1352f0e964 | ||
|
|
9a5940cede | ||
|
|
493a383497 | ||
|
|
9763688eca | ||
|
|
d4855d203c | ||
|
|
620831145c | ||
|
|
02c4a51493 | ||
|
|
fbce2901f9 | ||
|
|
ba0aeedfe8 | ||
|
|
3ec380e500 | ||
|
|
0058bafdee | ||
|
|
940367cf2c | ||
|
|
78845b4767 | ||
|
|
d55c687c2e | ||
|
|
e749817ebb | ||
|
|
8eb30c2f02 | ||
|
|
0f8ac99dfc | ||
|
|
380c05baee | ||
|
|
4ca24d9a6f | ||
|
|
e73d250a1d | ||
|
|
adc7ecc159 | ||
|
|
81e4ab54dd | ||
|
|
13823326ed | ||
|
|
c8cfd72cd5 | ||
|
|
0e8ab4f811 | ||
|
|
c0e4e47aba | ||
|
|
9bad4c6cc8 | ||
|
|
8e8274eca7 | ||
|
|
797fd0884f | ||
|
|
5d54332bb0 | ||
|
|
a922042d2a | ||
|
|
c3d5832300 | ||
|
|
959c07688e | ||
|
|
8172518a05 | ||
|
|
07a11744d5 | ||
|
|
3120d6c3e1 | ||
|
|
67b7257660 | ||
|
|
cb66108f4d | ||
|
|
ac56d1c24d | ||
|
|
867eee8499 | ||
|
|
1ab6552f73 | ||
|
|
60c5a04ad1 | ||
|
|
2bb882fdec | ||
|
|
a0f5bdc861 | ||
|
|
4a2b1c09d1 | ||
|
|
6fd4c8951f | ||
|
|
b2dd367f8e | ||
|
|
7141f20e88 | ||
|
|
f6a678c60a | ||
|
|
3cf1f4c972 | ||
|
|
271879331e | ||
|
|
493a70b45c | ||
|
|
b64a526223 | ||
|
|
1a53cbe31a | ||
|
|
34f865d6e5 | ||
|
|
30fc5b97da | ||
|
|
059deda653 | ||
|
|
c813a60b6f | ||
|
|
907e6be7fd | ||
|
|
4f9e51897e | ||
|
|
4a10108d11 | ||
|
|
3f358815c9 | ||
|
|
bac65cb793 | ||
|
|
a20d4811d2 | ||
|
|
7da3f7e57d | ||
|
|
42520f3edf | ||
|
|
b75c6c4158 | ||
|
|
da40228e28 | ||
|
|
91dc954116 | ||
|
|
e17931c273 | ||
|
|
8006d76f5d | ||
|
|
fde2487249 | ||
|
|
b62ebec01e | ||
|
|
66b9842ac9 | ||
|
|
fa1f12776b | ||
|
|
3f64bd6b32 | ||
|
|
c875ba5942 | ||
|
|
0bd417531d | ||
|
|
80595dc426 | ||
|
|
ceb4e47ef1 | ||
|
|
4025117c23 | ||
|
|
d56c477e5f | ||
|
|
717f36c819 | ||
|
|
e8d06ba336 | ||
|
|
81390970cd | ||
|
|
4c77b76406 | ||
|
|
a1e818ac5e | ||
|
|
81526ed0d9 | ||
|
|
83ff3fda25 | ||
|
|
aa4339ca41 | ||
|
|
b22aebf826 | ||
|
|
364cc862f7 | ||
|
|
05ea7f4201 | ||
|
|
8b3289c880 | ||
|
|
fc2f5ddbb2 | ||
|
|
21e1ebf92c | ||
|
|
bf63cc7f34 | ||
|
|
5d7149d6cf | ||
|
|
c63e3aa5d5 | ||
|
|
3ac504288d | ||
|
|
016f45e8d3 | ||
|
|
45ada28e38 | ||
|
|
b0937b624b | ||
|
|
bfa6e76141 | ||
|
|
f0dc9fa748 | ||
|
|
412209b0d1 | ||
|
|
3d55fc5ea6 | ||
|
|
495332ccd1 | ||
|
|
285e1f1bbf | ||
|
|
d3979a0d1f | ||
|
|
c87f30c25e | ||
|
|
d328815939 | ||
|
|
ca5843cec2 | ||
|
|
1d57f7be5c | ||
|
|
68eb4c6c8d | ||
|
|
eaf9fa5e3f | ||
|
|
60a7565870 | ||
|
|
78df35b570 | ||
|
|
162fb42d62 | ||
|
|
7d0165c767 | ||
|
|
7ef1e5f970 | ||
|
|
94f9cf49fb | ||
|
|
bed0a0ebd1 | ||
|
|
0c254184d6 | ||
|
|
306c551fdf | ||
|
|
9c6b9a69c3 | ||
|
|
2cb920d5d9 | ||
|
|
9bf16ae1ba | ||
|
|
3867fc71ee | ||
|
|
3348a0669e | ||
|
|
030687c989 | ||
|
|
a273649227 | ||
|
|
e6a79f7bc7 | ||
|
|
2c08d9d3dc | ||
|
|
673fc374ed | ||
|
|
511e061c0c | ||
|
|
55e97e97ce | ||
|
|
aac55275bb | ||
|
|
9aea551d86 | ||
|
|
72334df0c5 | ||
|
|
72e5ec702d | ||
|
|
971269bac8 | ||
|
|
98341f1e9e | ||
|
|
1e66346f29 | ||
|
|
e41cf57454 | ||
|
|
3813f90496 | ||
|
|
24c612e166 | ||
|
|
d993110d96 | ||
|
|
e4b1b64788 | ||
|
|
a1ea9aeeeb | ||
|
|
3aca6b2d6a | ||
|
|
a183360e76 | ||
|
|
7eb94404a3 | ||
|
|
985442dc1c | ||
|
|
95e89a424e | ||
|
|
728ba00be5 | ||
|
|
177a2b0ad9 | ||
|
|
f9907823b8 | ||
|
|
cf9d00dfc2 | ||
|
|
9e8f0bb4f0 | ||
|
|
83f0e2b08b | ||
|
|
b318dec1e0 | ||
|
|
3841cf6d94 | ||
|
|
cdeb41a58c | ||
|
|
4a9f3d9aa9 | ||
|
|
d5d2729237 | ||
|
|
a5ed21ec13 | ||
|
|
afcb70977c | ||
|
|
c9f8a8546e | ||
|
|
f9a8f80485 | ||
|
|
a8380ab5e5 | ||
|
|
430740f537 | ||
|
|
cef12efc04 | ||
|
|
3a38594cd1 | ||
|
|
6c02a38295 | ||
|
|
4e0c7fc226 | ||
|
|
dd938fd693 | ||
|
|
e41f180236 | ||
|
|
b7debf7f0a | ||
|
|
ce1f557cf7 | ||
|
|
9fa86c550a | ||
|
|
89f6348b9c | ||
|
|
faed25bfec | ||
|
|
856dd3a464 | ||
|
|
cb5b791d13 | ||
|
|
1211b105dc | ||
|
|
e9e2777c32 | ||
|
|
123ee18257 | ||
|
|
224069af28 | ||
|
|
5e96fa6a55 | ||
|
|
d773f56aae | ||
|
|
48a3ac53fb | ||
|
|
1d2fe13f28 | ||
|
|
c8127c458f | ||
|
|
2c3bf38c73 | ||
|
|
1778abe4e3 | ||
|
|
c0563f81bc | ||
|
|
028073bd02 | ||
|
|
8394568aa0 | ||
|
|
1b5c33658f | ||
|
|
808a6459b4 | ||
|
|
05821edb41 | ||
|
|
e55ec73aba | ||
|
|
fefe879691 | ||
|
|
bd57e64268 | ||
|
|
66aac5d640 | ||
|
|
f071cecd5c | ||
|
|
6a2ca8f74f | ||
|
|
5529c83920 | ||
|
|
022b948545 | ||
|
|
f99701585f | ||
|
|
76333a382c | ||
|
|
ed8de8b1aa | ||
|
|
e72e8693ef | ||
|
|
f06501ea2b | ||
|
|
e996e0112a | ||
|
|
f6fe06fd12 | ||
|
|
984ce9bd38 | ||
|
|
c7cf493ebd | ||
|
|
9916efbf5e | ||
|
|
0954e0f44b | ||
|
|
c7208b3efa | ||
|
|
262fee4195 | ||
|
|
9f32fd0525 | ||
|
|
8065c4bf53 | ||
|
|
64d449ee57 | ||
|
|
68cb8ceba4 | ||
|
|
ec2b20dcd8 | ||
|
|
552c4de1a0 | ||
|
|
7b3bf986e8 |
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
* text=auto eol=lf
|
||||||
21
.github/CODEOWNERS
vendored
@@ -1,9 +1,24 @@
|
|||||||
# Global
|
# Global
|
||||||
* @knqyf263
|
* @knqyf263
|
||||||
|
|
||||||
|
# Docs
|
||||||
|
/docs/** @knqyf263 @AnaisUrlichs @itaysk
|
||||||
|
/mkdocs.yml @knqyf263 @AnaisUrlichs @itaysk
|
||||||
|
/README.md @knqyf263 @AnaisUrlichs @itaysk
|
||||||
|
|
||||||
# Helm chart
|
# Helm chart
|
||||||
helm/trivy/ @krol3
|
helm/trivy/ @chen-keinan
|
||||||
|
|
||||||
|
# Misconfiguration scanning
|
||||||
|
examples/misconf/ @knqyf263
|
||||||
|
docs/docs/misconfiguration @knqyf263
|
||||||
|
docs/docs/cloud @knqyf263
|
||||||
|
pkg/fanal/analyzer/config @knqyf263
|
||||||
|
pkg/fanal/handler/misconf @knqyf263
|
||||||
|
pkg/cloud @knqyf263
|
||||||
|
pkg/flag/aws_flags.go @knqyf263
|
||||||
|
pkg/flag/misconf_flags.go @knqyf263
|
||||||
|
|
||||||
# Kubernetes scanning
|
# Kubernetes scanning
|
||||||
pkg/k8s/ @josedonizetti @chen-keinan
|
pkg/k8s/ @josedonizetti @chen-keinan @knqyf263
|
||||||
docs/docs/kubernetes/ @josedonizetti @chen-keinan
|
docs/docs/kubernetes/ @josedonizetti @chen-keinan @knqyf263
|
||||||
|
|||||||
53
.github/DISCUSSION_TEMPLATE/show-and-tell.yml
vendored
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
title: "<company name> "
|
||||||
|
labels: ["adopters"]
|
||||||
|
body:
|
||||||
|
- type: textarea
|
||||||
|
id: links
|
||||||
|
attributes:
|
||||||
|
label: "Share Links"
|
||||||
|
description: "If you would like to share a link to your project or company, please paste it below 🌐"
|
||||||
|
value: |
|
||||||
|
...
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
- type: textarea
|
||||||
|
id: logo
|
||||||
|
attributes:
|
||||||
|
label: "Share Logo"
|
||||||
|
description: "If you have a link to your logo, please provide it in the following text-box 🌐"
|
||||||
|
value: |
|
||||||
|
...
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
- type: checkboxes
|
||||||
|
attributes:
|
||||||
|
label: Please select all the scan targets that you are using
|
||||||
|
options:
|
||||||
|
- label: Container Images
|
||||||
|
- label: Filesystem
|
||||||
|
- label: Git Repository
|
||||||
|
- label: Virtual Machine Images
|
||||||
|
- label: Kubernetes
|
||||||
|
- label: AWS
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
- type: checkboxes
|
||||||
|
attributes:
|
||||||
|
label: Which scanners are you using on those scan targets?
|
||||||
|
options:
|
||||||
|
- label: OS packages and software dependencies in use (SBOM)
|
||||||
|
- label: Known vulnerabilities (CVEs)
|
||||||
|
- label: IaC issues and misconfigurations
|
||||||
|
- label: Sensitive information and secrets
|
||||||
|
- label: Software licenses
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
- type: textarea
|
||||||
|
id: info
|
||||||
|
attributes:
|
||||||
|
label: "Additional Information"
|
||||||
|
description: "Please tell us more about your use case of Trivy -- anything that you would like to share 🎉"
|
||||||
|
value: |
|
||||||
|
...
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
2
.github/ISSUE_TEMPLATE/BUG_REPORT.md
vendored
@@ -16,7 +16,7 @@ Briefly describe the problem you are having in a few paragraphs.
|
|||||||
## What happened instead?
|
## What happened instead?
|
||||||
|
|
||||||
|
|
||||||
## Output of run with `-debug`:
|
## Output of run with `--debug`:
|
||||||
|
|
||||||
```
|
```
|
||||||
(paste your output here)
|
(paste your output here)
|
||||||
|
|||||||
60
.github/workflows/canary.yaml
vendored
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
name: Canary build
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'main'
|
||||||
|
paths:
|
||||||
|
- '**.go'
|
||||||
|
- 'go.mod'
|
||||||
|
- 'Dockerfile.canary'
|
||||||
|
- '.github/workflows/canary.yaml'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-binaries:
|
||||||
|
name: Build binaries
|
||||||
|
uses: ./.github/workflows/reusable-release.yaml
|
||||||
|
with:
|
||||||
|
goreleaser_config: goreleaser-canary.yml
|
||||||
|
goreleaser_options: '--snapshot --clean --timeout 60m' # will not release
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
upload-binaries:
|
||||||
|
name: Upload binaries
|
||||||
|
needs: build-binaries # run this job after 'build-binaries' job completes
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Restore Trivy binaries from cache
|
||||||
|
uses: actions/cache@v3.3.1
|
||||||
|
with:
|
||||||
|
path: dist/
|
||||||
|
key: ${{ runner.os }}-bins-${{github.workflow}}-${{github.sha}}
|
||||||
|
|
||||||
|
# Upload artifacts
|
||||||
|
- name: Upload artifacts (trivy_Linux-64bit)
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: trivy_Linux-64bit
|
||||||
|
path: dist/trivy_*_Linux-64bit.tar.gz
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
|
- name: Upload artifacts (trivy_Linux-ARM64)
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: trivy_Linux-ARM64
|
||||||
|
path: dist/trivy_*_Linux-ARM64.tar.gz
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
|
- name: Upload artifacts (trivy_macOS-64bit)
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: trivy_macOS-64bit
|
||||||
|
path: dist/trivy_*_macOS-64bit.tar.gz
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
|
- name: Upload artifacts (trivy_macOS-ARM64)
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: trivy_macOS-ARM64
|
||||||
|
path: dist/trivy_*_macOS-ARM64.tar.gz
|
||||||
|
if-no-files-found: error
|
||||||
4
.github/workflows/mkdocs-dev.yaml
vendored
@@ -9,14 +9,14 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
name: Deploy the dev documentation
|
name: Deploy the dev documentation
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout main
|
- name: Checkout main
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
persist-credentials: true
|
persist-credentials: true
|
||||||
- uses: actions/setup-python@v3
|
- uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: 3.x
|
python-version: 3.x
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
|||||||
6
.github/workflows/mkdocs-latest.yaml
vendored
@@ -11,14 +11,14 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
name: Deploy the latest documentation
|
name: Deploy the latest documentation
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout main
|
- name: Checkout main
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
persist-credentials: true
|
persist-credentials: true
|
||||||
- uses: actions/setup-python@v3
|
- uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: 3.x
|
python-version: 3.x
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
@@ -35,7 +35,7 @@ jobs:
|
|||||||
if: ${{ github.event.inputs.version == '' }}
|
if: ${{ github.event.inputs.version == '' }}
|
||||||
run: |
|
run: |
|
||||||
VERSION=$(echo ${{ github.ref }} | sed -e "s#refs/tags/##g")
|
VERSION=$(echo ${{ github.ref }} | sed -e "s#refs/tags/##g")
|
||||||
mike deploy --push --update-aliases $VERSION latest
|
mike deploy --push --update-aliases ${VERSION%.*} latest
|
||||||
- name: Deploy the latest documents from manual trigger
|
- name: Deploy the latest documents from manual trigger
|
||||||
if: ${{ github.event.inputs.version != '' }}
|
if: ${{ github.event.inputs.version != '' }}
|
||||||
run: mike deploy --push --update-aliases ${{ github.event.inputs.version }} latest
|
run: mike deploy --push --update-aliases ${{ github.event.inputs.version }} latest
|
||||||
|
|||||||
14
.github/workflows/publish-chart.yaml
vendored
@@ -15,8 +15,8 @@ env:
|
|||||||
HELM_REP: helm-charts
|
HELM_REP: helm-charts
|
||||||
GH_OWNER: aquasecurity
|
GH_OWNER: aquasecurity
|
||||||
CHART_DIR: helm/trivy
|
CHART_DIR: helm/trivy
|
||||||
KIND_VERSION: "v0.11.1"
|
KIND_VERSION: "v0.14.0"
|
||||||
KIND_IMAGE: "kindest/node:v1.21.1@sha256:69860bda5563ac81e3c0057d654b5253219618a22ec3a346306239bba8cfa1a6"
|
KIND_IMAGE: "kindest/node:v1.23.6@sha256:b1fa224cc6c7ff32455e0b1fd9cbfd3d3bc87ecaa8fcb06961ed1afb3db0f9ae"
|
||||||
jobs:
|
jobs:
|
||||||
test-chart:
|
test-chart:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
@@ -26,18 +26,18 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Install Helm
|
- name: Install Helm
|
||||||
uses: azure/setup-helm@18bc76811624f360dbd7f18c2d4ecb32c7b87bab
|
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78
|
||||||
with:
|
with:
|
||||||
version: v3.5.0
|
version: v3.5.0
|
||||||
- name: Set up python
|
- name: Set up python
|
||||||
uses: actions/setup-python@v3
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: 3.7
|
python-version: 3.7
|
||||||
- name: Setup Chart Linting
|
- name: Setup Chart Linting
|
||||||
id: lint
|
id: lint
|
||||||
uses: helm/chart-testing-action@dae259e86a35ff09145c0805e2d7dd3f7207064a
|
uses: helm/chart-testing-action@e8788873172cb653a90ca2e819d79d65a66d4e76
|
||||||
- name: Setup Kubernetes cluster (KIND)
|
- name: Setup Kubernetes cluster (KIND)
|
||||||
uses: helm/kind-action@94729529f85113b88f4f819c17ce61382e6d8478
|
uses: helm/kind-action@d8ccf8fb623ce1bb360ae2f45f323d9d5c5e9f00
|
||||||
with:
|
with:
|
||||||
version: ${{ env.KIND_VERSION }}
|
version: ${{ env.KIND_VERSION }}
|
||||||
image: ${{ env.KIND_IMAGE }}
|
image: ${{ env.KIND_IMAGE }}
|
||||||
@@ -45,7 +45,7 @@ jobs:
|
|||||||
run: ct lint-and-install --validate-maintainers=false --charts helm/trivy
|
run: ct lint-and-install --validate-maintainers=false --charts helm/trivy
|
||||||
- name: Run chart-testing (Ingress enabled)
|
- name: Run chart-testing (Ingress enabled)
|
||||||
run: |
|
run: |
|
||||||
sed -i -e '117s,false,'true',g' ./helm/trivy/values.yaml
|
sed -i -e '136s,false,'true',g' ./helm/trivy/values.yaml
|
||||||
ct lint-and-install --validate-maintainers=false --charts helm/trivy
|
ct lint-and-install --validate-maintainers=false --charts helm/trivy
|
||||||
|
|
||||||
publish-chart:
|
publish-chart:
|
||||||
|
|||||||
87
.github/workflows/release.yaml
vendored
@@ -3,76 +3,37 @@ on:
|
|||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- "v*"
|
- "v*"
|
||||||
env:
|
|
||||||
GO_VERSION: "1.18"
|
|
||||||
GH_USER: "aqua-bot"
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
name: Release
|
name: Release
|
||||||
runs-on: ubuntu-18.04 # 20.04 doesn't provide createrepo for now
|
uses: ./.github/workflows/reusable-release.yaml
|
||||||
env:
|
with:
|
||||||
DOCKER_CLI_EXPERIMENTAL: "enabled"
|
goreleaser_config: goreleaser.yml
|
||||||
permissions:
|
goreleaser_options: '--clean --timeout 90m'
|
||||||
id-token: write # For cosign
|
secrets: inherit
|
||||||
packages: write # For GHCR
|
|
||||||
contents: read # Not required for public repositories, but for clarity
|
deploy-packages:
|
||||||
|
name: Deploy rpm/dep packages
|
||||||
|
needs: release # run this job after 'release' job completes
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt-get -y update
|
|
||||||
sudo apt-get -y install rpm reprepro createrepo distro-info
|
|
||||||
- uses: sigstore/cosign-installer@536b37ec5d5b543420bdfd9b744c5965bd4d8730
|
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v1
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
id: buildx
|
|
||||||
uses: docker/setup-buildx-action@v1
|
|
||||||
- name: Show available Docker Buildx platforms
|
|
||||||
run: echo ${{ steps.buildx.outputs.platforms }}
|
|
||||||
- name: Setup Go
|
|
||||||
uses: actions/setup-go@v3
|
|
||||||
with:
|
|
||||||
go-version: ${{ env.GO_VERSION }}
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Cache Go modules
|
|
||||||
uses: actions/cache@v3.0.2
|
- name: Restore Trivy binaries from cache
|
||||||
|
uses: actions/cache@v3.3.1
|
||||||
with:
|
with:
|
||||||
path: ~/go/pkg/mod
|
path: dist/
|
||||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
key: ${{ runner.os }}-bins-${{github.workflow}}-${{github.sha}}
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-go-
|
- name: Install dependencies
|
||||||
- name: Login to docker.io registry
|
run: |
|
||||||
uses: docker/login-action@v1
|
sudo apt-get -y update
|
||||||
with:
|
sudo apt-get -y install rpm reprepro createrepo-c distro-info
|
||||||
username: ${{ secrets.DOCKERHUB_USER }}
|
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
||||||
- name: Login to ghcr.io registry
|
|
||||||
uses: docker/login-action@v1
|
|
||||||
with:
|
|
||||||
registry: ghcr.io
|
|
||||||
username: ${{ env.GH_USER }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- name: Login to ECR
|
|
||||||
uses: docker/login-action@v1
|
|
||||||
with:
|
|
||||||
registry: public.ecr.aws
|
|
||||||
username: ${{ secrets.ECR_ACCESS_KEY_ID }}
|
|
||||||
password: ${{ secrets.ECR_SECRET_ACCESS_KEY }}
|
|
||||||
- name: Generate SBOM
|
|
||||||
uses: CycloneDX/gh-gomod-generate-sbom@v1
|
|
||||||
with:
|
|
||||||
args: mod -licenses -json -output bom.json
|
|
||||||
version: ^v1
|
|
||||||
- name: Release
|
|
||||||
uses: goreleaser/goreleaser-action@v2
|
|
||||||
with:
|
|
||||||
version: v1.4.1
|
|
||||||
args: release --rm-dist
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.ORG_REPO_TOKEN }}
|
|
||||||
- name: Checkout trivy-repo
|
- name: Checkout trivy-repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
@@ -80,13 +41,17 @@ jobs:
|
|||||||
path: trivy-repo
|
path: trivy-repo
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
token: ${{ secrets.ORG_REPO_TOKEN }}
|
token: ${{ secrets.ORG_REPO_TOKEN }}
|
||||||
|
|
||||||
- name: Setup git settings
|
- name: Setup git settings
|
||||||
run: |
|
run: |
|
||||||
git config --global user.email "knqyf263@gmail.com"
|
git config --global user.email "knqyf263@gmail.com"
|
||||||
git config --global user.name "Teppei Fukuda"
|
git config --global user.name "Teppei Fukuda"
|
||||||
|
|
||||||
- name: Create rpm repository
|
- name: Create rpm repository
|
||||||
run: ci/deploy-rpm.sh
|
run: ci/deploy-rpm.sh
|
||||||
|
|
||||||
- name: Import GPG key
|
- name: Import GPG key
|
||||||
run: echo -e "${{ secrets.GPG_KEY }}" | gpg --import
|
run: echo -e "${{ secrets.GPG_KEY }}" | gpg --import
|
||||||
|
|
||||||
- name: Create deb repository
|
- name: Create deb repository
|
||||||
run: ci/deploy-deb.sh
|
run: ci/deploy-deb.sh
|
||||||
|
|||||||
121
.github/workflows/reusable-release.yaml
vendored
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
name: Reusable release
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
goreleaser_config:
|
||||||
|
description: 'file path to GoReleaser config'
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
goreleaser_options:
|
||||||
|
description: 'GoReleaser options separated by spaces'
|
||||||
|
default: ''
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
|
||||||
|
env:
|
||||||
|
GH_USER: "aqua-bot"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
name: Release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
DOCKER_CLI_EXPERIMENTAL: "enabled"
|
||||||
|
permissions:
|
||||||
|
id-token: write # For cosign
|
||||||
|
packages: write # For GHCR
|
||||||
|
contents: read # Not required for public repositories, but for clarity
|
||||||
|
steps:
|
||||||
|
- name: Cosign install
|
||||||
|
uses: sigstore/cosign-installer@c3667d99424e7e6047999fb6246c0da843953c65
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v2
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
id: buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
|
- name: Show available Docker Buildx platforms
|
||||||
|
run: echo ${{ steps.buildx.outputs.platforms }}
|
||||||
|
|
||||||
|
- name: Login to docker.io registry
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USER }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Login to ghcr.io registry
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ env.GH_USER }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Login to ECR
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: public.ecr.aws
|
||||||
|
username: ${{ secrets.ECR_ACCESS_KEY_ID }}
|
||||||
|
password: ${{ secrets.ECR_SECRET_ACCESS_KEY }}
|
||||||
|
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Setup Go
|
||||||
|
uses: actions/setup-go@v4
|
||||||
|
with:
|
||||||
|
go-version-file: go.mod
|
||||||
|
|
||||||
|
- name: Generate SBOM
|
||||||
|
uses: CycloneDX/gh-gomod-generate-sbom@v1
|
||||||
|
with:
|
||||||
|
args: mod -licenses -json -output bom.json
|
||||||
|
version: ^v1
|
||||||
|
|
||||||
|
- name: "save gpg key"
|
||||||
|
env:
|
||||||
|
GPG_KEY: ${{ secrets.GPG_KEY }}
|
||||||
|
run: |
|
||||||
|
echo "$GPG_KEY" > gpg.key
|
||||||
|
|
||||||
|
- name: GoReleaser
|
||||||
|
uses: goreleaser/goreleaser-action@v4
|
||||||
|
with:
|
||||||
|
version: v1.16.2
|
||||||
|
args: release -f=${{ inputs.goreleaser_config}} ${{ inputs.goreleaser_options}}
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.ORG_REPO_TOKEN }}
|
||||||
|
NFPM_DEFAULT_RPM_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
|
||||||
|
GPG_FILE: "gpg.key"
|
||||||
|
|
||||||
|
- name: "remove gpg key"
|
||||||
|
run: |
|
||||||
|
rm gpg.key
|
||||||
|
|
||||||
|
# Push images to registries (only for canary build)
|
||||||
|
# The custom Dockerfile.canary is necessary
|
||||||
|
# because GoReleaser Free doesn't support pushing images with the `--snapshot` flag.
|
||||||
|
- name: Build and push
|
||||||
|
if: ${{ inputs.goreleaser_config == 'goreleaser-canary.yml' }}
|
||||||
|
uses: docker/build-push-action@v4
|
||||||
|
with:
|
||||||
|
platforms: linux/amd64, linux/arm64
|
||||||
|
file: ./Dockerfile.canary # path to Dockerfile
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
aquasec/trivy:canary
|
||||||
|
ghcr.io/aquasecurity/trivy:canary
|
||||||
|
public.ecr.aws/aquasecurity/trivy:canary
|
||||||
|
|
||||||
|
- name: Cache Trivy binaries
|
||||||
|
uses: actions/cache@v3.3.1
|
||||||
|
with:
|
||||||
|
path: dist/
|
||||||
|
# use 'github.sha' to create a unique cache folder for each run.
|
||||||
|
# use 'github.workflow' to create a unique cache folder if some runs have same commit sha.
|
||||||
|
# e.g. build and release runs
|
||||||
|
key: ${{ runner.os }}-bins-${{github.workflow}}-${{github.sha}}
|
||||||
79
.github/workflows/roadmap.yaml
vendored
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
name: Add issues to the roadmap project
|
||||||
|
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types:
|
||||||
|
- labeled
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
add-issue-to-roadmap-project:
|
||||||
|
name: Add issue to the roadmap project
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
# 'kind/feature' AND 'priority/backlog' labels -> 'Backlog' column
|
||||||
|
- uses: actions/add-to-project@v0.4.1 # add new issue to project
|
||||||
|
with:
|
||||||
|
project-url: https://github.com/orgs/aquasecurity/projects/25
|
||||||
|
github-token: ${{ secrets.ORG_PROJECT_TOKEN }}
|
||||||
|
labeled: kind/feature, priority/backlog
|
||||||
|
label-operator: AND
|
||||||
|
id: add-backlog-issue
|
||||||
|
- uses: titoportas/update-project-fields@v0.1.0 # change Priority(column) of added issue
|
||||||
|
if: ${{ steps.add-backlog-issue.outputs.itemId }}
|
||||||
|
with:
|
||||||
|
project-url: https://github.com/orgs/aquasecurity/projects/25
|
||||||
|
github-token: ${{ secrets.ORG_PROJECT_TOKEN }}
|
||||||
|
item-id: ${{ steps.add-backlog-issue.outputs.itemId }} # Use the item-id output of the previous step
|
||||||
|
field-keys: Priority
|
||||||
|
field-values: Backlog
|
||||||
|
|
||||||
|
# 'kind/feature' AND 'priority/important-longterm' labels -> 'Important (long-term)' column
|
||||||
|
- uses: actions/add-to-project@v0.4.1 # add new issue to project
|
||||||
|
with:
|
||||||
|
project-url: https://github.com/orgs/aquasecurity/projects/25
|
||||||
|
github-token: ${{ secrets.ORG_PROJECT_TOKEN }}
|
||||||
|
labeled: kind/feature, priority/important-longterm
|
||||||
|
label-operator: AND
|
||||||
|
id: add-longterm-issue
|
||||||
|
- uses: titoportas/update-project-fields@v0.1.0 # change Priority(column) of added issue
|
||||||
|
if: ${{ steps.add-longterm-issue.outputs.itemId }}
|
||||||
|
with:
|
||||||
|
project-url: https://github.com/orgs/aquasecurity/projects/25
|
||||||
|
github-token: ${{ secrets.ORG_PROJECT_TOKEN }}
|
||||||
|
item-id: ${{ steps.add-longterm-issue.outputs.itemId }} # Use the item-id output of the previous step
|
||||||
|
field-keys: Priority
|
||||||
|
field-values: Important (long-term)
|
||||||
|
|
||||||
|
# 'kind/feature' AND 'priority/important-soon' labels -> 'Important (soon)' column
|
||||||
|
- uses: actions/add-to-project@v0.4.1 # add new issue to project
|
||||||
|
with:
|
||||||
|
project-url: https://github.com/orgs/aquasecurity/projects/25
|
||||||
|
github-token: ${{ secrets.ORG_PROJECT_TOKEN }}
|
||||||
|
labeled: kind/feature, priority/important-soon
|
||||||
|
label-operator: AND
|
||||||
|
id: add-soon-issue
|
||||||
|
- uses: titoportas/update-project-fields@v0.1.0 # change Priority(column) of added issue
|
||||||
|
if: ${{ steps.add-soon-issue.outputs.itemId }}
|
||||||
|
with:
|
||||||
|
project-url: https://github.com/orgs/aquasecurity/projects/25
|
||||||
|
github-token: ${{ secrets.ORG_PROJECT_TOKEN }}
|
||||||
|
item-id: ${{ steps.add-soon-issue.outputs.itemId }} # Use the item-id output of the previous step
|
||||||
|
field-keys: Priority
|
||||||
|
field-values: Important (soon)
|
||||||
|
|
||||||
|
# 'kind/feature' AND 'priority/critical-urgent' labels -> 'Urgent' column
|
||||||
|
- uses: actions/add-to-project@v0.4.1 # add new issue to project
|
||||||
|
with:
|
||||||
|
project-url: https://github.com/orgs/aquasecurity/projects/25
|
||||||
|
github-token: ${{ secrets.ORG_PROJECT_TOKEN }}
|
||||||
|
labeled: kind/feature, priority/critical-urgent
|
||||||
|
label-operator: AND
|
||||||
|
id: add-urgent-issue
|
||||||
|
- uses: titoportas/update-project-fields@v0.1.0 # change Priority(column) of added issue
|
||||||
|
if: ${{ steps.add-urgent-issue.outputs.itemId }}
|
||||||
|
with:
|
||||||
|
project-url: https://github.com/orgs/aquasecurity/projects/25
|
||||||
|
github-token: ${{ secrets.ORG_PROJECT_TOKEN }}
|
||||||
|
item-id: ${{ steps.add-urgent-issue.outputs.itemId }} # Use the item-id output of the previous step
|
||||||
|
field-keys: Priority
|
||||||
|
field-values: Urgent
|
||||||
6
.github/workflows/scan.yaml
vendored
@@ -13,11 +13,11 @@ jobs:
|
|||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Run Trivy vulnerability scanner and create GitHub issues
|
- name: Run Trivy vulnerability scanner and create GitHub issues
|
||||||
uses: knqyf263/trivy-issue-action@v0.0.4
|
uses: knqyf263/trivy-issue-action@v0.0.5
|
||||||
with:
|
with:
|
||||||
assignee: knqyf263
|
assignee: knqyf263
|
||||||
severity: CRITICAL
|
severity: CRITICAL
|
||||||
skip-dirs: integration,examples
|
skip-dirs: integration,examples,pkg
|
||||||
label: vulnerability
|
label: kind/security
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
24
.github/workflows/semantic-pr.yaml
vendored
@@ -12,11 +12,11 @@ jobs:
|
|||||||
name: Validate PR title
|
name: Validate PR title
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: amannn/action-semantic-pull-request@v4
|
- uses: amannn/action-semantic-pull-request@v5
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
types:
|
types: |
|
||||||
feat
|
feat
|
||||||
fix
|
fix
|
||||||
docs
|
docs
|
||||||
@@ -30,10 +30,11 @@ jobs:
|
|||||||
revert
|
revert
|
||||||
BREAKING
|
BREAKING
|
||||||
|
|
||||||
scopes:
|
scopes: |
|
||||||
vuln
|
vuln
|
||||||
misconf
|
misconf
|
||||||
secret
|
secret
|
||||||
|
license
|
||||||
|
|
||||||
image
|
image
|
||||||
fs
|
fs
|
||||||
@@ -41,8 +42,12 @@ jobs:
|
|||||||
sbom
|
sbom
|
||||||
server
|
server
|
||||||
k8s
|
k8s
|
||||||
|
aws
|
||||||
|
vm
|
||||||
|
|
||||||
alpine
|
alpine
|
||||||
|
wolfi
|
||||||
|
chainguard
|
||||||
redhat
|
redhat
|
||||||
alma
|
alma
|
||||||
rocky
|
rocky
|
||||||
@@ -54,6 +59,7 @@ jobs:
|
|||||||
suse
|
suse
|
||||||
photon
|
photon
|
||||||
distroless
|
distroless
|
||||||
|
windows
|
||||||
|
|
||||||
ruby
|
ruby
|
||||||
php
|
php
|
||||||
@@ -63,7 +69,11 @@ jobs:
|
|||||||
dotnet
|
dotnet
|
||||||
java
|
java
|
||||||
go
|
go
|
||||||
|
c
|
||||||
|
c\+\+
|
||||||
|
elixir
|
||||||
|
dart
|
||||||
|
|
||||||
os
|
os
|
||||||
lang
|
lang
|
||||||
|
|
||||||
@@ -80,7 +90,11 @@ jobs:
|
|||||||
cli
|
cli
|
||||||
flag
|
flag
|
||||||
|
|
||||||
|
cyclonedx
|
||||||
|
spdx
|
||||||
|
purl
|
||||||
|
|
||||||
helm
|
helm
|
||||||
report
|
report
|
||||||
db
|
db
|
||||||
deps
|
deps
|
||||||
|
|||||||
2
.github/workflows/stale-issues.yaml
vendored
@@ -7,7 +7,7 @@ jobs:
|
|||||||
timeout-minutes: 1
|
timeout-minutes: 1
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@v5
|
- uses: actions/stale@v8
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
stale-issue-message: 'This issue is stale because it has been labeled with inactivity.'
|
stale-issue-message: 'This issue is stale because it has been labeled with inactivity.'
|
||||||
|
|||||||
28
.github/workflows/test-docs.yaml
vendored
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
name: Test docs
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'docs/**'
|
||||||
|
- 'mkdocs.yml'
|
||||||
|
jobs:
|
||||||
|
build-documents:
|
||||||
|
name: Documentation Test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
persist-credentials: true
|
||||||
|
- uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: 3.x
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
pip install -r docs/build/requirements.txt
|
||||||
|
- name: Configure the git user
|
||||||
|
run: |
|
||||||
|
git config user.name "knqyf263"
|
||||||
|
git config user.email "knqyf263@gmail.com"
|
||||||
|
- name: Deploy the dev documents
|
||||||
|
run: mike deploy test
|
||||||
132
.github/workflows/test.yaml
vendored
@@ -4,49 +4,107 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- '*.md'
|
- '**.md'
|
||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
- 'mkdocs.yml'
|
- 'mkdocs.yml'
|
||||||
- 'LICENSE'
|
- 'LICENSE'
|
||||||
pull_request:
|
pull_request:
|
||||||
env:
|
paths-ignore:
|
||||||
GO_VERSION: "1.18"
|
- '**.md'
|
||||||
|
- 'docs/**'
|
||||||
|
- 'mkdocs.yml'
|
||||||
|
- 'LICENSE'
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
name: Test
|
name: Test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ${{ matrix.operating-system }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: ${{ env.GO_VERSION }}
|
go-version: oldstable
|
||||||
|
|
||||||
|
- name: go mod tidy
|
||||||
|
run: |
|
||||||
|
go mod tidy
|
||||||
|
if [ -n "$(git status --porcelain)" ]; then
|
||||||
|
echo "Run 'go mod tidy' and push it"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if: matrix.operating-system == 'ubuntu-latest'
|
||||||
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
uses: golangci/golangci-lint-action@v3.1.0
|
uses: golangci/golangci-lint-action@v3.4.0
|
||||||
with:
|
with:
|
||||||
version: v1.45
|
version: v1.52
|
||||||
args: --deadline=30m
|
args: --deadline=30m
|
||||||
|
skip-cache: true # https://github.com/golangci/golangci-lint-action/issues/244#issuecomment-1052197778
|
||||||
|
if: matrix.operating-system == 'ubuntu-latest'
|
||||||
|
|
||||||
|
- name: Install tools
|
||||||
|
uses: aquaproj/aqua-installer@v2.0.2
|
||||||
|
with:
|
||||||
|
aqua_version: v1.25.0
|
||||||
|
aqua_opts: ""
|
||||||
|
|
||||||
|
- name: Check if CLI references are up-to-date
|
||||||
|
run: |
|
||||||
|
mage docs:generate
|
||||||
|
if [ -n "$(git status --porcelain)" ]; then
|
||||||
|
echo "Run 'mage docs:generate' and push it"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if: matrix.operating-system == 'ubuntu-latest'
|
||||||
|
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
run: make test
|
run: mage test:unit
|
||||||
|
|
||||||
integration:
|
integration:
|
||||||
name: Integration Test
|
name: Integration Test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Go
|
- name: Check out code into the Go module directory
|
||||||
uses: actions/setup-go@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
|
||||||
go-version: ${{ env.GO_VERSION }}
|
|
||||||
id: go
|
|
||||||
|
|
||||||
- name: Check out code into the Go module directory
|
- name: Set up Go
|
||||||
uses: actions/checkout@v3
|
uses: actions/setup-go@v4
|
||||||
|
with:
|
||||||
|
go-version-file: go.mod
|
||||||
|
|
||||||
- name: Run integration tests
|
- name: Install tools
|
||||||
run: make test-integration
|
uses: aquaproj/aqua-installer@v2.0.2
|
||||||
|
with:
|
||||||
|
aqua_version: v1.25.0
|
||||||
|
|
||||||
|
- name: Run integration tests
|
||||||
|
run: mage test:integration
|
||||||
|
|
||||||
|
module-test:
|
||||||
|
name: Module Integration Test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v4
|
||||||
|
with:
|
||||||
|
go-version-file: go.mod
|
||||||
|
|
||||||
|
- name: Install tools
|
||||||
|
uses: aquaproj/aqua-installer@v2.0.2
|
||||||
|
with:
|
||||||
|
aqua_version: v1.25.0
|
||||||
|
|
||||||
|
- name: Run module integration tests
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mage test:module
|
||||||
|
|
||||||
build-test:
|
build-test:
|
||||||
name: Build Test
|
name: Build Test
|
||||||
@@ -55,11 +113,11 @@ jobs:
|
|||||||
DOCKER_CLI_EXPERIMENTAL: "enabled"
|
DOCKER_CLI_EXPERIMENTAL: "enabled"
|
||||||
steps:
|
steps:
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v1
|
uses: docker/setup-qemu-action@v2
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
id: buildx
|
id: buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
- name: Show available Docker Buildx platforms
|
- name: Show available Docker Buildx platforms
|
||||||
run: echo ${{ steps.buildx.outputs.platforms }}
|
run: echo ${{ steps.buildx.outputs.platforms }}
|
||||||
@@ -68,34 +126,14 @@ jobs:
|
|||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: ${{ env.GO_VERSION }}
|
go-version-file: go.mod
|
||||||
|
|
||||||
- name: Run GoReleaser
|
- name: Run GoReleaser
|
||||||
uses: goreleaser/goreleaser-action@v2
|
uses: goreleaser/goreleaser-action@v4
|
||||||
with:
|
with:
|
||||||
version: v1.4.1
|
version: v1.16.2
|
||||||
args: release --snapshot --rm-dist --skip-publish
|
args: release --skip-sign --snapshot --clean --skip-publish --timeout 90m
|
||||||
|
env:
|
||||||
build-documents:
|
GPG_FILE: "nogpg.key"
|
||||||
name: Documentation Test
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
persist-credentials: true
|
|
||||||
- uses: actions/setup-python@v3
|
|
||||||
with:
|
|
||||||
python-version: 3.x
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
pip install -r docs/build/requirements.txt
|
|
||||||
- name: Configure the git user
|
|
||||||
run: |
|
|
||||||
git config user.name "knqyf263"
|
|
||||||
git config user.email "knqyf263@gmail.com"
|
|
||||||
- name: Deploy the dev documents
|
|
||||||
run: mike deploy test
|
|
||||||
|
|||||||
36
.github/workflows/vm-test.yaml
vendored
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
name: VM Test
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- 'pkg/fanal/vm/**'
|
||||||
|
- 'pkg/fanal/walker/vm.go'
|
||||||
|
- 'pkg/fanal/artifact/vm/**'
|
||||||
|
- 'integration/vm_test.go'
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'pkg/fanal/vm/**'
|
||||||
|
- 'pkg/fanal/walker/vm.go'
|
||||||
|
- 'pkg/fanal/artifact/vm/**'
|
||||||
|
- 'integration/vm_test.go'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
vm-test:
|
||||||
|
name: VM Integration Test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v4
|
||||||
|
with:
|
||||||
|
go-version-file: go.mod
|
||||||
|
- name: Install tools
|
||||||
|
uses: aquaproj/aqua-installer@v2.0.2
|
||||||
|
with:
|
||||||
|
aqua_version: v1.25.0
|
||||||
|
- name: Run vm integration tests
|
||||||
|
run: |
|
||||||
|
mage test:vm
|
||||||
8
.gitignore
vendored
@@ -16,6 +16,7 @@
|
|||||||
*.out
|
*.out
|
||||||
|
|
||||||
.idea
|
.idea
|
||||||
|
.vscode
|
||||||
|
|
||||||
# Directory Cache Files
|
# Directory Cache Files
|
||||||
.DS_Store
|
.DS_Store
|
||||||
@@ -24,9 +25,16 @@ thumbs.db
|
|||||||
# test fixtures
|
# test fixtures
|
||||||
coverage.txt
|
coverage.txt
|
||||||
integration/testdata/fixtures/images
|
integration/testdata/fixtures/images
|
||||||
|
integration/testdata/fixtures/vm-images
|
||||||
|
|
||||||
# SBOMs generated during CI
|
# SBOMs generated during CI
|
||||||
/bom.json
|
/bom.json
|
||||||
|
|
||||||
# goreleaser output
|
# goreleaser output
|
||||||
dist
|
dist
|
||||||
|
|
||||||
|
# WebAssembly
|
||||||
|
*.wasm
|
||||||
|
|
||||||
|
# Signing
|
||||||
|
gpg.key
|
||||||
|
|||||||
@@ -21,19 +21,18 @@ linters-settings:
|
|||||||
local-prefixes: github.com/aquasecurity
|
local-prefixes: github.com/aquasecurity
|
||||||
gosec:
|
gosec:
|
||||||
excludes:
|
excludes:
|
||||||
|
- G101
|
||||||
|
- G114
|
||||||
- G204
|
- G204
|
||||||
- G402
|
- G402
|
||||||
|
|
||||||
linters:
|
linters:
|
||||||
disable-all: true
|
disable-all: true
|
||||||
enable:
|
enable:
|
||||||
- structcheck
|
- unused
|
||||||
- ineffassign
|
- ineffassign
|
||||||
- typecheck
|
- typecheck
|
||||||
- govet
|
- govet
|
||||||
- errcheck
|
|
||||||
- varcheck
|
|
||||||
- deadcode
|
|
||||||
- revive
|
- revive
|
||||||
- gosec
|
- gosec
|
||||||
- unconvert
|
- unconvert
|
||||||
@@ -44,11 +43,12 @@ linters:
|
|||||||
- misspell
|
- misspell
|
||||||
|
|
||||||
run:
|
run:
|
||||||
go: 1.18
|
go: 1.19
|
||||||
skip-files:
|
skip-files:
|
||||||
- ".*._mock.go$"
|
- ".*._mock.go$"
|
||||||
- ".*._test.go$"
|
- ".*._test.go$"
|
||||||
- "integration/*"
|
- "integration/*"
|
||||||
|
- "examples/*"
|
||||||
|
|
||||||
issues:
|
issues:
|
||||||
exclude-rules:
|
exclude-rules:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM alpine:3.15.4
|
FROM alpine:3.17.3
|
||||||
RUN apk --no-cache add ca-certificates git
|
RUN apk --no-cache add ca-certificates git
|
||||||
COPY trivy /usr/local/bin/trivy
|
COPY trivy /usr/local/bin/trivy
|
||||||
COPY contrib/*.tpl contrib/
|
COPY contrib/*.tpl contrib/
|
||||||
|
|||||||
11
Dockerfile.canary
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
FROM alpine:3.17.3
|
||||||
|
RUN apk --no-cache add ca-certificates git
|
||||||
|
|
||||||
|
# binaries were created with GoReleaser
|
||||||
|
# need to copy binaries from folder with correct architecture
|
||||||
|
# example architecture folder: dist/trivy_canary_build_linux_arm64/trivy
|
||||||
|
# GoReleaser adds _v* to the folder name, but only when GOARCH is amd64
|
||||||
|
ARG TARGETARCH
|
||||||
|
COPY "dist/trivy_canary_build_linux_${TARGETARCH}*/trivy" /usr/local/bin/trivy
|
||||||
|
COPY contrib/*.tpl contrib/
|
||||||
|
ENTRYPOINT ["trivy"]
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM golang:1.18.1
|
FROM golang:1.19
|
||||||
|
|
||||||
# Install protoc (cf. http://google.github.io/proto-lens/installing-protoc.html)
|
# Install protoc (cf. http://google.github.io/proto-lens/installing-protoc.html)
|
||||||
ENV PROTOC_ZIP=protoc-3.19.4-linux-x86_64.zip
|
ENV PROTOC_ZIP=protoc-3.19.4-linux-x86_64.zip
|
||||||
@@ -10,3 +10,6 @@ RUN curl --retry 5 -OL https://github.com/protocolbuffers/protobuf/releases/down
|
|||||||
|
|
||||||
RUN go install github.com/twitchtv/twirp/protoc-gen-twirp@v8.1.0
|
RUN go install github.com/twitchtv/twirp/protoc-gen-twirp@v8.1.0
|
||||||
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.27.1
|
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.27.1
|
||||||
|
RUN go install github.com/magefile/mage@v1.14.0
|
||||||
|
|
||||||
|
ENV TRIVY_PROTOC_CONTAINER=true
|
||||||
|
|||||||
84
Makefile
@@ -1,84 +0,0 @@
|
|||||||
VERSION := $(shell git describe --tags)
|
|
||||||
LDFLAGS=-ldflags "-s -w -X=main.version=$(VERSION)"
|
|
||||||
|
|
||||||
GOPATH=$(shell go env GOPATH)
|
|
||||||
GOBIN=$(GOPATH)/bin
|
|
||||||
GOSRC=$(GOPATH)/src
|
|
||||||
|
|
||||||
MKDOCS_IMAGE := aquasec/mkdocs-material:dev
|
|
||||||
MKDOCS_PORT := 8000
|
|
||||||
|
|
||||||
u := $(if $(update),-u)
|
|
||||||
|
|
||||||
$(GOBIN)/wire:
|
|
||||||
GO111MODULE=off go get github.com/google/wire/cmd/wire
|
|
||||||
|
|
||||||
.PHONY: wire
|
|
||||||
wire: $(GOBIN)/wire
|
|
||||||
wire gen ./pkg/...
|
|
||||||
|
|
||||||
.PHONY: mock
|
|
||||||
mock: $(GOBIN)/mockery
|
|
||||||
mockery -all -inpkg -case=snake -dir $(DIR)
|
|
||||||
|
|
||||||
.PHONY: deps
|
|
||||||
deps:
|
|
||||||
go get ${u} -d
|
|
||||||
go mod tidy
|
|
||||||
|
|
||||||
$(GOBIN)/golangci-lint:
|
|
||||||
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(GOBIN) v1.45.2
|
|
||||||
|
|
||||||
.PHONY: test
|
|
||||||
test:
|
|
||||||
go test -v -short -coverprofile=coverage.txt -covermode=atomic ./...
|
|
||||||
|
|
||||||
integration/testdata/fixtures/images/*.tar.gz:
|
|
||||||
git clone https://github.com/aquasecurity/trivy-test-images.git integration/testdata/fixtures/images
|
|
||||||
|
|
||||||
.PHONY: test-integration
|
|
||||||
test-integration: integration/testdata/fixtures/images/*.tar.gz
|
|
||||||
go test -v -tags=integration ./integration/...
|
|
||||||
|
|
||||||
.PHONY: lint
|
|
||||||
lint: $(GOBIN)/golangci-lint
|
|
||||||
$(GOBIN)/golangci-lint run --timeout 5m
|
|
||||||
|
|
||||||
.PHONY: fmt
|
|
||||||
fmt:
|
|
||||||
find ./ -name "*.proto" | xargs clang-format -i
|
|
||||||
|
|
||||||
.PHONY: build
|
|
||||||
build:
|
|
||||||
go build $(LDFLAGS) ./cmd/trivy
|
|
||||||
|
|
||||||
.PHONY: protoc
|
|
||||||
protoc:
|
|
||||||
docker build -t trivy-protoc - < Dockerfile.protoc
|
|
||||||
docker run --rm -it -v ${PWD}:/app -w /app trivy-protoc make _$@
|
|
||||||
|
|
||||||
_protoc:
|
|
||||||
for path in `find ./rpc/ -name "*.proto" -type f`; do \
|
|
||||||
protoc --twirp_out=. --twirp_opt=paths=source_relative --go_out=. --go_opt=paths=source_relative $${path} || exit; \
|
|
||||||
done
|
|
||||||
|
|
||||||
.PHONY: install
|
|
||||||
install:
|
|
||||||
go install $(LDFLAGS) ./cmd/trivy
|
|
||||||
|
|
||||||
.PHONY: clean
|
|
||||||
clean:
|
|
||||||
rm -rf integration/testdata/fixtures/images
|
|
||||||
|
|
||||||
$(GOBIN)/labeler:
|
|
||||||
go install github.com/knqyf263/labeler@latest
|
|
||||||
|
|
||||||
.PHONY: label
|
|
||||||
label: $(GOBIN)/labeler
|
|
||||||
labeler apply misc/triage/labels.yaml -r aquasecurity/trivy -l 5
|
|
||||||
|
|
||||||
.PHONY: mkdocs-serve
|
|
||||||
## Runs MkDocs development server to preview the documentation page
|
|
||||||
mkdocs-serve:
|
|
||||||
docker build -t $(MKDOCS_IMAGE) -f docs/build/Dockerfile docs/build
|
|
||||||
docker run --name mkdocs-serve --rm -v $(PWD):/docs -p $(MKDOCS_PORT):8000 $(MKDOCS_IMAGE)
|
|
||||||
234
README.md
@@ -1,211 +1,107 @@
|
|||||||
<p align="center">
|
<div align="center">
|
||||||
<img src="docs/imgs/logo.png" width="200">
|
<img src="docs/imgs/logo.png" width="200">
|
||||||
</p>
|
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<a href="https://aquasecurity.github.io/trivy/">Documentation</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
Scanner for vulnerabilities in container images, file systems, and Git repositories, as well as for configuration issues
|
|
||||||
</p>
|
|
||||||
|
|
||||||
[![GitHub Release][release-img]][release]
|
[![GitHub Release][release-img]][release]
|
||||||
[![Test][test-img]][test]
|
[![Test][test-img]][test]
|
||||||
[![Go Report Card][go-report-img]][go-report]
|
[![Go Report Card][go-report-img]][go-report]
|
||||||
[![License: Apache-2.0][license-img]][license]
|
[![License: Apache-2.0][license-img]][license]
|
||||||
[![GitHub All Releases][github-all-releases-img]][release]
|
[![GitHub Downloads][github-downloads-img]][release]
|
||||||
![Docker Pulls][docker-pulls]
|
![Docker Pulls][docker-pulls]
|
||||||
|
|
||||||
|
[📖 Documentation][docs]
|
||||||
|
</div>
|
||||||
|
|
||||||
# Abstract
|
Trivy ([pronunciation][pronunciation]) is a comprehensive and versatile security scanner.
|
||||||
`Trivy` (`tri` pronounced like **tri**gger, `vy` pronounced like en**vy**) is a simple and comprehensive scanner for vulnerabilities in container images, file systems, and Git repositories, as well as for configuration issues.
|
Trivy has *scanners* that look for security issues, and *targets* where it can find those issues.
|
||||||
`Trivy` detects vulnerabilities of OS packages (Alpine, RHEL, CentOS, etc.) and language-specific packages (Bundler, Composer, npm, yarn, etc.).
|
|
||||||
In addition, `Trivy` scans Infrastructure as Code (IaC) files such as Terraform, Dockerfile and Kubernetes, to detect potential configuration issues that expose your deployments to the risk of attack.
|
|
||||||
`Trivy` also scans hardcoded secrets like passwords, API keys and tokens.
|
|
||||||
`Trivy` is easy to use. Just install the binary and you're ready to scan.
|
|
||||||
|
|
||||||
<figure style="text-aligh: center">
|
Targets (what Trivy can scan):
|
||||||
<img src="docs/imgs/overview.png" width="800" alt="Trivy Overview">
|
|
||||||
</figure>
|
|
||||||
|
|
||||||
### Demo: Vulnerability Detection (Container Image)
|
- Container Image
|
||||||
<figure style="text-aligh: center">
|
- Filesystem
|
||||||
<img src="docs/imgs/vuln-demo.gif" width="1000" alt="Vulnerability Detection">
|
- Git Repository (remote)
|
||||||
</figure>
|
- Virtual Machine Image
|
||||||
|
- Kubernetes
|
||||||
|
- AWS
|
||||||
|
|
||||||
### Demo: Misconfiguration Detection (IaC Files)
|
Scanners (what Trivy can find there):
|
||||||
<figure style="text-aligh: center">
|
|
||||||
<img src="docs/imgs/misconf-demo.gif" width="1000" alt="Misconfiguration Detection">
|
|
||||||
</figure>
|
|
||||||
|
|
||||||
### Demo: Secret Detection
|
- OS packages and software dependencies in use (SBOM)
|
||||||
<figure style="text-aligh: center">
|
- Known vulnerabilities (CVEs)
|
||||||
<img src="docs/imgs/secret-demo.gif" width="1000">
|
- IaC issues and misconfigurations
|
||||||
</figure>
|
- Sensitive information and secrets
|
||||||
|
- Software licenses
|
||||||
|
|
||||||
|
To learn more, go to the [Trivy homepage][homepage] for feature highlights, or to the [Documentation site][docs] for detailed information.
|
||||||
|
|
||||||
# Quick Start
|
## Quick Start
|
||||||
## Scan Image for Vulnerabilities and Secrets
|
|
||||||
Simply specify an image name (and a tag).
|
|
||||||
|
|
||||||
```
|
### Get Trivy
|
||||||
$ trivy image [YOUR_IMAGE_NAME]
|
|
||||||
|
Trivy is available in most common distribution channels. The full list of installation options is available in the [Installation] page. Here are a few popular examples:
|
||||||
|
|
||||||
|
- `brew install trivy`
|
||||||
|
- `docker run aquasec/trivy`
|
||||||
|
- Download binary from <https://github.com/aquasecurity/trivy/releases/latest/>
|
||||||
|
- See [Installation] for more
|
||||||
|
|
||||||
|
Trivy is integrated with many popular platforms and applications. The complete list of integrations is available in the [Ecosystem] page. Here are a few popular examples:
|
||||||
|
|
||||||
|
- [GitHub Actions](https://github.com/aquasecurity/trivy-action)
|
||||||
|
- [Kubernetes operator](https://github.com/aquasecurity/trivy-operator)
|
||||||
|
- [VS Code plugin](https://github.com/aquasecurity/trivy-vscode-extension)
|
||||||
|
- See [Ecosystem] for more
|
||||||
|
|
||||||
|
### Canary builds
|
||||||
|
There are canary builds ([Docker Hub](https://hub.docker.com/r/aquasec/trivy/tags?page=1&name=canary), [GitHub](https://github.com/aquasecurity/trivy/pkgs/container/trivy/75776514?tag=canary), [ECR](https://gallery.ecr.aws/aquasecurity/trivy#canary) images and [binaries](https://github.com/aquasecurity/trivy/actions/workflows/canary.yaml)) as generated every push to main branch.
|
||||||
|
|
||||||
|
Please be aware: canary builds might have critical bugs, it's not recommended for use in production.
|
||||||
|
|
||||||
|
### General usage
|
||||||
|
|
||||||
|
```bash
|
||||||
|
trivy <target> [--scanners <scanner1,scanner2>] <subject>
|
||||||
```
|
```
|
||||||
|
|
||||||
For example:
|
Examples:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
$ trivy image python:3.4-alpine
|
trivy image python:3.4-alpine
|
||||||
```
|
```
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>Result</summary>
|
<summary>Result</summary>
|
||||||
|
|
||||||
```
|
https://user-images.githubusercontent.com/1161307/171013513-95f18734-233d-45d3-aaf5-d6aec687db0e.mov
|
||||||
2019-05-16T01:20:43.180+0900 INFO Updating vulnerability database...
|
|
||||||
2019-05-16T01:20:53.029+0900 INFO Detecting Alpine vulnerabilities...
|
|
||||||
|
|
||||||
python:3.4-alpine3.9 (alpine 3.9.2)
|
|
||||||
===================================
|
|
||||||
Total: 1 (UNKNOWN: 0, LOW: 0, MEDIUM: 1, HIGH: 0, CRITICAL: 0)
|
|
||||||
|
|
||||||
+---------+------------------+----------+-------------------+---------------+--------------------------------+
|
|
||||||
| LIBRARY | VULNERABILITY ID | SEVERITY | INSTALLED VERSION | FIXED VERSION | TITLE |
|
|
||||||
+---------+------------------+----------+-------------------+---------------+--------------------------------+
|
|
||||||
| openssl | CVE-2019-1543 | MEDIUM | 1.1.1a-r1 | 1.1.1b-r1 | openssl: ChaCha20-Poly1305 |
|
|
||||||
| | | | | | with long nonces |
|
|
||||||
+---------+------------------+----------+-------------------+---------------+--------------------------------+
|
|
||||||
```
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
## Scan Filesystem for Vulnerabilities, Secrets and Misconfigurations
|
|
||||||
Simply specify a directory to scan.
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ trivy fs --security-checks vuln,secret,config [YOUR_PROJECT_DIR]
|
trivy fs --scanners vuln,secret,config myproject/
|
||||||
```
|
|
||||||
|
|
||||||
For example:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ trivy fs --security-checks vuln,secret,config myproject/
|
|
||||||
```
|
```
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>Result</summary>
|
<summary>Result</summary>
|
||||||
|
|
||||||
```bash
|
https://user-images.githubusercontent.com/1161307/171013917-b1f37810-f434-465c-b01a-22de036bd9b3.mov
|
||||||
2021-07-09T12:03:27.564+0300 INFO Number of language-specific files: 1
|
|
||||||
2021-07-09T12:03:27.564+0300 INFO Detecting pipenv vulnerabilities...
|
|
||||||
2021-07-09T12:03:27.566+0300 INFO Detected config files: 1
|
|
||||||
|
|
||||||
Pipfile.lock (pipenv)
|
|
||||||
=====================
|
|
||||||
Total: 1 (HIGH: 1, CRITICAL: 0)
|
|
||||||
|
|
||||||
+----------+------------------+----------+-------------------+---------------+---------------------------------------+
|
|
||||||
| LIBRARY | VULNERABILITY ID | SEVERITY | INSTALLED VERSION | FIXED VERSION | TITLE |
|
|
||||||
+----------+------------------+----------+-------------------+---------------+---------------------------------------+
|
|
||||||
| httplib2 | CVE-2021-21240 | HIGH | 0.12.1 | 0.19.0 | python-httplib2: Regular |
|
|
||||||
| | | | | | expression denial of |
|
|
||||||
| | | | | | service via malicious header |
|
|
||||||
| | | | | | -->avd.aquasec.com/nvd/cve-2021-21240 |
|
|
||||||
+----------+------------------+----------+-------------------+---------------+---------------------------------------+
|
|
||||||
|
|
||||||
Dockerfile (dockerfile)
|
|
||||||
=======================
|
|
||||||
Tests: 23 (SUCCESSES: 22, FAILURES: 1, EXCEPTIONS: 0)
|
|
||||||
Failures: 1 (HIGH: 1, CRITICAL: 0)
|
|
||||||
|
|
||||||
+---------------------------+------------+----------------------+----------+------------------------------------------+
|
|
||||||
| TYPE | MISCONF ID | CHECK | SEVERITY | MESSAGE |
|
|
||||||
+---------------------------+------------+----------------------+----------+------------------------------------------+
|
|
||||||
| Dockerfile Security Check | DS002 | Image user is 'root' | HIGH | Last USER command in |
|
|
||||||
| | | | | Dockerfile should not be 'root' |
|
|
||||||
| | | | | -->avd.aquasec.com/appshield/ds002 |
|
|
||||||
+---------------------------+------------+----------------------+----------+------------------------------------------+
|
|
||||||
```
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
## Scan Directory for Misconfigurations
|
```bash
|
||||||
|
trivy k8s --report summary cluster
|
||||||
Simply specify a directory containing IaC files such as Terraform and Dockerfile.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ trivy config [YOUR_IAC_DIR]
|
|
||||||
```
|
|
||||||
|
|
||||||
For example:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ ls build/
|
|
||||||
Dockerfile
|
|
||||||
$ trivy config ./build
|
|
||||||
```
|
```
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>Result</summary>
|
<summary>Result</summary>
|
||||||
|
|
||||||
```
|

|
||||||
2021-07-09T10:06:29.188+0300 INFO Need to update the built-in policies
|
|
||||||
2021-07-09T10:06:29.188+0300 INFO Downloading the built-in policies...
|
|
||||||
2021-07-09T10:06:30.520+0300 INFO Detected config files: 1
|
|
||||||
|
|
||||||
Dockerfile (dockerfile)
|
|
||||||
=======================
|
|
||||||
Tests: 23 (SUCCESSES: 22, FAILURES: 1, EXCEPTIONS: 0)
|
|
||||||
Failures: 1 (UNKNOWN: 0, LOW: 0, MEDIUM: 0, HIGH: 1, CRITICAL: 0)
|
|
||||||
|
|
||||||
+---------------------------+------------+----------------------+----------+------------------------------------------+
|
|
||||||
| TYPE | MISCONF ID | CHECK | SEVERITY | MESSAGE |
|
|
||||||
+---------------------------+------------+----------------------+----------+------------------------------------------+
|
|
||||||
| Dockerfile Security Check | DS002 | Image user is 'root' | HIGH | Last USER command in |
|
|
||||||
| | | | | Dockerfile should not be 'root' |
|
|
||||||
| | | | | -->avd.aquasec.com/appshield/ds002 |
|
|
||||||
+---------------------------+------------+----------------------+----------+------------------------------------------+
|
|
||||||
```
|
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
## FAQ
|
||||||
|
|
||||||
# Features
|
### How to pronounce the name "Trivy"?
|
||||||
|
|
||||||
- Comprehensive vulnerability detection
|
`tri` is pronounced like **tri**gger, `vy` is pronounced like en**vy**.
|
||||||
- OS packages (Alpine Linux, Red Hat Universal Base Image, Red Hat Enterprise Linux, CentOS, AlmaLinux, Rocky Linux, CBL-Mariner, Oracle Linux, Debian, Ubuntu, Amazon Linux, openSUSE Leap, SUSE Enterprise Linux, Photon OS and Distroless)
|
|
||||||
- **Language-specific packages** (Bundler, Composer, Pipenv, Poetry, npm, yarn, Cargo, NuGet, Maven, and Go)
|
|
||||||
- Misconfiguration detection (IaC scanning)
|
|
||||||
- A wide variety of built-in policies are provided **out of the box**
|
|
||||||
- Kubernetes, Docker, Terraform, and more coming soon
|
|
||||||
- Support custom policies
|
|
||||||
- Secret detection
|
|
||||||
- A wide variety of built-in rules are provided **out of the box**
|
|
||||||
- Support custom rules
|
|
||||||
- Scan container images at high speed
|
|
||||||
- Simple
|
|
||||||
- Specify only an image name, a path to config files, or an artifact name
|
|
||||||
- Fast
|
|
||||||
- The first scan will finish within 10 seconds (depending on your network). Consequent scans will finish in single seconds.
|
|
||||||
- Easy installation
|
|
||||||
- `apt-get install`, `yum install` and `brew install` are possible.
|
|
||||||
- **No pre-requisites** such as installation of DB, libraries, etc.
|
|
||||||
- High accuracy
|
|
||||||
- **Especially [Alpine Linux][alpine] and RHEL/CentOS**
|
|
||||||
- Other OSes are also high
|
|
||||||
- DevSecOps
|
|
||||||
- **Suitable for CI** such as GitHub Actions, Jenkins, GitLab CI, etc.
|
|
||||||
- Support multiple targets
|
|
||||||
- container image, local filesystem and remote git repository
|
|
||||||
- Supply chain security (SBOM support)
|
|
||||||
- Support CycloneDX
|
|
||||||
- Support SPDX
|
|
||||||
|
|
||||||
# Integrations
|
|
||||||
- [GitHub Actions][action]
|
|
||||||
- [Visual Studio Code][vscode]
|
|
||||||
|
|
||||||
# Documentation
|
|
||||||
The official documentation, which provides detailed installation, configuration, and quick start guides, is available at https://aquasecurity.github.io/trivy/.
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -219,14 +115,20 @@ Contact us about any matter by opening a GitHub Discussion [here][discussions]
|
|||||||
[go-report-img]: https://goreportcard.com/badge/github.com/aquasecurity/trivy
|
[go-report-img]: https://goreportcard.com/badge/github.com/aquasecurity/trivy
|
||||||
[release]: https://github.com/aquasecurity/trivy/releases
|
[release]: https://github.com/aquasecurity/trivy/releases
|
||||||
[release-img]: https://img.shields.io/github/release/aquasecurity/trivy.svg?logo=github
|
[release-img]: https://img.shields.io/github/release/aquasecurity/trivy.svg?logo=github
|
||||||
[github-all-releases-img]: https://img.shields.io/github/downloads/aquasecurity/trivy/total?logo=github
|
[github-downloads-img]: https://img.shields.io/github/downloads/aquasecurity/trivy/total?logo=github
|
||||||
[docker-pulls]: https://img.shields.io/docker/pulls/aquasec/trivy?logo=docker&label=docker%20pulls%20%2F%20trivy
|
[docker-pulls]: https://img.shields.io/docker/pulls/aquasec/trivy?logo=docker&label=docker%20pulls%20%2F%20trivy
|
||||||
[license]: https://github.com/aquasecurity/trivy/blob/main/LICENSE
|
[license]: https://github.com/aquasecurity/trivy/blob/main/LICENSE
|
||||||
[license-img]: https://img.shields.io/badge/License-Apache%202.0-blue.svg
|
[license-img]: https://img.shields.io/badge/License-Apache%202.0-blue.svg
|
||||||
|
[homepage]: https://trivy.dev
|
||||||
|
[docs]: https://aquasecurity.github.io/trivy
|
||||||
|
[pronunciation]: #how-to-pronounce-the-name-trivy
|
||||||
|
|
||||||
|
[Installation]:https://aquasecurity.github.io/trivy/latest/getting-started/installation/
|
||||||
|
[Ecosystem]: https://aquasecurity.github.io/trivy/latest/ecosystem/
|
||||||
|
|
||||||
[alpine]: https://ariadne.space/2021/06/08/the-vulnerability-remediation-lifecycle-of-alpine-containers/
|
[alpine]: https://ariadne.space/2021/06/08/the-vulnerability-remediation-lifecycle-of-alpine-containers/
|
||||||
[action]: https://github.com/aquasecurity/trivy-action
|
[rego]: https://www.openpolicyagent.org/docs/latest/#rego
|
||||||
[vscode]: https://github.com/aquasecurity/trivy-vscode-extension
|
[sigstore]: https://www.sigstore.dev/
|
||||||
|
|
||||||
[aquasec]: https://aquasec.com
|
[aquasec]: https://aquasec.com
|
||||||
[oss]: https://www.aquasec.com/products/open-source-projects/
|
[oss]: https://www.aquasec.com/products/open-source-projects/
|
||||||
|
|||||||
10
aqua.yaml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
# aqua - Declarative CLI Version Manager
|
||||||
|
# https://aquaproj.github.io/
|
||||||
|
registries:
|
||||||
|
- type: standard
|
||||||
|
ref: v3.157.0 # renovate: depName=aquaproj/aqua-registry
|
||||||
|
packages:
|
||||||
|
- name: tinygo-org/tinygo@v0.27.0
|
||||||
|
- name: WebAssembly/binaryen@version_112
|
||||||
|
- name: magefile/mage@v1.14.0
|
||||||
BIN
brand/Trivy-OSS-Logo-Color-Horizontal-RGB-2022.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
56
brand/Trivy-OSS-Logo-Color-Horizontal-RGB-2022.svg
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 26.3.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="_x30_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
viewBox="0 0 265 135" enable-background="new 0 0 265 135" xml:space="preserve">
|
||||||
|
<g>
|
||||||
|
<path fill="#07242D" d="M148.629,103.076v5.928c-4.038,0-7.676-1.454-10.545-3.863c-3.605-3.025-5.894-7.565-5.894-12.638V62.815
|
||||||
|
h5.894v13.471h10.545v5.966h-10.545v10.395C138.164,98.419,142.84,103.076,148.629,103.076z"/>
|
||||||
|
<path fill="#07242D" d="M169.65,76.285v5.889c-5.591,0.011-10.143,4.446-10.345,9.984v16.845h-5.908V76.285h5.908v3.735
|
||||||
|
C162.113,77.689,165.718,76.291,169.65,76.285z"/>
|
||||||
|
<path fill="#07242D" d="M173.447,68.698v-5.9h5.897v5.9H173.447z M173.447,109.003V76.285h5.897v32.719H173.447z"/>
|
||||||
|
<path fill="#07242D" d="M215.508,76.285l-16.348,32.719l-16.364-32.719h6.699l9.665,19.32l9.646-19.32L215.508,76.285z"/>
|
||||||
|
<path fill="#07242D" d="M250.874,76.285c0,0,0,35.771,0,38.135c0,9.136-7.493,16.428-16.37,16.423
|
||||||
|
c-4.157,0-8.009-1.576-10.934-4.196l4.24-4.24c1.809,1.532,4.143,2.464,6.693,2.459c5.745,0,10.396-4.696,10.396-10.446v-9.141
|
||||||
|
c-2.85,2.359-6.488,3.724-10.396,3.724c-8.894,0.005-16.384-7.171-16.384-16.372c0-0.194,0-16.345,0-16.345h5.972
|
||||||
|
c0,0,0.003,15.907,0.003,16.345c0,5.722,4.659,10.451,10.409,10.446c5.745,0,10.396-4.701,10.396-10.446V76.285H250.874z"/>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
<polygon fill="#FFFFFF" points="65.469,5.431 10.124,37.409 10.125,101.877 65.462,134.109 120.813,101.895 120.813,37.407 "/>
|
||||||
|
<g>
|
||||||
|
<path fill="#1904DA" d="M63.957,92.94V79.575c-6.048-2.856-9.846-8.792-9.768-15.27l-12.456-7.193
|
||||||
|
c-0.783,7.101,0.852,14.447,4.636,20.771C50.545,84.86,56.46,89.923,63.957,92.94z"/>
|
||||||
|
<path fill="#1904DA" d="M63.957,111.255V95.742c-8.438-3.162-15.089-8.73-19.77-16.553c-4.275-7.141-5.989-15.458-4.842-23.457
|
||||||
|
l-11.564-6.678C21.14,74.652,36.57,101.186,63.957,111.255z"/>
|
||||||
|
<path fill="#08B1D5" d="M66.804,95.596v15.649c26.877-10.306,42.715-37.348,36.372-62.1l-11.488,6.693
|
||||||
|
c1.481,8.635,0.079,16.879-4.065,23.865C83.476,86.697,76.281,92.188,66.804,95.596z"/>
|
||||||
|
<path fill="#08B1D5" d="M66.804,79.551v13.402c8.456-3.219,14.89-8.239,18.632-14.548c3.675-6.197,5.016-13.512,3.896-21.2
|
||||||
|
L76.888,64.38C76.826,70.53,73.171,76.032,66.804,79.551z"/>
|
||||||
|
<path fill="#FFC900" d="M78.53,41.442c5.228,2.549,9.501,6.608,12.373,11.749l11.183-6.458c-0.075-0.106-0.146-0.211-0.211-0.316
|
||||||
|
c-4.4-7.116-10.209-12.47-17.267-15.913c-19.641-9.576-44.026-2.441-55.772,16.23l11.227,6.481
|
||||||
|
C48.47,40.151,65.268,34.975,78.53,41.442z"/>
|
||||||
|
<path fill="#FFC900" d="M65.771,55.646c1.762,0,3.527,0.385,5.182,1.193h0.001c2.175,1.062,3.954,2.75,5.158,4.894L88.7,54.463
|
||||||
|
c-2.618-4.7-6.516-8.409-11.285-10.735c-12.078-5.888-27.409-1.16-35.147,10.76l12.525,7.229
|
||||||
|
C57.397,57.836,61.572,55.646,65.771,55.646z"/>
|
||||||
|
<path fill="#08B1D5" d="M66.804,130.848l51.828-30.205V40.14l-13.177,7.677c7.242,26.586-9.654,55.513-38.651,66.142V130.848z"/>
|
||||||
|
<path fill="#1904DA" d="M25.5,47.738l-13.196-7.621v60.509l51.653,30.22v-16.883C34.902,103.736,18.087,74.773,25.5,47.738z"/>
|
||||||
|
<path fill="#FFC900" d="M85.722,28.218c7.498,3.656,13.661,9.329,18.316,16.859c0.074,0.12,0.164,0.245,0.263,0.376l13.056-7.539
|
||||||
|
L65.469,7.948l-51.9,29.973l13.061,7.54C39.042,25.644,64.896,18.062,85.722,28.218z"/>
|
||||||
|
<path fill="#FF0036" d="M74.264,64.806c0.001-0.014,0.022-0.508-0.015-1.301c-0.104-0.324-1.328-2.715-4.385-4.383
|
||||||
|
c-2.089-1.139-4.769-1.27-7.357-0.362c-2.536,0.891-4.688,2.664-5.922,4.873c-0.015,0.192-0.044,0.647-0.022,1.173
|
||||||
|
c0.167,4.129,2.721,9.743,7.931,12.311l0.802,0.383l0.696-0.372C71.055,74.294,74.07,69.803,74.264,64.806z"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
<path fill="#07242D" d="M149.768,48.152h-8.789c-4.846,0-8.789-3.943-8.789-8.789c0-4.846,3.943-8.789,8.789-8.789
|
||||||
|
s8.789,3.943,8.789,8.789V48.152z M140.979,34.143c-2.878,0-5.22,2.342-5.22,5.22c0,2.878,2.342,5.22,5.22,5.22h5.22v-5.22
|
||||||
|
C146.199,36.485,143.858,34.143,140.979,34.143z"/>
|
||||||
|
<path fill="#07242D" d="M208.745,48.152h-8.789c-4.846,0-8.789-3.943-8.789-8.789c0-4.846,3.943-8.789,8.789-8.789
|
||||||
|
c4.846,0,8.789,3.943,8.789,8.789V48.152z M199.956,34.143c-2.878,0-5.22,2.342-5.22,5.22c0,2.878,2.342,5.22,5.22,5.22h5.22v-5.22
|
||||||
|
C205.176,36.485,202.835,34.143,199.956,34.143z"/>
|
||||||
|
<path fill="#07242D" d="M180.296,48.156c-4.848,0-8.793-3.944-8.793-8.793v-8.248h3.571v8.248c0,2.879,2.343,5.222,5.222,5.222
|
||||||
|
c2.879,0,5.222-2.343,5.222-5.222v-8.248h3.571v8.248C189.089,44.211,185.144,48.156,180.296,48.156z"/>
|
||||||
|
<path fill="#07242D" d="M160.636,30.574c-4.846,0-8.789,3.943-8.789,8.789c0,4.846,3.943,8.789,8.789,8.789l3.569-3.569h-3.569
|
||||||
|
c-2.878,0-5.22-2.342-5.22-5.22c0-2.878,2.342-5.22,5.22-5.22c2.878,0,5.22,2.342,5.22,5.22V56.54h3.569V39.363
|
||||||
|
C169.425,34.516,165.482,30.574,160.636,30.574z"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 4.7 KiB |
BIN
brand/Trivy-OSS-Logo-Color-Stacked-RGB-2022.png
Normal file
|
After Width: | Height: | Size: 81 KiB |
202
brand/Trivy-OSS-Logo-Color-Stacked-RGB-2022.svg
Normal file
@@ -0,0 +1,202 @@
|
|||||||
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 26.3.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="_x30_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
viewBox="0 0 500 524" enable-background="new 0 0 500 524" xml:space="preserve">
|
||||||
|
<g display="none">
|
||||||
|
<g display="inline">
|
||||||
|
<path fill="#07242D" d="M-483.763,450.803h-11.559l-22.557-22.807c-0.919,0.114-1.853,0.174-2.802,0.174v22.632h-8.238v-63.931
|
||||||
|
h8.239c0,0-0.016,33.158,0,33.158c4.013,0,7.684-1.656,10.29-4.32l9.86-10.073h11.814l-16.032,15.918
|
||||||
|
c-1.42,1.421-3.031,2.655-4.787,3.659L-483.763,450.803z"/>
|
||||||
|
<path fill="#07242D" d="M-438.316,405.517v22.819c0,0,0,0.033,0,0.049c0,12.39-10.039,22.418-22.429,22.418
|
||||||
|
c-12.389,0-22.421-10.059-22.421-22.448c0-0.017,0-22.837,0-22.837h7.989v22.819c0,7.967,6.466,14.457,14.433,14.457
|
||||||
|
c7.966,0,14.424-6.491,14.424-14.457v-22.819H-438.316z"/>
|
||||||
|
<path fill="#07242D" d="M-385.244,428.166c0,12.501-10.133,22.636-22.636,22.636c-5.485,0-10.514-1.95-14.431-5.196v5.196h-8.218
|
||||||
|
c0.005-0.516,0.005-63.931,0.005-63.931h8.217l-0.004,23.854c3.918-3.246,8.947-5.196,14.432-5.196
|
||||||
|
C-395.377,405.529-385.242,415.664-385.244,428.166z M-393.437,428.166c0-7.976-6.466-14.441-14.442-14.441
|
||||||
|
c-7.793,0-14.443,6.329-14.443,14.418c0,8.089,6.649,14.464,14.443,14.464C-399.903,442.607-393.437,436.142-393.437,428.166z"/>
|
||||||
|
<path fill="#07242D" d="M-335.539,431.11h-36.518c1.375,6.517,7.157,11.435,14.075,11.435c4.514,0,8.538-2.095,11.172-5.362h9.577
|
||||||
|
c-3.496,8.008-11.475,13.619-20.748,13.619c-12.489,0-22.644-10.173-22.644-22.676c0-12.503,10.155-22.608,22.644-22.608
|
||||||
|
C-344.426,405.411-333.664,417.688-335.539,431.11z M-344.611,422.85c-2.103-5.316-7.296-9.06-13.371-9.06
|
||||||
|
c-6.076,0-11.275,3.746-13.382,9.06H-344.611z"/>
|
||||||
|
<path fill="#07242D" d="M-306.194,420.895v7.548h-23.302v-7.548H-306.194z"/>
|
||||||
|
<path fill="#07242D" d="M-252.987,428.166c0,12.501-10.133,22.636-22.636,22.636c-5.485,0-10.514-1.95-14.431-5.196v5.196h-8.218
|
||||||
|
c0.005-0.516,0.005-63.931,0.005-63.931h8.218l-0.004,23.854c3.918-3.246,8.946-5.196,14.431-5.196
|
||||||
|
C-263.12,405.529-252.985,415.664-252.987,428.166z M-261.181,428.166c0-7.976-6.467-14.441-14.442-14.441
|
||||||
|
c-7.794,0-14.443,6.329-14.443,14.418c0,8.089,6.649,14.464,14.443,14.464C-267.647,442.607-261.181,436.142-261.181,428.166z"/>
|
||||||
|
<path fill="#07242D" d="M-203.283,431.11h-36.518c1.375,6.517,7.157,11.435,14.075,11.435c4.514,0,8.538-2.095,11.172-5.362h9.577
|
||||||
|
c-3.496,8.008-11.475,13.619-20.748,13.619c-12.489,0-22.644-10.173-22.644-22.676c0-12.503,10.155-22.608,22.644-22.608
|
||||||
|
C-212.17,405.411-201.408,417.688-203.283,431.11z M-212.355,422.85c-2.103-5.316-7.296-9.06-13.371-9.06
|
||||||
|
c-6.076,0-11.275,3.746-13.382,9.06H-212.355z"/>
|
||||||
|
<path fill="#07242D" d="M-151.113,428.114c0,15.871,0,22.688,0,22.688h-8.262c0,0,0-14.878,0-22.688
|
||||||
|
c0-8.095-6.591-14.327-14.363-14.327c-7.772,0-14.393,6.163-14.393,14.327c0,7.814,0,22.688,0,22.688h-8.26v-45.285
|
||||||
|
c0,0,3.539,0,8.26,0v5.101c0,0,5.421-5.101,14.393-5.101C-163.095,405.517-151.113,413.789-151.113,428.114z"/>
|
||||||
|
<path fill="#07242D" d="M-112.598,438.373l5.799,5.798c-4.098,4.097-9.758,6.632-16.01,6.632c-6.252,0-11.912-2.534-16.01-6.632
|
||||||
|
c-4.097-4.098-6.632-9.758-6.632-16.01s2.534-11.912,6.632-16.01c4.098-4.097,9.758-6.632,16.01-6.632
|
||||||
|
c6.252,0,11.912,2.534,16.01,6.632l-5.799,5.799c-2.613-2.615-6.224-4.231-10.212-4.231c-3.988,0-7.599,1.617-10.212,4.231
|
||||||
|
c-2.614,2.613-4.23,6.224-4.23,10.212s1.616,7.599,4.23,10.213c2.613,2.613,6.224,4.229,10.212,4.229
|
||||||
|
C-118.821,442.602-115.211,440.986-112.598,438.373z"/>
|
||||||
|
<path fill="#07242D" d="M-55.678,428.174c0,15.827,0,22.626,0,22.626h-8.239c0,0,0-14.838,0-22.626
|
||||||
|
c0-8.072-6.575-14.287-14.324-14.287c-7.751,0-14.353,6.146-14.353,14.287c0,7.793,0,22.626,0,22.626h-8.238v-63.929h8.238v23.856
|
||||||
|
c0,0,5.405-5.086,14.353-5.086C-67.626,405.641-55.678,413.889-55.678,428.174z"/>
|
||||||
|
</g>
|
||||||
|
<g display="inline">
|
||||||
|
<path fill="#07242D" d="M186.582,442.579v8.203c-5.588,0-10.623-2.012-14.594-5.346c-4.989-4.186-8.157-10.469-8.157-17.489
|
||||||
|
v-41.085h8.157v18.642h14.594v8.257h-14.594v14.386C172.1,436.134,178.571,442.579,186.582,442.579z"/>
|
||||||
|
<path fill="#07242D" d="M215.674,405.503v8.149c-7.739,0.015-14.037,6.152-14.317,13.818v23.312h-8.176v-45.279h8.176v5.169
|
||||||
|
C205.243,407.446,210.232,405.51,215.674,405.503z"/>
|
||||||
|
<path fill="#07242D" d="M220.928,395.003v-8.165h8.161v8.165H220.928z M220.928,450.782v-45.279h8.161v45.279H220.928z"/>
|
||||||
|
<path fill="#07242D" d="M279.137,405.503l-22.624,45.279l-22.647-45.279h9.271l13.376,26.737l13.349-26.737H279.137z"/>
|
||||||
|
<path fill="#07242D" d="M328.08,405.503c0,0,0,49.504,0,52.776c0,12.643-10.369,22.736-22.655,22.728
|
||||||
|
c-5.753,0-11.084-2.181-15.131-5.807l5.868-5.868c2.504,2.12,5.734,3.41,9.263,3.403c7.95,0,14.386-6.498,14.386-14.456v-12.651
|
||||||
|
c-3.944,3.264-8.979,5.154-14.386,5.154c-12.309,0.008-22.674-9.924-22.674-22.659c0-0.269,0-22.62,0-22.62h8.265
|
||||||
|
c0,0,0.004,22.014,0.004,22.62c0,7.919,6.448,14.463,14.406,14.456c7.95,0,14.386-6.506,14.386-14.456v-22.62H328.08z"/>
|
||||||
|
</g>
|
||||||
|
<g display="inline">
|
||||||
|
<path fill="#07242D" d="M1186.898,438.384c-0.411,4.687-4.656,12.67-15.302,12.67c-10.092,0-16.135-6.761-16.135-6.761
|
||||||
|
l5.797-5.801c4.906,4.664,10.338,4.372,10.338,4.372c3.473-0.238,6.258-2.643,6.469-5.471c0.242-3.235-2.009-5.486-6.469-6.124
|
||||||
|
c-2.098-0.307-7.184-0.791-11.36-4.533c-1.36-1.222-6.489-6.577-2.217-14.191c0.834-1.491,4.556-6.769,13.577-6.769
|
||||||
|
c0,0,7.434-0.53,14.311,5.086l-5.866,5.863c-1.16-0.96-4.46-2.904-8.444-2.881c-7.207,0.046-7.007,4.011-7.007,4.011
|
||||||
|
c0.061,3.166,2.874,4.864,7.007,5.409C1185.672,425.114,1187.309,433.743,1186.898,438.384z"/>
|
||||||
|
<path fill="#07242D" d="M1215.419,442.848v8.206c-5.59,0-10.626-2.013-14.599-5.348c-4.99-4.188-8.16-10.473-8.16-17.495v-41.099
|
||||||
|
h8.16v18.648h14.599v8.26h-14.599v14.391C1200.932,436.401,1207.405,442.848,1215.419,442.848z"/>
|
||||||
|
<path fill="#07242D" d="M1263.522,428.372v22.682h-22.705c-0.5,0-0.999-0.015-1.495-0.054c-6.431-0.423-12.128-3.527-15.985-8.214
|
||||||
|
c-3.289-4.003-5.171-8.928-5.186-14.414c0.526-25.548,35.106-31.264,44.03-7.699
|
||||||
|
C1263.068,423.132,1263.522,425.76,1263.522,428.372z M1255.131,428.372c0.054-12.824-15.563-19.132-24.433-10.135l-0.004-0.008
|
||||||
|
c-2.609,2.605-4.226,6.17-4.226,10.142c0,7.937,6.435,14.399,14.368,14.399c3.976,0,14.295,0,14.295,0
|
||||||
|
S1255.131,432.352,1255.131,428.372z"/>
|
||||||
|
<path fill="#07242D" d="M1293.898,405.76v8.152c-7.741,0.015-14.042,6.154-14.322,13.823v23.319h-8.179V405.76h8.179v5.171
|
||||||
|
C1283.464,407.704,1288.454,405.767,1293.898,405.76z"/>
|
||||||
|
<path fill="#07242D" d="M1344.448,428.411c0,12.509-10.135,22.643-22.639,22.643c-5.486,0-10.515-1.952-14.433-5.194v5.194h-8.221
|
||||||
|
c0.008-0.515,0.008-63.942,0.008-63.942h8.217l-0.004,23.857c3.919-3.25,8.947-5.202,14.433-5.202
|
||||||
|
C1334.313,405.767,1344.452,415.91,1344.448,428.411z M1336.254,428.411c0-7.975-6.466-14.445-14.445-14.445
|
||||||
|
c-7.795,0-14.445,6.331-14.445,14.422c0,8.091,6.65,14.468,14.445,14.468C1329.788,442.856,1336.254,436.394,1336.254,428.411z"/>
|
||||||
|
<path fill="#07242D" d="M1394.394,428.411c0,12.509-10.15,22.643-22.643,22.643s-22.651-10.135-22.651-22.643
|
||||||
|
s10.157-22.651,22.651-22.651S1394.394,415.91,1394.394,428.411z M1386.127,428.411c0-7.937-6.431-14.376-14.376-14.376
|
||||||
|
c-7.941,0-14.387,6.431-14.387,14.376s6.446,14.383,14.387,14.383C1379.696,442.794,1386.127,436.355,1386.127,428.411z"/>
|
||||||
|
<path fill="#07242D" d="M1444.414,428.372v22.682h-22.705c-0.499,0-0.999-0.015-1.494-0.054
|
||||||
|
c-6.431-0.423-12.128-3.527-15.985-8.214c-3.289-4.003-5.171-8.928-5.186-14.414c0.526-25.548,35.106-31.264,44.03-7.699
|
||||||
|
C1443.961,423.132,1444.414,425.76,1444.414,428.372z M1436.024,428.372c0.054-12.824-15.563-19.132-24.433-10.135l-0.004-0.008
|
||||||
|
c-2.609,2.605-4.226,6.17-4.226,10.142c0,7.937,6.435,14.399,14.368,14.399c3.976,0,14.295,0,14.295,0
|
||||||
|
S1436.024,432.352,1436.024,428.372z"/>
|
||||||
|
<path fill="#07242D" d="M1474.791,405.76v8.152c-7.741,0.015-14.042,6.154-14.322,13.823v23.319h-8.179V405.76h8.179v5.171
|
||||||
|
C1464.356,407.704,1469.347,405.767,1474.791,405.76z"/>
|
||||||
|
<path fill="#07242D" d="M1521.556,451.031h-8.214v-5.194c-3.919,3.242-8.951,5.194-14.43,5.194
|
||||||
|
c-12.501,0-22.635-10.127-22.635-22.628s10.135-22.636,22.635-22.636c5.478,0,10.511,1.952,14.43,5.194l0.008-23.85h8.221
|
||||||
|
C1521.572,387.112,1521.556,450.516,1521.556,451.031z M1513.35,428.38c0-8.091-6.646-14.422-14.437-14.422
|
||||||
|
c-7.975,0-14.445,6.469-14.445,14.445s6.469,14.437,14.445,14.437C1506.704,442.84,1513.35,436.471,1513.35,428.38z"/>
|
||||||
|
</g>
|
||||||
|
<g display="inline">
|
||||||
|
<path fill="#07242D" d="M1711.171,438.276l5.802,5.802c-4.1,4.096-9.763,6.632-16.014,6.632c-6.255,0-11.918-2.536-16.018-6.632
|
||||||
|
c-4.1-4.103-6.635-9.759-6.635-16.014s2.536-11.918,6.635-16.022c4.1-4.096,9.763-6.632,16.018-6.632
|
||||||
|
c6.251,0,11.915,2.536,16.014,6.632l-5.802,5.802c-2.613-2.613-6.224-4.234-10.213-4.234c-3.992,0-7.604,1.621-10.216,4.234
|
||||||
|
c-2.617,2.613-4.234,6.224-4.234,10.22c0,3.988,1.618,7.6,4.234,10.213c2.613,2.613,6.224,4.234,10.216,4.234
|
||||||
|
C1704.947,442.511,1708.559,440.889,1711.171,438.276z"/>
|
||||||
|
<path fill="#07242D" d="M1722.967,450.71v-63.95h8.241v63.95H1722.967z"/>
|
||||||
|
<path fill="#07242D" d="M1783.282,428.064c0,12.51-10.151,22.646-22.646,22.646c-12.495,0-22.654-10.136-22.654-22.646
|
||||||
|
s10.159-22.654,22.654-22.654C1773.131,405.41,1783.282,415.561,1783.282,428.064z M1775.013,428.064
|
||||||
|
c0-7.938-6.432-14.378-14.378-14.378c-7.942,0-14.389,6.432-14.389,14.378c0,7.946,6.447,14.385,14.389,14.385
|
||||||
|
C1768.581,442.449,1775.013,436.01,1775.013,428.064z"/>
|
||||||
|
<path fill="#07242D" d="M1833.833,405.41v22.823c0,0,0,0.038,0,0.054c0,12.395-10.04,22.423-22.435,22.423
|
||||||
|
c-12.395,0-22.427-10.059-22.427-22.454c0-0.015,0-22.846,0-22.846h7.992v22.823c0,7.976,6.466,14.462,14.435,14.462
|
||||||
|
c7.969,0,14.431-6.486,14.431-14.462V405.41H1833.833z"/>
|
||||||
|
<path fill="#07242D" d="M1884.777,450.687h-8.218v-5.195c-3.915,3.243-8.945,5.195-14.431,5.195
|
||||||
|
c-12.503,0-22.634-10.128-22.634-22.631c0-12.503,10.132-22.638,22.634-22.638c5.487,0,10.516,1.952,14.431,5.195l0.011-23.852
|
||||||
|
h8.219C1884.789,386.76,1884.773,450.172,1884.777,450.687z M1876.574,428.033c0-8.092-6.651-14.424-14.447-14.424
|
||||||
|
c-7.973,0-14.443,6.47-14.443,14.447c0,7.976,6.466,14.439,14.443,14.439C1869.923,442.495,1876.574,436.125,1876.574,428.033z"/>
|
||||||
|
<path fill="#07242D" d="M1922.865,438.038c-0.411,4.687-4.657,12.672-15.303,12.672c-10.094,0-16.137-6.762-16.137-6.762
|
||||||
|
l5.798-5.802c4.906,4.664,10.339,4.372,10.339,4.372c3.473-0.238,6.259-2.643,6.47-5.471c0.242-3.235-2.009-5.487-6.47-6.124
|
||||||
|
c-2.098-0.307-7.185-0.792-11.361-4.534c-1.36-1.222-6.489-6.578-2.217-14.193c0.834-1.491,4.557-6.77,13.578-6.77
|
||||||
|
c0,0,7.435-0.53,14.312,5.087l-5.867,5.863c-1.16-0.961-4.461-2.905-8.445-2.882c-7.208,0.046-7.008,4.011-7.008,4.011
|
||||||
|
c0.062,3.166,2.874,4.864,7.008,5.41C1921.639,424.767,1923.276,433.397,1922.865,438.038z"/>
|
||||||
|
<path fill="#07242D" d="M1975.107,428.041c0,12.526-10.151,22.73-22.661,22.73c-5.471,0-10.493-1.952-14.416-5.195v35.371h-8.276
|
||||||
|
V405.41h8.276v5.156c3.923-3.22,8.945-5.156,14.416-5.156C1964.956,405.41,1975.107,415.523,1975.107,428.041z M1966.831,428.041
|
||||||
|
c0-7.953-6.432-14.347-14.385-14.347s-14.416,6.393-14.416,14.347s6.463,14.462,14.416,14.462S1966.831,435.994,1966.831,428.041z
|
||||||
|
"/>
|
||||||
|
<path fill="#07242D" d="M1981.877,450.71v-63.95h8.245v63.95H1981.877z"/>
|
||||||
|
<path fill="#07242D" d="M2042.192,428.064c0,12.51-10.151,22.646-22.646,22.646c-12.495,0-22.654-10.136-22.654-22.646
|
||||||
|
s10.159-22.654,22.654-22.654C2032.041,405.41,2042.192,415.561,2042.192,428.064z M2033.916,428.064
|
||||||
|
c0-7.938-6.432-14.378-14.37-14.378c-7.946,0-14.393,6.432-14.393,14.378c0,7.946,6.447,14.385,14.393,14.385
|
||||||
|
C2027.484,442.449,2033.916,436.01,2033.916,428.064z"/>
|
||||||
|
<path fill="#07242D" d="M2049.016,394.906v-8.168h8.168v8.168H2049.016z M2049.016,450.71v-45.3h8.168v45.3H2049.016z"/>
|
||||||
|
<path fill="#07242D" d="M2087.737,442.503v8.207c-5.594,0-10.627-2.013-14.6-5.348c-4.987-4.188-8.161-10.474-8.161-17.497V386.76
|
||||||
|
h8.161v18.65h14.6v8.261h-14.6v14.393C2073.252,436.056,2079.722,442.503,2087.737,442.503z"/>
|
||||||
|
</g>
|
||||||
|
<g display="inline">
|
||||||
|
<path fill="#07242D" d="M690.837,442.596v8.206c-5.59,0-10.626-2.013-14.599-5.348c-4.99-4.188-8.16-10.473-8.16-17.495V386.86
|
||||||
|
h8.16v18.648h14.599v8.26h-14.599v14.391C676.35,436.15,682.823,442.596,690.837,442.596z"/>
|
||||||
|
<path fill="#07242D" d="M719.939,405.508v8.152c-7.737,0.015-14.042,6.154-14.322,13.823v23.319h-8.179v-45.294h8.179v5.171
|
||||||
|
C709.504,407.452,714.495,405.516,719.939,405.508z"/>
|
||||||
|
<path fill="#07242D" d="M766.789,428.12v22.682h-22.705c-0.499,0-0.999-0.015-1.494-0.054c-6.431-0.423-12.128-3.527-15.985-8.214
|
||||||
|
c-3.289-4.003-5.171-8.928-5.183-14.414c0.523-25.548,35.102-31.264,44.026-7.699C766.335,422.88,766.789,425.508,766.789,428.12z
|
||||||
|
M758.398,428.12c0.054-12.824-15.563-19.132-24.433-10.135l-0.004-0.008c-2.609,2.605-4.226,6.17-4.226,10.142
|
||||||
|
c0,7.937,6.435,14.399,14.368,14.399c3.976,0,14.295,0,14.295,0S758.398,432.101,758.398,428.12z"/>
|
||||||
|
<path fill="#07242D" d="M805.36,438.37l5.801,5.801c-4.099,4.095-9.762,6.631-16.016,6.631c-6.254,0-11.913-2.536-16.012-6.631
|
||||||
|
c-4.099-4.103-6.631-9.766-6.631-16.02c0-6.247,2.532-11.909,6.631-16.012c4.099-4.095,9.758-6.631,16.012-6.631
|
||||||
|
c6.254,0,11.917,2.536,16.016,6.631l-5.801,5.801c-2.612-2.612-6.224-4.234-10.215-4.234c-3.988,0-7.599,1.621-10.211,4.234
|
||||||
|
c-2.616,2.612-4.234,6.224-4.234,10.211c0,3.995,1.617,7.607,4.234,10.219c2.612,2.612,6.224,4.234,10.211,4.234
|
||||||
|
C799.136,442.604,802.747,440.983,805.36,438.37z"/>
|
||||||
|
<path fill="#07242D" d="M858.664,431.109h-36.527c1.375,6.516,7.161,11.433,14.08,11.433c4.514,0,8.54-2.098,11.172-5.363h9.581
|
||||||
|
c-3.5,8.014-11.479,13.623-20.753,13.623c-12.493,0-22.647-10.173-22.647-22.682c0-12.501,10.154-22.612,22.647-22.612
|
||||||
|
C849.774,405.4,860.539,417.679,858.664,431.109z M849.59,422.842c-2.105-5.317-7.295-9.059-13.373-9.059
|
||||||
|
s-11.276,3.742-13.385,9.059H849.59z"/>
|
||||||
|
<path fill="#07242D" d="M908.514,431.109h-36.527c1.375,6.516,7.161,11.433,14.08,11.433c4.514,0,8.54-2.098,11.172-5.363h9.581
|
||||||
|
c-3.5,8.014-11.479,13.623-20.753,13.623c-12.493,0-22.647-10.173-22.647-22.682c0-12.501,10.154-22.612,22.647-22.612
|
||||||
|
C899.625,405.4,910.389,417.679,908.514,431.109z M899.44,422.842c-2.105-5.317-7.295-9.059-13.373-9.059
|
||||||
|
s-11.276,3.742-13.385,9.059H899.44z"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
<path fill="#07242D" d="M186.351,471.553v8.229c-5.606,0-10.656-2.019-14.639-5.363c-5.005-4.199-8.182-10.502-8.182-17.544v-41.21
|
||||||
|
h8.182v18.699h14.639v8.282h-14.639v14.43C171.824,465.089,178.316,471.553,186.351,471.553z"/>
|
||||||
|
<path fill="#07242D" d="M215.533,434.363v8.175c-7.762,0.016-14.08,6.172-14.361,13.86v23.384h-8.202v-45.419h8.202v5.185
|
||||||
|
C205.069,436.313,210.074,434.371,215.533,434.363z"/>
|
||||||
|
<path fill="#07242D" d="M220.803,423.832v-8.191h8.186v8.191H220.803z M220.803,479.782v-45.419h8.186v45.419H220.803z"/>
|
||||||
|
<path fill="#07242D" d="M279.191,434.363l-22.694,45.419l-22.716-45.419h9.3l13.417,26.82l13.39-26.82H279.191z"/>
|
||||||
|
<path fill="#07242D" d="M328.286,434.363c0,0,0,49.656,0,52.938c0,12.682-10.402,22.805-22.725,22.798
|
||||||
|
c-5.771,0-11.118-2.188-15.178-5.824l5.887-5.887c2.512,2.126,5.751,3.42,9.291,3.413c7.975,0,14.431-6.519,14.431-14.5v-12.689
|
||||||
|
c-3.956,3.275-9.006,5.17-14.431,5.17c-12.346,0.007-22.743-9.954-22.743-22.728c0-0.27,0-22.69,0-22.69h8.291
|
||||||
|
c0,0,0.004,22.082,0.004,22.69c0,7.944,6.468,14.508,14.45,14.5c7.975,0,14.431-6.526,14.431-14.5v-22.691H328.286z"/>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
<polygon fill="#FFFFFF" points="250.554,44.159 116.876,121.396 116.877,277.11 250.537,354.962 384.229,277.154 384.229,121.392
|
||||||
|
"/>
|
||||||
|
<g>
|
||||||
|
<path fill="#1904DA" d="M246.902,255.524v-32.282c-14.609-6.898-23.783-21.236-23.594-36.882l-30.086-17.374
|
||||||
|
c-1.892,17.15,2.057,34.896,11.198,50.171C214.507,236.009,228.793,248.237,246.902,255.524z"/>
|
||||||
|
<path fill="#1904DA" d="M246.902,299.761v-37.468c-20.381-7.638-36.445-21.086-47.752-39.981
|
||||||
|
c-10.325-17.249-14.466-37.337-11.695-56.657l-27.931-16.129C143.482,211.352,180.751,275.442,246.902,299.761z"/>
|
||||||
|
<path fill="#08B1D5" d="M253.779,261.938v37.797c64.918-24.892,103.171-90.209,87.852-149.994l-27.747,16.165
|
||||||
|
c3.578,20.856,0.191,40.77-9.818,57.644C294.046,240.446,276.67,253.707,253.779,261.938z"/>
|
||||||
|
<path fill="#08B1D5" d="M253.779,223.185v32.371c20.424-7.774,35.964-19.9,45.004-35.138c8.877-14.969,12.116-32.637,9.411-51.205
|
||||||
|
l-30.06,17.33C277.985,201.395,269.156,214.685,253.779,223.185z"/>
|
||||||
|
<path fill="#FFC900" d="M282.1,131.138c12.628,6.157,22.948,15.961,29.885,28.378l27.012-15.598
|
||||||
|
c-0.182-0.255-0.351-0.51-0.509-0.764c-10.628-17.188-24.658-30.12-41.707-38.435c-47.439-23.13-106.339-5.896-134.71,39.2
|
||||||
|
l27.117,15.654C209.496,128.018,250.069,115.518,282.1,131.138z"/>
|
||||||
|
<path fill="#FFC900" d="M251.284,165.445c4.256,0,8.519,0.931,12.516,2.881h0.002c5.253,2.564,9.549,6.643,12.458,11.821
|
||||||
|
l30.404-17.558c-6.323-11.352-15.738-20.312-27.257-25.93c-29.172-14.223-66.203-2.802-84.893,25.99l30.251,17.46
|
||||||
|
C231.056,170.735,241.141,165.445,251.284,165.445z"/>
|
||||||
|
<path fill="#08B1D5" d="M253.779,347.086l125.184-72.957V127.993l-31.828,18.542c17.491,64.215-23.319,134.084-93.356,159.757
|
||||||
|
V347.086z"/>
|
||||||
|
<path fill="#1904DA" d="M154.014,146.345l-31.873-18.406v146.151l124.761,72.993v-40.779
|
||||||
|
C176.723,281.599,136.109,211.643,154.014,146.345z"/>
|
||||||
|
<path fill="#FFC900" d="M299.471,99.198c18.111,8.832,32.995,22.533,44.241,40.722c0.179,0.289,0.397,0.592,0.636,0.908
|
||||||
|
l31.536-18.21l-125.33-72.378l-125.358,72.395l31.548,18.211C186.722,92.98,249.169,74.667,299.471,99.198z"/>
|
||||||
|
<path fill="#FF0036" d="M271.797,187.57c0.002-0.035,0.052-1.226-0.036-3.143c-0.251-0.783-3.208-6.558-10.592-10.586
|
||||||
|
c-5.045-2.751-11.518-3.068-17.769-0.874c-6.124,2.152-11.322,6.434-14.303,11.769c-0.036,0.464-0.105,1.563-0.052,2.832
|
||||||
|
c0.404,9.974,6.573,23.534,19.156,29.736l1.938,0.925l1.682-0.899C264.046,210.487,271.328,199.641,271.797,187.57z"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
<path fill="#07242D" d="M186.846,398.474H175.2c-6.421,0-11.646-5.224-11.646-11.646c0-6.422,5.224-11.646,11.646-11.646
|
||||||
|
s11.646,5.224,11.646,11.646V398.474z M175.2,379.912c-3.814,0-6.916,3.103-6.916,6.916c0,3.814,3.103,6.916,6.916,6.916h6.916
|
||||||
|
v-6.916C182.117,383.015,179.014,379.912,175.2,379.912z"/>
|
||||||
|
<path fill="#07242D" d="M264.991,398.474h-11.646c-6.421,0-11.646-5.224-11.646-11.646c0-6.422,5.224-11.646,11.646-11.646
|
||||||
|
c6.421,0,11.646,5.224,11.646,11.646V398.474z M253.345,379.912c-3.814,0-6.916,3.103-6.916,6.916c0,3.814,3.103,6.916,6.916,6.916
|
||||||
|
h6.916v-6.916C260.261,383.015,257.159,379.912,253.345,379.912z"/>
|
||||||
|
<path fill="#07242D" d="M227.295,398.479c-6.424,0-11.651-5.226-11.651-11.651V375.9h4.731v10.928c0,3.815,3.104,6.919,6.919,6.919
|
||||||
|
c3.815,0,6.919-3.104,6.919-6.919V375.9h4.731v10.928C238.946,393.253,233.719,398.479,227.295,398.479z"/>
|
||||||
|
<path fill="#07242D" d="M201.245,375.183c-6.421,0-11.645,5.224-11.645,11.646c0,6.421,5.224,11.646,11.645,11.646l4.729-4.729
|
||||||
|
h-4.729c-3.814,0-6.916-3.103-6.916-6.916c0-3.814,3.103-6.916,6.916-6.916c3.814,0,6.916,3.103,6.916,6.916v22.76h4.729v-22.76
|
||||||
|
C212.891,380.407,207.666,375.183,201.245,375.183z"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 18 KiB |
BIN
brand/Trivy-OSS-Logo-White-Horizontal-RGB-2022.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
84
brand/Trivy-OSS-Logo-White-Horizontal-RGB-2022.svg
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 26.3.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="_x30_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
viewBox="0 0 265 135" enable-background="new 0 0 265 135" xml:space="preserve">
|
||||||
|
<g display="none">
|
||||||
|
<polygon display="inline" fill="#FFFFFF" points="65.469,9.61 12.669,40.117 12.669,101.621 65.463,132.371 118.268,101.639
|
||||||
|
118.268,40.115 "/>
|
||||||
|
<g display="inline">
|
||||||
|
<path fill="#08B1D5" d="M64.511,80.035c-5.972-2.687-9.502-8.433-9.313-14.534l-12.765-7.371c-0.952,7.062,0.569,14.449,4.4,20.85
|
||||||
|
c4.078,6.813,9.966,11.887,17.678,14.825V80.035L64.511,80.035z"/>
|
||||||
|
<path fill="#08B1D5" d="M64.511,111.257V95.432c-8.26-3.017-14.588-8.448-18.931-15.703c-4.108-6.864-5.671-14.819-4.507-22.384
|
||||||
|
l-11.864-6.851C22.412,75.299,37.662,101.72,64.511,111.257z"/>
|
||||||
|
<path fill="#0D819B" d="M66.259,95.288v15.969c26.352-9.758,42.17-36.132,35.489-60.682l-11.8,6.874
|
||||||
|
c1.473,8.16,0.189,16.115-3.759,22.77C82.134,87.057,75.052,92.189,66.259,95.288z"/>
|
||||||
|
<path fill="#0D819B" d="M75.879,65.569c0.053,5.924-3.429,11.136-9.62,14.466v13.769c8.227-2.999,14.873-7.918,18.675-14.329
|
||||||
|
c3.681-6.207,4.934-13.613,3.671-21.243L75.879,65.569z"/>
|
||||||
|
<path fill="#F69421" d="M77.717,44.4c4.977,2.427,9.031,6.315,11.724,11.244c0.035,0.065,0.069,0.132,0.104,0.198l11.574-6.684
|
||||||
|
c-0.184-0.232-0.361-0.466-0.506-0.701c-4.246-6.868-9.855-12.036-16.673-15.361c-19.245-9.385-42.827-2.309-54.094,16.087
|
||||||
|
l11.546,6.665C49.232,43.242,65.013,38.204,77.717,44.4z"/>
|
||||||
|
<path fill="#F69421" d="M70.489,59.089c2.06,1.005,3.731,2.627,4.832,4.692c0.037,0.07,0.07,0.143,0.105,0.214l12.854-7.423
|
||||||
|
c-0.04-0.076-0.079-0.153-0.12-0.228c-2.546-4.662-6.379-8.339-11.082-10.632c-12.018-5.861-26.965-1.08-34.421,10.866
|
||||||
|
l12.783,7.379C58.771,58.613,65.217,56.518,70.489,59.089z"/>
|
||||||
|
<path fill="#0D819B" d="M116.672,41.881l-13.621,7.936c7.185,25.544-9.291,53.076-36.791,62.992v17.294l50.413-29.381V41.881z"/>
|
||||||
|
<path fill="#08B1D5" d="M14.265,41.864v58.842l50.245,29.397v-17.294C36.51,103.127,20.607,75.545,27.905,49.74l-13.001-7.508
|
||||||
|
L14.265,41.864z"/>
|
||||||
|
<path fill="#F69421" d="M14.987,40.606l1.484,0.857l12.109,6.989C40.23,29.398,64.649,22.066,84.579,31.784
|
||||||
|
c7.069,3.448,12.881,8.799,17.274,15.904c0.139,0.225,0.333,0.472,0.543,0.731l13.542-7.82l-50.47-29.146L14.987,40.606z"/>
|
||||||
|
<path fill="#F0DF36" d="M66.202,78.433c4.968-2.778,7.95-7.226,8.141-12.159c0,0,0.022-0.489-0.015-1.283
|
||||||
|
c-0.007-0.163-1.102-2.766-4.435-4.583c-4.476-2.441-10.828-0.093-13.372,4.583c0,0-0.061,0.574-0.033,1.283
|
||||||
|
c0.182,4.483,2.945,9.749,7.836,12.159l0.991,0.473L66.202,78.433z"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
<path fill="#FFFFFF" d="M148.629,103.076v5.928c-4.038,0-7.676-1.454-10.545-3.863c-3.605-3.025-5.894-7.565-5.894-12.638V62.815
|
||||||
|
h5.894v13.471h10.545v5.966h-10.545v10.395C138.164,98.419,142.84,103.076,148.629,103.076z"/>
|
||||||
|
<path fill="#FFFFFF" d="M169.65,76.285v5.889c-5.591,0.011-10.143,4.446-10.345,9.984v16.845h-5.908V76.285h5.908v3.735
|
||||||
|
C162.113,77.689,165.718,76.291,169.65,76.285z"/>
|
||||||
|
<path fill="#FFFFFF" d="M173.447,68.698v-5.9h5.897v5.9H173.447z M173.447,109.003V76.285h5.897v32.719H173.447z"/>
|
||||||
|
<path fill="#FFFFFF" d="M215.508,76.285l-16.348,32.719l-16.364-32.719h6.699l9.665,19.32l9.646-19.32L215.508,76.285z"/>
|
||||||
|
<path fill="#FFFFFF" d="M250.874,76.285c0,0,0,35.771,0,38.135c0,9.136-7.493,16.428-16.37,16.423
|
||||||
|
c-4.157,0-8.009-1.576-10.934-4.196l4.24-4.24c1.809,1.532,4.143,2.464,6.693,2.459c5.745,0,10.396-4.696,10.396-10.446v-9.141
|
||||||
|
c-2.85,2.359-6.488,3.724-10.396,3.724c-8.894,0.005-16.384-7.171-16.384-16.372c0-0.194,0-16.345,0-16.345h5.972
|
||||||
|
c0,0,0.003,15.907,0.003,16.345c0,5.722,4.659,10.451,10.409,10.446c5.745,0,10.396-4.701,10.396-10.446V76.285H250.874z"/>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
<polygon fill="#FFFFFF" points="65.469,5.431 10.124,37.409 10.125,101.877 65.462,134.109 120.813,101.895 120.813,37.407 "/>
|
||||||
|
<g>
|
||||||
|
<path fill="#1904DA" d="M63.957,92.94V79.575c-6.048-2.856-9.846-8.792-9.768-15.27l-12.456-7.193
|
||||||
|
c-0.783,7.101,0.852,14.447,4.636,20.771C50.545,84.86,56.46,89.923,63.957,92.94z"/>
|
||||||
|
<path fill="#1904DA" d="M63.957,111.255V95.742c-8.438-3.162-15.089-8.73-19.77-16.553c-4.275-7.141-5.989-15.458-4.842-23.457
|
||||||
|
l-11.564-6.678C21.14,74.652,36.57,101.186,63.957,111.255z"/>
|
||||||
|
<path fill="#08B1D5" d="M66.804,95.596v15.649c26.877-10.306,42.715-37.348,36.372-62.1l-11.488,6.693
|
||||||
|
c1.481,8.635,0.079,16.879-4.065,23.865C83.476,86.697,76.281,92.188,66.804,95.596z"/>
|
||||||
|
<path fill="#08B1D5" d="M66.804,79.551v13.402c8.456-3.219,14.89-8.239,18.632-14.548c3.675-6.197,5.016-13.512,3.896-21.2
|
||||||
|
L76.888,64.38C76.826,70.53,73.171,76.032,66.804,79.551z"/>
|
||||||
|
<path fill="#FFC900" d="M78.53,41.442c5.228,2.549,9.501,6.608,12.373,11.749l11.183-6.458c-0.075-0.105-0.146-0.211-0.211-0.316
|
||||||
|
c-4.4-7.116-10.209-12.47-17.267-15.913c-19.641-9.576-44.026-2.441-55.772,16.23l11.227,6.481
|
||||||
|
C48.47,40.15,65.268,34.975,78.53,41.442z"/>
|
||||||
|
<path fill="#FFC900" d="M65.771,55.646c1.762,0,3.527,0.385,5.182,1.193h0.001c2.175,1.062,3.954,2.75,5.158,4.894L88.7,54.463
|
||||||
|
c-2.618-4.7-6.516-8.409-11.285-10.735c-12.078-5.888-27.409-1.16-35.147,10.76l12.525,7.229
|
||||||
|
C57.397,57.836,61.572,55.646,65.771,55.646z"/>
|
||||||
|
<path fill="#08B1D5" d="M66.804,130.848l51.828-30.205V40.14l-13.177,7.677c7.242,26.586-9.654,55.513-38.651,66.142V130.848z"/>
|
||||||
|
<path fill="#1904DA" d="M25.5,47.738l-13.196-7.621v60.509l51.653,30.22v-16.883C34.902,103.736,18.087,74.773,25.5,47.738z"/>
|
||||||
|
<path fill="#FFC900" d="M85.722,28.218c7.498,3.656,13.661,9.329,18.316,16.859c0.074,0.12,0.164,0.245,0.263,0.376l13.056-7.539
|
||||||
|
L65.469,7.948l-51.9,29.973l13.061,7.54C39.042,25.644,64.896,18.062,85.722,28.218z"/>
|
||||||
|
<path fill="#FF0036" d="M74.264,64.806c0.001-0.014,0.022-0.508-0.015-1.301c-0.104-0.324-1.328-2.715-4.385-4.383
|
||||||
|
c-2.089-1.139-4.769-1.27-7.357-0.362c-2.536,0.891-4.688,2.664-5.922,4.873c-0.015,0.192-0.044,0.647-0.022,1.173
|
||||||
|
c0.167,4.129,2.721,9.743,7.931,12.311l0.802,0.383l0.696-0.372C71.055,74.294,74.07,69.803,74.264,64.806z"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
<path fill="#FFFFFF" d="M149.768,48.152h-8.789c-4.846,0-8.789-3.943-8.789-8.789c0-4.846,3.943-8.789,8.789-8.789
|
||||||
|
s8.789,3.943,8.789,8.789V48.152z M140.979,34.143c-2.878,0-5.22,2.342-5.22,5.22c0,2.878,2.342,5.22,5.22,5.22h5.22v-5.22
|
||||||
|
C146.199,36.485,143.858,34.143,140.979,34.143z"/>
|
||||||
|
<path fill="#FFFFFF" d="M208.745,48.152h-8.789c-4.846,0-8.789-3.943-8.789-8.789c0-4.846,3.943-8.789,8.789-8.789
|
||||||
|
c4.846,0,8.789,3.943,8.789,8.789V48.152z M199.956,34.143c-2.878,0-5.22,2.342-5.22,5.22c0,2.878,2.342,5.22,5.22,5.22h5.22v-5.22
|
||||||
|
C205.176,36.485,202.835,34.143,199.956,34.143z"/>
|
||||||
|
<path fill="#FFFFFF" d="M180.296,48.156c-4.848,0-8.793-3.944-8.793-8.793v-8.248h3.571v8.248c0,2.879,2.343,5.222,5.222,5.222
|
||||||
|
c2.879,0,5.222-2.343,5.222-5.222v-8.248h3.571v8.248C189.089,44.211,185.144,48.156,180.296,48.156z"/>
|
||||||
|
<path fill="#FFFFFF" d="M160.636,30.574c-4.846,0-8.789,3.943-8.789,8.789c0,4.846,3.943,8.789,8.789,8.789l3.569-3.569h-3.569
|
||||||
|
c-2.878,0-5.22-2.342-5.22-5.22c0-2.878,2.342-5.22,5.22-5.22c2.878,0,5.22,2.342,5.22,5.22V56.54h3.569V39.363
|
||||||
|
C169.425,34.516,165.482,30.574,160.636,30.574z"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 7.0 KiB |
BIN
brand/Trivy-OSS-Logo-White-Stacked-RGB-2022.png
Normal file
|
After Width: | Height: | Size: 80 KiB |
59
brand/Trivy-OSS-Logo-White-Stacked-RGB-2022.svg
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 26.3.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="_x30_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
viewBox="0 0 500 524" enable-background="new 0 0 500 524" xml:space="preserve">
|
||||||
|
<g>
|
||||||
|
<path fill="#FFFFFF" d="M186.351,471.553v8.229c-5.606,0-10.656-2.019-14.639-5.363c-5.005-4.199-8.182-10.502-8.182-17.544v-41.21
|
||||||
|
h8.182v18.699h14.639v8.282h-14.639v14.43C171.824,465.089,178.316,471.553,186.351,471.553z"/>
|
||||||
|
<path fill="#FFFFFF" d="M215.533,434.363v8.175c-7.762,0.016-14.08,6.172-14.361,13.86v23.384h-8.202v-45.419h8.202v5.185
|
||||||
|
C205.069,436.313,210.074,434.371,215.533,434.363z"/>
|
||||||
|
<path fill="#FFFFFF" d="M220.803,423.832v-8.191h8.186v8.191H220.803z M220.803,479.782v-45.419h8.186v45.419H220.803z"/>
|
||||||
|
<path fill="#FFFFFF" d="M279.191,434.363l-22.694,45.419l-22.716-45.419h9.3l13.417,26.82l13.39-26.82H279.191z"/>
|
||||||
|
<path fill="#FFFFFF" d="M328.286,434.363c0,0,0,49.656,0,52.938c0,12.682-10.402,22.805-22.725,22.798
|
||||||
|
c-5.771,0-11.118-2.188-15.178-5.824l5.887-5.887c2.512,2.126,5.751,3.42,9.291,3.413c7.975,0,14.431-6.519,14.431-14.5v-12.689
|
||||||
|
c-3.956,3.275-9.006,5.17-14.431,5.17c-12.346,0.007-22.743-9.954-22.743-22.728c0-0.27,0-22.69,0-22.69h8.291
|
||||||
|
c0,0,0.004,22.082,0.004,22.69c0,7.944,6.468,14.508,14.45,14.5c7.975,0,14.431-6.526,14.431-14.5v-22.691H328.286z"/>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
<polygon fill="#FFFFFF" points="250.554,44.159 116.876,121.396 116.877,277.11 250.537,354.962 384.229,277.154 384.229,121.392
|
||||||
|
"/>
|
||||||
|
<g>
|
||||||
|
<path fill="#1904DA" d="M246.902,255.524v-32.282c-14.609-6.898-23.783-21.236-23.594-36.882l-30.086-17.374
|
||||||
|
c-1.892,17.15,2.057,34.896,11.198,50.171C214.507,236.009,228.793,248.237,246.902,255.524z"/>
|
||||||
|
<path fill="#1904DA" d="M246.902,299.761v-37.468c-20.381-7.638-36.445-21.086-47.752-39.981
|
||||||
|
c-10.325-17.249-14.466-37.337-11.695-56.657l-27.931-16.129C143.482,211.352,180.751,275.442,246.902,299.761z"/>
|
||||||
|
<path fill="#08B1D5" d="M253.779,261.938v37.797c64.918-24.892,103.171-90.209,87.852-149.994l-27.747,16.165
|
||||||
|
c3.578,20.856,0.191,40.77-9.818,57.644C294.046,240.446,276.67,253.707,253.779,261.938z"/>
|
||||||
|
<path fill="#08B1D5" d="M253.779,223.185v32.371c20.424-7.774,35.964-19.9,45.004-35.138c8.877-14.969,12.116-32.637,9.411-51.205
|
||||||
|
l-30.06,17.33C277.985,201.395,269.156,214.685,253.779,223.185z"/>
|
||||||
|
<path fill="#FFC900" d="M282.1,131.138c12.628,6.157,22.948,15.961,29.885,28.378l27.012-15.598
|
||||||
|
c-0.182-0.255-0.351-0.51-0.509-0.764c-10.628-17.188-24.658-30.12-41.707-38.435c-47.439-23.13-106.339-5.896-134.71,39.2
|
||||||
|
l27.117,15.654C209.496,128.018,250.069,115.518,282.1,131.138z"/>
|
||||||
|
<path fill="#FFC900" d="M251.284,165.445c4.256,0,8.519,0.931,12.516,2.881h0.002c5.253,2.564,9.549,6.643,12.458,11.821
|
||||||
|
l30.404-17.558c-6.323-11.352-15.738-20.312-27.257-25.93c-29.172-14.223-66.203-2.802-84.893,25.99l30.251,17.46
|
||||||
|
C231.056,170.735,241.141,165.445,251.284,165.445z"/>
|
||||||
|
<path fill="#08B1D5" d="M253.779,347.086l125.184-72.957V127.993l-31.828,18.542c17.491,64.215-23.319,134.084-93.356,159.757
|
||||||
|
V347.086z"/>
|
||||||
|
<path fill="#1904DA" d="M154.014,146.345l-31.873-18.406v146.151l124.761,72.993v-40.779
|
||||||
|
C176.723,281.599,136.109,211.643,154.014,146.345z"/>
|
||||||
|
<path fill="#FFC900" d="M299.471,99.198c18.111,8.832,32.995,22.533,44.241,40.722c0.179,0.289,0.397,0.592,0.636,0.908
|
||||||
|
l31.536-18.21l-125.33-72.378l-125.358,72.395l31.548,18.211C186.722,92.98,249.169,74.667,299.471,99.198z"/>
|
||||||
|
<path fill="#FF0036" d="M271.797,187.57c0.002-0.035,0.052-1.226-0.036-3.143c-0.251-0.783-3.208-6.558-10.592-10.586
|
||||||
|
c-5.045-2.751-11.518-3.068-17.769-0.874c-6.124,2.152-11.322,6.434-14.303,11.769c-0.036,0.464-0.105,1.563-0.052,2.832
|
||||||
|
c0.404,9.974,6.573,23.534,19.156,29.736l1.938,0.925l1.682-0.899C264.046,210.487,271.328,199.641,271.797,187.57z"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
<path fill="#FFFFFF" d="M186.846,398.474H175.2c-6.421,0-11.646-5.224-11.646-11.646c0-6.422,5.224-11.646,11.646-11.646
|
||||||
|
s11.646,5.224,11.646,11.646V398.474z M175.2,379.912c-3.814,0-6.916,3.103-6.916,6.916c0,3.814,3.103,6.916,6.916,6.916h6.916
|
||||||
|
v-6.916C182.117,383.015,179.014,379.912,175.2,379.912z"/>
|
||||||
|
<path fill="#FFFFFF" d="M264.991,398.474h-11.646c-6.421,0-11.646-5.224-11.646-11.646c0-6.422,5.224-11.646,11.646-11.646
|
||||||
|
c6.421,0,11.646,5.224,11.646,11.646V398.474z M253.345,379.912c-3.814,0-6.916,3.103-6.916,6.916c0,3.814,3.103,6.916,6.916,6.916
|
||||||
|
h6.916v-6.916C260.261,383.015,257.159,379.912,253.345,379.912z"/>
|
||||||
|
<path fill="#FFFFFF" d="M227.295,398.479c-6.424,0-11.651-5.226-11.651-11.651V375.9h4.731v10.928c0,3.815,3.104,6.919,6.919,6.919
|
||||||
|
c3.815,0,6.919-3.104,6.919-6.919V375.9h4.731v10.928C238.946,393.253,233.719,398.479,227.295,398.479z"/>
|
||||||
|
<path fill="#FFFFFF" d="M201.245,375.183c-6.421,0-11.645,5.224-11.645,11.646c0,6.421,5.224,11.646,11.645,11.646l4.729-4.729
|
||||||
|
h-4.729c-3.814,0-6.916-3.103-6.916-6.916c0-3.814,3.103-6.916,6.916-6.916c3.814,0,6.916,3.103,6.916,6.916v22.76h4.729v-22.76
|
||||||
|
C212.891,380.407,207.666,375.183,201.245,375.183z"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 4.9 KiB |
2
brand/readme.md
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
This directory contains media assets, such as the Trivy logo.
|
||||||
|
Assets under this directory are provided under the Creative Commons - BY 4.0 License. For more details, see here: <https://creativecommons.org/licenses/by/4.0/>
|
||||||
@@ -1,27 +1,29 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
TRIVY_VERSION=$(find dist/ -type f -name "*64bit.rpm" -printf "%f\n" | head -n1 | sed -nre 's/^[^0-9]*(([0-9]+\.)*[0-9]+).*/\1/p')
|
||||||
|
|
||||||
function create_rpm_repo () {
|
function create_rpm_repo () {
|
||||||
version=$1
|
version=$1
|
||||||
rpm_path=rpm/releases/${version}/x86_64
|
rpm_path=rpm/releases/${version}/x86_64
|
||||||
|
|
||||||
RPM_EL=$(find ../dist/ -type f -name "*64bit.rpm" -printf "%f\n" | head -n1 | sed -e "s/_/-/g" -e "s/-Linux/.el$version/" -e "s/-64bit/.x86_64/")
|
|
||||||
echo $RPM_EL
|
|
||||||
|
|
||||||
mkdir -p $rpm_path
|
mkdir -p $rpm_path
|
||||||
cp ../dist/*64bit.rpm ${rpm_path}/${RPM_EL}
|
cp ../dist/*64bit.rpm ${rpm_path}/
|
||||||
|
|
||||||
createrepo --update $rpm_path
|
createrepo_c -u https://github.com/aquasecurity/trivy/releases/download/ --location-prefix="v"$TRIVY_VERSION --update $rpm_path
|
||||||
|
|
||||||
|
rm ${rpm_path}/*64bit.rpm
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo "Create RPM releases for Trivy v$TRIVY_VERSION"
|
||||||
|
|
||||||
cd trivy-repo
|
cd trivy-repo
|
||||||
|
|
||||||
VERSIONS=(5 6 7 8)
|
VERSIONS=(5 6 7 8 9)
|
||||||
for version in ${VERSIONS[@]}; do
|
for version in ${VERSIONS[@]}; do
|
||||||
echo "Processing RHEL/CentOS $version..."
|
echo "Processing RHEL/CentOS $version..."
|
||||||
create_rpm_repo $version
|
create_rpm_repo $version
|
||||||
done
|
done
|
||||||
|
|
||||||
git add .
|
git add .
|
||||||
git commit -m "Update rpm packages"
|
git commit -m "Update rpm packages for Trivy v$TRIVY_VERSION"
|
||||||
git push origin main
|
git push origin main
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,16 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
"golang.org/x/xerrors"
|
||||||
|
|
||||||
"github.com/aquasecurity/trivy/pkg/commands"
|
"github.com/aquasecurity/trivy/pkg/commands"
|
||||||
"github.com/aquasecurity/trivy/pkg/log"
|
"github.com/aquasecurity/trivy/pkg/log"
|
||||||
|
"github.com/aquasecurity/trivy/pkg/plugin"
|
||||||
|
|
||||||
|
_ "modernc.org/sqlite" // sqlite driver for RPM DB and Java DB
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -12,9 +18,26 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
app := commands.NewApp(version)
|
if err := run(); err != nil {
|
||||||
err := app.Run(os.Args)
|
|
||||||
if err != nil {
|
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func run() error {
|
||||||
|
// Trivy behaves as the specified plugin.
|
||||||
|
if runAsPlugin := os.Getenv("TRIVY_RUN_AS_PLUGIN"); runAsPlugin != "" {
|
||||||
|
if !plugin.IsPredefined(runAsPlugin) {
|
||||||
|
return xerrors.Errorf("unknown plugin: %s", runAsPlugin)
|
||||||
|
}
|
||||||
|
if err := plugin.RunWithArgs(context.Background(), runAsPlugin, os.Args[1:]); err != nil {
|
||||||
|
return xerrors.Errorf("plugin error: %w", err)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
app := commands.NewApp(version)
|
||||||
|
if err := app.Execute(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|||||||
@@ -33,14 +33,16 @@
|
|||||||
"Severity": {
|
"Severity": {
|
||||||
"Label": "{{ $severity }}"
|
"Label": "{{ $severity }}"
|
||||||
},
|
},
|
||||||
"Title": "Trivy found a vulnerability to {{ .VulnerabilityID }} in container {{ $target }}",
|
"Title": "Trivy found a vulnerability to {{ .VulnerabilityID }} in container {{ $target }}, related to {{ .PkgName }}",
|
||||||
"Description": {{ escapeString $description | printf "%q" }},
|
"Description": {{ escapeString $description | printf "%q" }},
|
||||||
|
{{ if not (empty .PrimaryURL) -}}
|
||||||
"Remediation": {
|
"Remediation": {
|
||||||
"Recommendation": {
|
"Recommendation": {
|
||||||
"Text": "More information on this vulnerability is provided in the hyperlink",
|
"Text": "More information on this vulnerability is provided in the hyperlink",
|
||||||
"Url": "{{ .PrimaryURL }}"
|
"Url": "{{ .PrimaryURL }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{{ end -}}
|
||||||
"ProductFields": { "Product Name": "Trivy" },
|
"ProductFields": { "Product Name": "Trivy" },
|
||||||
"Resources": [
|
"Resources": [
|
||||||
{
|
{
|
||||||
@@ -66,7 +68,94 @@
|
|||||||
],
|
],
|
||||||
"RecordState": "ACTIVE"
|
"RecordState": "ACTIVE"
|
||||||
}
|
}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
{{- range .Misconfigurations -}}
|
||||||
|
{{- if $t_first -}}{{- $t_first = false -}}{{- else -}},{{- end -}}
|
||||||
|
{{- $severity := .Severity -}}
|
||||||
|
{{- if eq $severity "UNKNOWN" -}}
|
||||||
|
{{- $severity = "INFORMATIONAL" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- $description := .Description -}}
|
||||||
|
{{- if gt (len $description ) 512 -}}
|
||||||
|
{{- $description = (substr 0 512 $description) | printf "%v .." -}}
|
||||||
|
{{- end}}
|
||||||
|
{
|
||||||
|
"SchemaVersion": "2018-10-08",
|
||||||
|
"Id": "{{ $target }}/{{ .ID }}",
|
||||||
|
"ProductArn": "arn:aws:securityhub:{{ env "AWS_REGION" }}::product/aquasecurity/aquasecurity",
|
||||||
|
"GeneratorId": "Trivy/{{ .ID }}",
|
||||||
|
"AwsAccountId": "{{ env "AWS_ACCOUNT_ID" }}",
|
||||||
|
"Types": [ "Software and Configuration Checks" ],
|
||||||
|
"CreatedAt": "{{ now | date "2006-01-02T15:04:05.999999999Z07:00" }}",
|
||||||
|
"UpdatedAt": "{{ now | date "2006-01-02T15:04:05.999999999Z07:00" }}",
|
||||||
|
"Severity": {
|
||||||
|
"Label": "{{ $severity }}"
|
||||||
|
},
|
||||||
|
"Title": "Trivy found a misconfiguration in {{ $target }}: {{ .Title }}",
|
||||||
|
"Description": {{ escapeString $description | printf "%q" }},
|
||||||
|
"Remediation": {
|
||||||
|
"Recommendation": {
|
||||||
|
"Text": "{{ .Resolution }}",
|
||||||
|
"Url": "{{ .PrimaryURL }}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ProductFields": { "Product Name": "Trivy" },
|
||||||
|
"Resources": [
|
||||||
|
{
|
||||||
|
"Type": "Other",
|
||||||
|
"Id": "{{ $target }}",
|
||||||
|
"Partition": "aws",
|
||||||
|
"Region": "{{ env "AWS_REGION" }}",
|
||||||
|
"Details": {
|
||||||
|
"Other": {
|
||||||
|
"Message": "{{ .Message }}",
|
||||||
|
"Filename": "{{ $target }}",
|
||||||
|
"StartLine": "{{ .CauseMetadata.StartLine }}",
|
||||||
|
"EndLine": "{{ .CauseMetadata.EndLine }}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"RecordState": "ACTIVE"
|
||||||
|
}
|
||||||
|
{{- end -}}
|
||||||
|
{{- range .Secrets -}}
|
||||||
|
{{- if $t_first -}}{{- $t_first = false -}}{{- else -}},{{- end -}}
|
||||||
|
{{- $severity := .Severity -}}
|
||||||
|
{{- if eq $severity "UNKNOWN" -}}
|
||||||
|
{{- $severity = "INFORMATIONAL" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{
|
||||||
|
"SchemaVersion": "2018-10-08",
|
||||||
|
"Id": "{{ $target }}",
|
||||||
|
"ProductArn": "arn:aws:securityhub:{{ env "AWS_DEFAULT_REGION" }}::product/aquasecurity/aquasecurity",
|
||||||
|
"GeneratorId": "Trivy",
|
||||||
|
"AwsAccountId": "{{ env "AWS_ACCOUNT_ID" }}",
|
||||||
|
"Types": [ "Sensitive Data Identifications" ],
|
||||||
|
"CreatedAt": "{{ now | date "2006-01-02T15:04:05.999999999Z07:00" }}",
|
||||||
|
"UpdatedAt": "{{ now | date "2006-01-02T15:04:05.999999999Z07:00" }}",
|
||||||
|
"Severity": {
|
||||||
|
"Label": "{{ $severity }}"
|
||||||
|
},
|
||||||
|
"Title": "Trivy found a secret in {{ $target }}: {{ .Title }}",
|
||||||
|
"Description": "Trivy found a secret in {{ $target }}: {{ .Title }}",
|
||||||
|
"ProductFields": { "Product Name": "Trivy" },
|
||||||
|
"Resources": [
|
||||||
|
{
|
||||||
|
"Type": "Other",
|
||||||
|
"Id": "{{ $target }}",
|
||||||
|
"Partition": "aws",
|
||||||
|
"Region": "{{ env "AWS_DEFAULT_REGION" }}",
|
||||||
|
"Details": {
|
||||||
|
"Other": {
|
||||||
|
"Filename": "{{ $target }}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"RecordState": "ACTIVE"
|
||||||
|
}
|
||||||
|
{{- end -}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
"type": "issue",
|
"type": "issue",
|
||||||
"check_name": "container_scanning",
|
"check_name": "container_scanning",
|
||||||
"categories": [ "Security" ],
|
"categories": [ "Security" ],
|
||||||
"description": {{ list .ID .Title | join ": " | printf "%q" }},
|
"description": {{ list "Misconfig" .ID .Title | join " - " | printf "%q" }},
|
||||||
"fingerprint": "{{ list .ID .Title $target | join "" | sha1sum }}",
|
"fingerprint": "{{ list .ID .Title $target | join "" | sha1sum }}",
|
||||||
"content": {{ .Description | printf "%q" }},
|
"content": {{ .Description | printf "%q" }},
|
||||||
"severity": {{ if eq .Severity "LOW" -}}
|
"severity": {{ if eq .Severity "LOW" -}}
|
||||||
@@ -62,7 +62,39 @@
|
|||||||
"location": {
|
"location": {
|
||||||
"path": "{{ $target }}",
|
"path": "{{ $target }}",
|
||||||
"lines": {
|
"lines": {
|
||||||
"begin": {{ .IacMetadata.StartLine }}
|
"begin": {{ .CauseMetadata.StartLine }}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{{- end -}}
|
||||||
|
{{- range .Secrets -}}
|
||||||
|
{{- if $t_first -}}
|
||||||
|
{{- $t_first = false -}}
|
||||||
|
{{ else -}}
|
||||||
|
,
|
||||||
|
{{- end }}
|
||||||
|
{
|
||||||
|
"type": "issue",
|
||||||
|
"check_name": "container_scanning",
|
||||||
|
"categories": [ "Security" ],
|
||||||
|
"description": {{ list "Secret" .RuleID .Title | join " - " | printf "%q" }},
|
||||||
|
"fingerprint": "{{ list .RuleID .Title $target | join "" | sha1sum }}",
|
||||||
|
"content": {{ .Title | printf "%q" }},
|
||||||
|
"severity": {{ if eq .Severity "LOW" -}}
|
||||||
|
"info"
|
||||||
|
{{- else if eq .Severity "MEDIUM" -}}
|
||||||
|
"minor"
|
||||||
|
{{- else if eq .Severity "HIGH" -}}
|
||||||
|
"major"
|
||||||
|
{{- else if eq .Severity "CRITICAL" -}}
|
||||||
|
"critical"
|
||||||
|
{{- else -}}
|
||||||
|
"info"
|
||||||
|
{{- end }},
|
||||||
|
"location": {
|
||||||
|
"path": "{{ $target }}",
|
||||||
|
"lines": {
|
||||||
|
"begin": {{ .StartLine }}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
{{- /* Template based on https://docs.gitlab.com/ee/user/application_security/container_scanning/#reports-json-format */ -}}
|
{{- /* Template based on https://docs.gitlab.com/ee/user/application_security/container_scanning/#reports-json-format */ -}}
|
||||||
{
|
{
|
||||||
"version": "2.3",
|
"version": "14.0.6",
|
||||||
"vulnerabilities": [
|
"vulnerabilities": [
|
||||||
{{- $t_first := true }}
|
{{- $t_first := true }}
|
||||||
{{- range . }}
|
{{- range . }}
|
||||||
{{- $target := .Target }}
|
{{- $target := .Target }}
|
||||||
|
{{- $image := $target | regexFind "[^\\s]+" }}
|
||||||
{{- range .Vulnerabilities -}}
|
{{- range .Vulnerabilities -}}
|
||||||
{{- if $t_first -}}
|
{{- if $t_first -}}
|
||||||
{{- $t_first = false -}}
|
{{- $t_first = false -}}
|
||||||
@@ -31,8 +32,6 @@
|
|||||||
{{- else -}}
|
{{- else -}}
|
||||||
"{{ .Severity }}"
|
"{{ .Severity }}"
|
||||||
{{- end }},
|
{{- end }},
|
||||||
{{- /* TODO: Define confidence */}}
|
|
||||||
"confidence": "Unknown",
|
|
||||||
"solution": {{ if .FixedVersion -}}
|
"solution": {{ if .FixedVersion -}}
|
||||||
"Upgrade {{ .PkgName }} to {{ .FixedVersion }}"
|
"Upgrade {{ .PkgName }} to {{ .FixedVersion }}"
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
@@ -51,7 +50,7 @@
|
|||||||
},
|
},
|
||||||
{{- /* TODO: No mapping available - https://github.com/aquasecurity/trivy/issues/332 */}}
|
{{- /* TODO: No mapping available - https://github.com/aquasecurity/trivy/issues/332 */}}
|
||||||
"operating_system": "Unknown",
|
"operating_system": "Unknown",
|
||||||
"image": "{{ $target }}"
|
"image": "{{ $image }}"
|
||||||
},
|
},
|
||||||
"identifiers": [
|
"identifiers": [
|
||||||
{
|
{
|
||||||
@@ -71,7 +70,7 @@
|
|||||||
,
|
,
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{
|
{
|
||||||
"url": "{{ . }}"
|
"url": "{{ regexFind "[^ ]+" . }}"
|
||||||
}
|
}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ adjust_arch() {
|
|||||||
386) ARCH=32bit ;;
|
386) ARCH=32bit ;;
|
||||||
amd64) ARCH=64bit ;;
|
amd64) ARCH=64bit ;;
|
||||||
arm) ARCH=ARM ;;
|
arm) ARCH=ARM ;;
|
||||||
|
armv7) ARCH=ARM ;;
|
||||||
arm64) ARCH=ARM64 ;;
|
arm64) ARCH=ARM64 ;;
|
||||||
ppc64le) OS=PPC64LE ;;
|
ppc64le) OS=PPC64LE ;;
|
||||||
darwin) ARCH=macOS ;;
|
darwin) ARCH=macOS ;;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<testsuites>
|
<testsuites name="trivy">
|
||||||
{{- range . -}}
|
{{- range . -}}
|
||||||
{{- $failures := len .Vulnerabilities }}
|
{{- $failures := len .Vulnerabilities }}
|
||||||
<testsuite tests="{{ $failures }}" failures="{{ $failures }}" name="{{ .Target }}" errors="0" skipped="0" time="">
|
<testsuite tests="{{ $failures }}" failures="{{ $failures }}" name="{{ .Target }}" errors="0" skipped="0" time="">
|
||||||
@@ -28,4 +28,4 @@
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
</testsuite>
|
</testsuite>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</testsuites>
|
</testsuites>
|
||||||
|
|||||||
2
docs/build/Dockerfile
vendored
@@ -1,4 +1,4 @@
|
|||||||
FROM squidfunk/mkdocs-material:8.2.10
|
FROM squidfunk/mkdocs-material:8.3.9
|
||||||
|
|
||||||
## If you want to see exactly the same version as is published to GitHub pages
|
## If you want to see exactly the same version as is published to GitHub pages
|
||||||
## use a private image for insiders, which requires authentication.
|
## use a private image for insiders, which requires authentication.
|
||||||
|
|||||||
6
docs/build/requirements.txt
vendored
@@ -11,13 +11,13 @@ mergedeep==1.3.4
|
|||||||
mike==1.1.2
|
mike==1.1.2
|
||||||
mkdocs==1.3.0
|
mkdocs==1.3.0
|
||||||
mkdocs-macros-plugin==0.7.0
|
mkdocs-macros-plugin==0.7.0
|
||||||
mkdocs-material==8.2.10
|
mkdocs-material==8.3.9
|
||||||
mkdocs-material-extensions==1.0.3
|
mkdocs-material-extensions==1.0.3
|
||||||
mkdocs-minify-plugin==0.5.0
|
mkdocs-minify-plugin==0.5.0
|
||||||
mkdocs-redirects==1.0.4
|
mkdocs-redirects==1.0.4
|
||||||
packaging==21.3
|
packaging==21.3
|
||||||
Pygments==2.11.2
|
Pygments==2.12.0
|
||||||
pymdown-extensions==9.3
|
pymdown-extensions==9.5
|
||||||
pyparsing==3.0.8
|
pyparsing==3.0.8
|
||||||
python-dateutil==2.8.2
|
python-dateutil==2.8.2
|
||||||
PyYAML==6.0
|
PyYAML==6.0
|
||||||
|
|||||||
@@ -9,11 +9,66 @@ Thank you for taking interest in contributing to Trivy!
|
|||||||
1. Your PR is more likely to be accepted if it includes tests (We have not historically been very strict about tests, but we would like to improve this!).
|
1. Your PR is more likely to be accepted if it includes tests (We have not historically been very strict about tests, but we would like to improve this!).
|
||||||
1. If your PR affects the user experience in some way, please update the README.md and the CLI help accordingly.
|
1. If your PR affects the user experience in some way, please update the README.md and the CLI help accordingly.
|
||||||
|
|
||||||
### Title
|
## Development
|
||||||
|
Install the necessary tools for development by following their respective installation instructions.
|
||||||
|
|
||||||
|
- [Go](https://go.dev/doc/install)
|
||||||
|
- [Mage](https://magefile.org/)
|
||||||
|
|
||||||
|
### Build
|
||||||
|
After making changes to the Go source code, build the project with the following command:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ mage build
|
||||||
|
$ ./trivy -h
|
||||||
|
```
|
||||||
|
|
||||||
|
### Lint
|
||||||
|
You must pass the linter checks:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ mage lint
|
||||||
|
```
|
||||||
|
|
||||||
|
Additionally, you need to have run `go mod tidy`, so execute the following command as well:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ mage tidy
|
||||||
|
```
|
||||||
|
|
||||||
|
### Unit tests
|
||||||
|
Your PR must pass all the unit tests. You can test it as below.
|
||||||
|
|
||||||
|
```
|
||||||
|
$ mage test:unit
|
||||||
|
```
|
||||||
|
|
||||||
|
### Integration tests
|
||||||
|
Your PR must pass all the integration tests. You can test it as below.
|
||||||
|
|
||||||
|
```
|
||||||
|
$ mage test:integration
|
||||||
|
```
|
||||||
|
|
||||||
|
### Documentation
|
||||||
|
If you update CLI flags, you need to generate the CLI references.
|
||||||
|
The test will fail if they are not up-to-date.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ mage docs:generate
|
||||||
|
```
|
||||||
|
|
||||||
|
You can build the documents as below and view it at http://localhost:8000.
|
||||||
|
|
||||||
|
```
|
||||||
|
$ mage docs:serve
|
||||||
|
```
|
||||||
|
|
||||||
|
## Title
|
||||||
It is not that strict, but we use the title conventions in this repository.
|
It is not that strict, but we use the title conventions in this repository.
|
||||||
Each commit message doesn't have to follow the conventions as long as it is clear and descriptive since it will be squashed and merged.
|
Each commit message doesn't have to follow the conventions as long as it is clear and descriptive since it will be squashed and merged.
|
||||||
|
|
||||||
#### Format of the title
|
### Format of the title
|
||||||
|
|
||||||
```
|
```
|
||||||
<type>(<scope>): <subject>
|
<type>(<scope>): <subject>
|
||||||
@@ -42,6 +97,7 @@ checks:
|
|||||||
- vuln
|
- vuln
|
||||||
- misconf
|
- misconf
|
||||||
- secret
|
- secret
|
||||||
|
- license
|
||||||
|
|
||||||
mode:
|
mode:
|
||||||
|
|
||||||
@@ -49,7 +105,10 @@ mode:
|
|||||||
- fs
|
- fs
|
||||||
- repo
|
- repo
|
||||||
- sbom
|
- sbom
|
||||||
|
- k8s
|
||||||
- server
|
- server
|
||||||
|
- aws
|
||||||
|
- vm
|
||||||
|
|
||||||
os:
|
os:
|
||||||
|
|
||||||
@@ -76,6 +135,8 @@ language:
|
|||||||
- dotnet
|
- dotnet
|
||||||
- java
|
- java
|
||||||
- go
|
- go
|
||||||
|
- elixir
|
||||||
|
- dart
|
||||||
|
|
||||||
vuln:
|
vuln:
|
||||||
|
|
||||||
@@ -101,6 +162,12 @@ cli:
|
|||||||
- cli
|
- cli
|
||||||
- flag
|
- flag
|
||||||
|
|
||||||
|
SBOM:
|
||||||
|
|
||||||
|
- cyclonedx
|
||||||
|
- spdx
|
||||||
|
- purl
|
||||||
|
|
||||||
others:
|
others:
|
||||||
|
|
||||||
- helm
|
- helm
|
||||||
@@ -110,7 +177,7 @@ others:
|
|||||||
|
|
||||||
The `<scope>` can be empty (e.g. if the change is a global or difficult to assign to a single component), in which case the parentheses are omitted.
|
The `<scope>` can be empty (e.g. if the change is a global or difficult to assign to a single component), in which case the parentheses are omitted.
|
||||||
|
|
||||||
#### Example titles
|
### Example titles
|
||||||
|
|
||||||
```
|
```
|
||||||
feat(alma): add support for AlmaLinux
|
feat(alma): add support for AlmaLinux
|
||||||
@@ -131,34 +198,15 @@ chore(deps): bump go.uber.org/zap from 1.19.1 to 1.20.0
|
|||||||
**NOTE**: please do not use `chore(deps): update fanal` and something like that if you add new features or fix bugs in Trivy-related projects.
|
**NOTE**: please do not use `chore(deps): update fanal` and something like that if you add new features or fix bugs in Trivy-related projects.
|
||||||
The PR title should describe what the PR adds or fixes even though it just updates the dependency in Trivy.
|
The PR title should describe what the PR adds or fixes even though it just updates the dependency in Trivy.
|
||||||
|
|
||||||
### Unit tests
|
## Commits
|
||||||
Your PR must pass all the unit tests. You can test it as below.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ make test
|
|
||||||
```
|
|
||||||
|
|
||||||
### Integration tests
|
|
||||||
Your PR must pass all the integration tests. You can test it as below.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ make test-integration
|
|
||||||
```
|
|
||||||
|
|
||||||
### Documentation
|
|
||||||
You can build the documents as below and view it at http://localhost:8000.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ make mkdocs-serve
|
|
||||||
```
|
|
||||||
|
|
||||||
## Understand where your pull request belongs
|
## Understand where your pull request belongs
|
||||||
|
|
||||||
Trivy is composed of several repositories that work together:
|
Trivy is composed of several repositories that work together:
|
||||||
|
|
||||||
- [Trivy](https://github.com/aquasecurity/trivy) is the client-side, user-facing, command line tool.
|
- [Trivy](https://github.com/aquasecurity/trivy) is the client-side, user-facing, command line tool.
|
||||||
- [vuln-list](https://github.com/aquasecurity/vuln-list) is a vulnerabilities database, aggregated from different sources, and normalized for easy consumption. Think of this as the "server" side of the trivy command line tool. **There should be no pull requests to this repo**
|
- [vuln-list](https://github.com/aquasecurity/vuln-list) is a vulnerability database, aggregated from different sources, and normalized for easy consumption. Think of this as the "server" side of the trivy command line tool. **There should be no pull requests to this repo**
|
||||||
- [vuln-list-update](https://github.com/aquasecurity/vuln-list-update) is the code that maintains the vuln-list database.
|
- [vuln-list-update](https://github.com/aquasecurity/vuln-list-update) is the code that maintains the vuln-list database.
|
||||||
- [trivy-db](https://github.com/aquasecurity/trivy-db) maintains the vulnerability database pulled by Trivy CLI.
|
- [trivy-db](https://github.com/aquasecurity/trivy-db) maintains the vulnerability database pulled by Trivy CLI.
|
||||||
- [fanal](https://github.com/aquasecurity/fanal) is a library for extracting system information from containers. It is being used by Trivy to find testable subjects in the container image.
|
|
||||||
- [go-dep-parser](https://github.com/aquasecurity/go-dep-parser) is a library for parsing lock files such as package-lock.json and Gemfile.lock.
|
- [go-dep-parser](https://github.com/aquasecurity/go-dep-parser) is a library for parsing lock files such as package-lock.json and Gemfile.lock.
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
# Author
|
|
||||||
|
|
||||||
[Teppei Fukuda][knqyf263] (knqyf263)
|
|
||||||
|
|
||||||
# Contributors
|
|
||||||
|
|
||||||
Thanks to all [contributors][contributors]
|
|
||||||
|
|
||||||
[knqyf263]: https://github.com/knqyf263
|
|
||||||
[contributors]: https://github.com/aquasecurity/trivy/graphs/contributors
|
|
||||||
@@ -188,7 +188,7 @@ We use two labels [help wanted](https://github.com/aquasecurity/trivy/issues?q=i
|
|||||||
and [good first issue](https://github.com/aquasecurity/trivy/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)
|
and [good first issue](https://github.com/aquasecurity/trivy/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)
|
||||||
to identify issues that have been specially groomed for new contributors.
|
to identify issues that have been specially groomed for new contributors.
|
||||||
|
|
||||||
We have specific [guidelines](/docs/docs/advanced/contribd/contrib/help-wanted.md)
|
We have specific [guidelines](/docs/community/maintainer/help-wanted.md)
|
||||||
for how to use these labels. If you see an issue that satisfies these
|
for how to use these labels. If you see an issue that satisfies these
|
||||||
guidelines, you can add the `help wanted` label and the `good first issue` label.
|
guidelines, you can add the `help wanted` label and the `good first issue` label.
|
||||||
Please note that adding the `good first issue` label must also
|
Please note that adding the `good first issue` label must also
|
||||||
|
|||||||
@@ -1,48 +0,0 @@
|
|||||||
# Additional References
|
|
||||||
There are external blogs and evaluations.
|
|
||||||
|
|
||||||
## Blogs
|
|
||||||
- [Trivy Vulnerability Scanner Joins the Aqua Open-source Family][join]
|
|
||||||
- [Trivy Image Vulnerability Scanner Now Under Apache 2.0 License][license]
|
|
||||||
- [DevSecOps with Trivy and GitHub Actions][actions]
|
|
||||||
- [Find Image Vulnerabilities Using GitHub and Aqua Security Trivy Action][actions2]
|
|
||||||
- [Using Trivy to Discover Vulnerabilities in VS Code Projects][vscode]
|
|
||||||
- [the vulnerability remediation lifecycle of Alpine containers][alpine]
|
|
||||||
- [Continuous Container Vulnerability Testing with Trivy][semaphore]
|
|
||||||
- [Open Source CVE Scanner Round-Up: Clair vs Anchore vs Trivy][round-up]
|
|
||||||
- [Docker Image Security: Static Analysis Tool Comparison – Anchore Engine vs Clair vs Trivy][tool-comparison]
|
|
||||||
|
|
||||||
## Links
|
|
||||||
- [Research Spike: evaluate Trivy for scanning running containers][gitlab]
|
|
||||||
- [Istio evaluates scanners][istio]
|
|
||||||
|
|
||||||
## Presentations
|
|
||||||
- Aqua Security YouTube Channel
|
|
||||||
- [Trivy - container image scanning][intro]
|
|
||||||
- [Using Trivy in client server mode][server]
|
|
||||||
- [Tweaking Trivy output to fit your workflow][tweaking]
|
|
||||||
- [How does a vulnerability scanner identify packages?][identify]
|
|
||||||
- CNCF Webinar 2020
|
|
||||||
- [Trivy Open Source Scanner for Container Images – Just Download and Run!][cncf]
|
|
||||||
- KubeCon + CloudNativeCon Europe 2020 Virtual
|
|
||||||
- [Handling Container Vulnerabilities with Open Policy Agent - Teppei Fukuda, Aqua Security][kubecon]
|
|
||||||
|
|
||||||
[alpine]: https://ariadne.space/2021/06/08/the-vulnerability-remediation-lifecycle-of-alpine-containers/
|
|
||||||
[semaphore]: https://semaphoreci.com/blog/continuous-container-vulnerability-testing-with-trivy
|
|
||||||
[round-up]: https://boxboat.com/2020/04/24/image-scanning-tech-compared/
|
|
||||||
[tool-comparison]: https://www.a10o.net/devsecops/docker-image-security-static-analysis-tool-comparison-anchore-engine-vs-clair-vs-trivy/
|
|
||||||
[gitlab]: https://gitlab.com/gitlab-org/gitlab/-/issues/270888
|
|
||||||
[istio]: https://github.com/istio/release-builder/pull/687#issuecomment-874938417
|
|
||||||
|
|
||||||
[intro]: https://www.youtube.com/watch?v=AzOBGm7XxOA
|
|
||||||
[cncf]: https://www.youtube.com/watch?v=XnYxX9uueoQ
|
|
||||||
[server]: https://www.youtube.com/watch?v=tNQ-VlahtYM
|
|
||||||
[kubecon]: https://www.youtube.com/watch?v=WKE2XNZ2zr4
|
|
||||||
[identify]: https://www.youtube.com/watch?v=PaMnzeHBa8M
|
|
||||||
[tweaking]: https://www.youtube.com/watch?v=wFIGUjcRLnU
|
|
||||||
|
|
||||||
[join]: https://blog.aquasec.com/trivy-vulnerability-scanner-joins-aqua-family
|
|
||||||
[license]: https://blog.aquasec.com/trivy-open-source-vulnerability-scanner-apache2.0-license
|
|
||||||
[actions]: https://blog.aquasec.com/devsecops-with-trivy-github-actions
|
|
||||||
[actions2]: https://blog.aquasec.com/github-vulnerability-scanner-trivy
|
|
||||||
[vscode]: https://blog.aquasec.com/trivy-open-source-vulnerability-scanner-vs-code
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
# Community Tools
|
|
||||||
The open source community has been hard at work developing new tools for Trivy. You can check out some of them here.
|
|
||||||
|
|
||||||
Have you created a tool that’s not listed? Add the name and description of your integration and open a pull request in the GitHub repository to get your change merged.
|
|
||||||
|
|
||||||
## GitHub Actions
|
|
||||||
|
|
||||||
| Actions | Description |
|
|
||||||
| ------------------------------------------ | -------------------------------------------------------------------------------- |
|
|
||||||
| [gitrivy][gitrivy] | GitHub Issue + Trivy |
|
|
||||||
| [trivy-github-issues][trivy-github-issues] | GitHub Actions for creating GitHub Issues according to the Trivy scanning result |
|
|
||||||
|
|
||||||
## Semaphore
|
|
||||||
|
|
||||||
| Name | Description |
|
|
||||||
| -------------------------------------------------------| ----------------------------------------- |
|
|
||||||
| [Continuous Vulnerability Testing with Trivy][semaphore-tutorial] | Tutorial on scanning code, containers, infrastructure, and Kubernetes with Semaphore CI/CD. |
|
|
||||||
|
|
||||||
|
|
||||||
## CircleCI
|
|
||||||
|
|
||||||
| Orb | Description |
|
|
||||||
| -----------------------------------------| ----------------------------------------- |
|
|
||||||
| [fifteen5/trivy-orb][fifteen5/trivy-orb] | Orb for running Trivy, a security scanner |
|
|
||||||
|
|
||||||
## Others
|
|
||||||
|
|
||||||
| Name | Description |
|
|
||||||
| -----------------------------------------| ----------------------------------------- |
|
|
||||||
| [Trivy Vulnerability Explorer][explorer] | Explore trivy vulnerability reports in your browser and create .trivyignore files interactively. Can be integrated in your CI/CD tooling with deep links. |
|
|
||||||
|
|
||||||
|
|
||||||
[trivy-github-issues]: https://github.com/marketplace/actions/trivy-github-issues
|
|
||||||
[fifteen5/trivy-orb]: https://circleci.com/developer/orbs/orb/fifteen5/trivy-orb
|
|
||||||
[gitrivy]: https://github.com/marketplace/actions/trivy-action
|
|
||||||
[explorer]: https://dbsystel.github.io/trivy-vulnerability-explorer/
|
|
||||||
[semaphore-tutorial]: https://semaphoreci.com/blog/continuous-container-vulnerability-testing-with-trivy
|
|
||||||
@@ -6,56 +6,130 @@ Trivy can be used in air-gapped environments. Note that an allowlist is [here][a
|
|||||||
|
|
||||||
### Download the vulnerability database
|
### Download the vulnerability database
|
||||||
At first, you need to download the vulnerability database for use in air-gapped environments.
|
At first, you need to download the vulnerability database for use in air-gapped environments.
|
||||||
Please follow [oras installation instruction][oras].
|
|
||||||
|
|
||||||
Download `db.tar.gz`:
|
=== "Trivy"
|
||||||
|
|
||||||
```
|
```
|
||||||
$ oras pull ghcr.io/aquasecurity/trivy-db:2 -a
|
TRIVY_TEMP_DIR=$(mktemp -d)
|
||||||
```
|
trivy --cache-dir $TRIVY_TEMP_DIR image --download-db-only
|
||||||
|
tar -cf ./db.tar.gz -C $TRIVY_TEMP_DIR/db metadata.json trivy.db
|
||||||
|
rm -rf $TRIVY_TEMP_DIR
|
||||||
|
```
|
||||||
|
|
||||||
### Transfer the DB file into the air-gapped environment
|
=== "oras >= v0.13.0"
|
||||||
|
Please follow [oras installation instruction][oras].
|
||||||
|
|
||||||
|
Download `db.tar.gz`:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ oras pull ghcr.io/aquasecurity/trivy-db:2
|
||||||
|
```
|
||||||
|
|
||||||
|
=== "oras < v0.13.0"
|
||||||
|
Please follow [oras installation instruction][oras].
|
||||||
|
|
||||||
|
Download `db.tar.gz`:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ oras pull -a ghcr.io/aquasecurity/trivy-db:2
|
||||||
|
```
|
||||||
|
|
||||||
|
### Download the Java index database[^1]
|
||||||
|
Java users also need to download the Java index database for use in air-gapped environments.
|
||||||
|
|
||||||
|
!!! note
|
||||||
|
You container image may contain JAR files even though you don't use Java directly.
|
||||||
|
In that case, you also need to download the Java index database.
|
||||||
|
|
||||||
|
=== "Trivy"
|
||||||
|
|
||||||
|
```
|
||||||
|
TRIVY_TEMP_DIR=$(mktemp -d)
|
||||||
|
trivy --cache-dir $TRIVY_TEMP_DIR image --download-java-db-only
|
||||||
|
tar -cf ./javadb.tar.gz -C $TRIVY_TEMP_DIR/java-db metadata.json trivy-java.db
|
||||||
|
rm -rf $TRIVY_TEMP_DIR
|
||||||
|
```
|
||||||
|
=== "oras >= v0.13.0"
|
||||||
|
Please follow [oras installation instruction][oras].
|
||||||
|
|
||||||
|
Download `javadb.tar.gz`:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ oras pull ghcr.io/aquasecurity/trivy-java-db:1
|
||||||
|
```
|
||||||
|
|
||||||
|
=== "oras < v0.13.0"
|
||||||
|
Please follow [oras installation instruction][oras].
|
||||||
|
|
||||||
|
Download `javadb.tar.gz`:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ oras pull -a ghcr.io/aquasecurity/trivy-java-db:1
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### Transfer the DB files into the air-gapped environment
|
||||||
The way of transfer depends on the environment.
|
The way of transfer depends on the environment.
|
||||||
|
|
||||||
```
|
=== "Vulnerability db"
|
||||||
$ rsync -av -e ssh /path/to/db.tar.gz [user]@[host]:dst
|
```
|
||||||
```
|
$ rsync -av -e ssh /path/to/db.tar.gz [user]@[host]:dst
|
||||||
|
```
|
||||||
|
|
||||||
### Put the DB file in Trivy's cache directory
|
=== "Java index db[^1]"
|
||||||
You have to know where to put the DB file. The following command shows the default cache directory.
|
```
|
||||||
|
$ rsync -av -e ssh /path/to/javadb.tar.gz [user]@[host]:dst
|
||||||
|
```
|
||||||
|
|
||||||
|
### Put the DB files in Trivy's cache directory
|
||||||
|
You have to know where to put the DB files. The following command shows the default cache directory.
|
||||||
|
|
||||||
```
|
```
|
||||||
$ ssh user@host
|
$ ssh user@host
|
||||||
$ trivy -h | grep cache
|
$ trivy -h | grep cache
|
||||||
--cache-dir value cache directory (default: "/home/myuser/.cache/trivy") [$TRIVY_CACHE_DIR]
|
--cache-dir value cache directory (default: "/home/myuser/.cache/trivy") [$TRIVY_CACHE_DIR]
|
||||||
```
|
```
|
||||||
|
=== "Vulnerability db"
|
||||||
|
Put the DB file in the cache directory + `/db`.
|
||||||
|
|
||||||
|
```
|
||||||
|
$ mkdir -p /home/myuser/.cache/trivy/db
|
||||||
|
$ cd /home/myuser/.cache/trivy/db
|
||||||
|
$ tar xvf /path/to/db.tar.gz -C /home/myuser/.cache/trivy/db
|
||||||
|
x trivy.db
|
||||||
|
x metadata.json
|
||||||
|
$ rm /path/to/db.tar.gz
|
||||||
|
```
|
||||||
|
|
||||||
Put the DB file in the cache directory + `/db`.
|
=== "Java index db[^1]"
|
||||||
|
Put the DB file in the cache directory + `/java-db`.
|
||||||
|
|
||||||
|
```
|
||||||
|
$ mkdir -p /home/myuser/.cache/trivy/java-db
|
||||||
|
$ cd /home/myuser/.cache/trivy/java-db
|
||||||
|
$ tar xvf /path/to/javadb.tar.gz -C /home/myuser/.cache/trivy/java-db
|
||||||
|
x trivy-java.db
|
||||||
|
x metadata.json
|
||||||
|
$ rm /path/to/javadb.tar.gz
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
In an air-gapped environment it is your responsibility to update the Trivy databases on a regular basis, so that the scanner can detect recently-identified vulnerabilities.
|
||||||
|
|
||||||
|
### Run Trivy with the specific flags.
|
||||||
|
In an air-gapped environment, you have to specify `--skip-db-update` and `--skip-java-db-update`[^1] so that Trivy doesn't attempt to download the latest database files.
|
||||||
|
In addition, if you want to scan `pom.xml` dependencies, you need to specify `--offline-scan` since Trivy tries to issue API requests for scanning Java applications by default.
|
||||||
|
|
||||||
```
|
```
|
||||||
$ mkdir -p /home/myuser/.cache/trivy/db
|
$ trivy image --skip-db-update --skip-java-db-update --offline-scan alpine:3.12
|
||||||
$ cd /home/myuser/.cache/trivy/db
|
|
||||||
$ tar xvf /path/to/db.tar.gz -C /home/myuser/.cache/trivy/db
|
|
||||||
x trivy.db
|
|
||||||
x metadata.json
|
|
||||||
$ rm /path/to/db.tar.gz
|
|
||||||
```
|
|
||||||
|
|
||||||
In an air-gapped environment it is your responsibility to update the Trivy database on a regular basis, so that the scanner can detect recently-identified vulnerabilities.
|
|
||||||
|
|
||||||
### Run Trivy with --skip-update and --offline-scan option
|
|
||||||
In an air-gapped environment, specify `--skip-update` so that Trivy doesn't attempt to download the latest database file.
|
|
||||||
In addition, if you want to scan Java dependencies such as JAR and pom.xml, you need to specify `--offline-scan` since Trivy tries to issue API requests for scanning Java applications by default.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ trivy image --skip-update --offline-scan alpine:3.12
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Air-Gapped Environment for misconfigurations
|
## Air-Gapped Environment for misconfigurations
|
||||||
|
|
||||||
No special measures are required to detect misconfigurations in an air-gapped environment.
|
No special measures are required to detect misconfigurations in an air-gapped environment.
|
||||||
|
|
||||||
### Run Trivy with --skip-policy-update option
|
### Run Trivy with `--skip-policy-update` option
|
||||||
In an air-gapped environment, specify `--skip-policy-update` so that Trivy doesn't attempt to download the latest misconfiguration policies.
|
In an air-gapped environment, specify `--skip-policy-update` so that Trivy doesn't attempt to download the latest misconfiguration policies.
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -64,3 +138,5 @@ $ trivy conf --skip-policy-update /path/to/conf
|
|||||||
|
|
||||||
[allowlist]: ../references/troubleshooting.md
|
[allowlist]: ../references/troubleshooting.md
|
||||||
[oras]: https://oras.land/cli/
|
[oras]: https://oras.land/cli/
|
||||||
|
|
||||||
|
[^1]: This is only required to scan `jar` files. More information about `Java index db` [here](../scanner/vulnerability/language/java.md)
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
# OCI Image Layout
|
|
||||||
|
|
||||||
An image directory compliant with [Open Container Image Layout Specification](https://github.com/opencontainers/image-spec/blob/master/spec.md).
|
|
||||||
|
|
||||||
Buildah:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ buildah push docker.io/library/alpine:3.11 oci:/path/to/alpine
|
|
||||||
$ trivy image --input /path/to/alpine
|
|
||||||
```
|
|
||||||
|
|
||||||
Skopeo:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ skopeo copy docker-daemon:alpine:3.11 oci:/path/to/alpine
|
|
||||||
$ trivy image --input /path/to/alpine
|
|
||||||
```
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
# Podman
|
|
||||||
|
|
||||||
!!! warning "EXPERIMENTAL"
|
|
||||||
This feature might change without preserving backwards compatibility.
|
|
||||||
|
|
||||||
Scan your image in Podman (>=2.0) running locally. The remote Podman is not supported.
|
|
||||||
Before performing Trivy commands, you must enable the podman.sock systemd service on your machine.
|
|
||||||
For more details, see [here][sock].
|
|
||||||
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ systemctl --user enable --now podman.socket
|
|
||||||
```
|
|
||||||
|
|
||||||
Then, you can scan your image in Podman.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ cat Dockerfile
|
|
||||||
FROM alpine:3.12
|
|
||||||
RUN apk add --no-cache bash
|
|
||||||
$ podman build -t test .
|
|
||||||
$ podman images
|
|
||||||
REPOSITORY TAG IMAGE ID CREATED SIZE
|
|
||||||
localhost/test latest efc372d4e0de About a minute ago 7.94 MB
|
|
||||||
$ trivy image test
|
|
||||||
```
|
|
||||||
|
|
||||||
[sock]: https://github.com/containers/podman/blob/master/docs/tutorials/remote_client.md#enable-the-podman-service-on-the-server-machine
|
|
||||||
358
docs/docs/advanced/modules.md
Normal file
@@ -0,0 +1,358 @@
|
|||||||
|
# Modules
|
||||||
|
|
||||||
|
!!! warning "EXPERIMENTAL"
|
||||||
|
This feature might change without preserving backwards compatibility.
|
||||||
|
|
||||||
|
Trivy provides a module feature to allow others to extend the Trivy CLI without the need to change the Trivy code base.
|
||||||
|
It changes the behavior during scanning by WebAssembly.
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
Trivy modules are add-on tools that integrate seamlessly with Trivy.
|
||||||
|
They provide a way to extend the core feature set of Trivy, but without updating the Trivy binary.
|
||||||
|
|
||||||
|
- They can be added and removed from a Trivy installation without impacting the core Trivy tool.
|
||||||
|
- They can be written in any programming language supporting WebAssembly.
|
||||||
|
- It supports only [TinyGo][tinygo] at the moment.
|
||||||
|
|
||||||
|
You can write your own detection logic.
|
||||||
|
|
||||||
|
- Evaluate complex vulnerability conditions like [Spring4Shell][spring4shell]
|
||||||
|
- Detect a shell script communicating with malicious domains
|
||||||
|
- Detect malicious python install script (setup.py)
|
||||||
|
- Even detect misconfigurations in WordPress setting
|
||||||
|
- etc.
|
||||||
|
|
||||||
|
Then, you can update the scan result however you want.
|
||||||
|
|
||||||
|
- Change a severity
|
||||||
|
- Remove a vulnerability
|
||||||
|
- Add a new vulnerability
|
||||||
|
- etc.
|
||||||
|
|
||||||
|
Modules should be distributed in OCI registries like GitHub Container Registry.
|
||||||
|
|
||||||
|
!!! warning
|
||||||
|
WebAssembly doesn't allow file access and network access by default.
|
||||||
|
Modules can read required files only, but cannot overwrite them.
|
||||||
|
WebAssembly is sandboxed and secure by design, but Trivy modules available in public are not audited for security.
|
||||||
|
You should install and run third-party modules at your own risk even though
|
||||||
|
|
||||||
|
Under the hood Trivy leverages [wazero][wazero] to run WebAssembly modules without CGO.
|
||||||
|
|
||||||
|
## Installing a Module
|
||||||
|
A module can be installed using the `trivy module install` command.
|
||||||
|
This command takes an url. It will download the module and install it in the module cache.
|
||||||
|
|
||||||
|
Trivy adheres to the XDG specification, so the location depends on whether XDG_DATA_HOME is set.
|
||||||
|
Trivy will now search XDG_DATA_HOME for the location of the Trivy modules cache.
|
||||||
|
The preference order is as follows:
|
||||||
|
|
||||||
|
- XDG_DATA_HOME if set and .trivy/plugins exists within the XDG_DATA_HOME dir
|
||||||
|
- $HOME/.trivy/plugins
|
||||||
|
|
||||||
|
For example, to download the WebAssembly module, you can execute the following command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ trivy module install ghcr.io/aquasecurity/trivy-module-spring4shell
|
||||||
|
```
|
||||||
|
|
||||||
|
## Using Modules
|
||||||
|
Once the module is installed, Trivy will load all available modules in the cache on the start of the next Trivy execution.
|
||||||
|
The modules may inject custom logic into scanning and change the result.
|
||||||
|
You can run Trivy as usual and modules are loaded automatically.
|
||||||
|
|
||||||
|
You will see the log messages about WASM modules.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ trivy image ghcr.io/aquasecurity/trivy-test-images:spring4shell-jre8
|
||||||
|
2022-06-12T12:57:13.210+0300 INFO Loading ghcr.io/aquasecurity/trivy-module-spring4shell/spring4shell.wasm...
|
||||||
|
2022-06-12T12:57:13.596+0300 INFO Registering WASM module: spring4shell@v1
|
||||||
|
...
|
||||||
|
2022-06-12T12:57:14.865+0300 INFO Module spring4shell: Java Version: 8, Tomcat Version: 8.5.77
|
||||||
|
2022-06-12T12:57:14.865+0300 INFO Module spring4shell: change CVE-2022-22965 severity from CRITICAL to LOW
|
||||||
|
|
||||||
|
Java (jar)
|
||||||
|
|
||||||
|
Total: 9 (UNKNOWN: 1, LOW: 3, MEDIUM: 2, HIGH: 3, CRITICAL: 0)
|
||||||
|
|
||||||
|
┌──────────────────────────────────────────────────────────────┬─────────────────────┬──────────┬───────────────────┬────────────────────────┬────────────────────────────────────────────────────────────┐
|
||||||
|
│ Library │ Vulnerability │ Severity │ Installed Version │ Fixed Version │ Title │
|
||||||
|
├──────────────────────────────────────────────────────────────┼─────────────────────┼──────────┼───────────────────┼────────────────────────┼────────────────────────────────────────────────────────────┤
|
||||||
|
│ org.springframework.boot:spring-boot (helloworld.war) │ CVE-2022-22965 │ LOW │ 2.6.3 │ 2.5.12, 2.6.6 │ spring-framework: RCE via Data Binding on JDK 9+ │
|
||||||
|
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2022-22965 │
|
||||||
|
├──────────────────────────────────────────────────────────────┼─────────────────────┼──────────┼───────────────────┼────────────────────────┼────────────────────────────────────────────────────────────┤
|
||||||
|
...(snip)...
|
||||||
|
```
|
||||||
|
|
||||||
|
In the above example, the Spring4Shell module changed the severity from CRITICAL to LOW because the application doesn't satisfy one of conditions.
|
||||||
|
|
||||||
|
## Uninstalling Modules
|
||||||
|
Specify a module repository with `trivy module uninstall` command.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ trivy module uninstall ghcr.io/aquasecurity/trivy-module-spring4shell
|
||||||
|
```
|
||||||
|
|
||||||
|
## Building Modules
|
||||||
|
It supports TinyGo only at the moment.
|
||||||
|
|
||||||
|
### TinyGo
|
||||||
|
Trivy provides Go SDK including three interfaces.
|
||||||
|
Your own module needs to implement either or both `Analyzer` and `PostScanner` in addition to `Module`.
|
||||||
|
|
||||||
|
```go
|
||||||
|
type Module interface {
|
||||||
|
Version() int
|
||||||
|
Name() string
|
||||||
|
}
|
||||||
|
|
||||||
|
type Analyzer interface {
|
||||||
|
RequiredFiles() []string
|
||||||
|
Analyze(filePath string) (*serialize.AnalysisResult, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type PostScanner interface {
|
||||||
|
PostScanSpec() serialize.PostScanSpec
|
||||||
|
PostScan(serialize.Results) (serialize.Results, error)
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
In the following tutorial, it creates a WordPress module that detects a WordPress version and a critical vulnerability accordingly.
|
||||||
|
|
||||||
|
!!! tips
|
||||||
|
You can use logging functions such as `Debug` and `Info` for debugging.
|
||||||
|
See [examples](#examples) for the detail.
|
||||||
|
|
||||||
|
#### Initialize your module
|
||||||
|
Replace the repository name with yours.
|
||||||
|
|
||||||
|
```
|
||||||
|
$ go mod init github.com/aquasecurity/trivy-module-wordpress
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Module interface
|
||||||
|
`Version()` returns your module version and should be incremented after updates.
|
||||||
|
`Name()` returns your module name.
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
const (
|
||||||
|
version = 1
|
||||||
|
name = "wordpress-module"
|
||||||
|
)
|
||||||
|
|
||||||
|
type WordpressModule struct{
|
||||||
|
// Cannot define fields as modules can't keep state.
|
||||||
|
}
|
||||||
|
|
||||||
|
func (WordpressModule) Version() int {
|
||||||
|
return version
|
||||||
|
}
|
||||||
|
|
||||||
|
func (WordpressModule) Name() string {
|
||||||
|
return name
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
A struct cannot have any fields. Each method invocation is performed in different states.
|
||||||
|
|
||||||
|
#### Analyzer interface
|
||||||
|
If you implement the `Analyzer` interface, `Analyze` method is called when the file path is matched to file patterns returned by `RequiredFiles()`.
|
||||||
|
A file pattern must be a regular expression. The syntax detail is [here][regexp].
|
||||||
|
|
||||||
|
`Analyze` takes the matched file path, then the file can be opened by `os.Open()`.
|
||||||
|
|
||||||
|
```go
|
||||||
|
const typeWPVersion = "wordpress-version"
|
||||||
|
|
||||||
|
func (WordpressModule) RequiredFiles() []string {
|
||||||
|
return []string{
|
||||||
|
`wp-includes\/version.php`,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (WordpressModule) Analyze(filePath string) (*serialize.AnalysisResult, error) {
|
||||||
|
f, err := os.Open(filePath) // e.g. filePath: /usr/src/wordpress/wp-includes/version.php
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
defer f.Close()
|
||||||
|
|
||||||
|
var wpVersion string
|
||||||
|
scanner := bufio.NewScanner(f)
|
||||||
|
for scanner.Scan() {
|
||||||
|
line := scanner.Text()
|
||||||
|
if !strings.HasPrefix(line, "$wp_version=") {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
ss := strings.Split(line, "=")
|
||||||
|
if len(ss) != 2 {
|
||||||
|
return nil, fmt.Errorf("invalid wordpress version: %s", line)
|
||||||
|
}
|
||||||
|
|
||||||
|
// NOTE: it is an example; you actually need to handle comments, etc
|
||||||
|
ss[1] = strings.TrimSpace(ss[1])
|
||||||
|
wpVersion = strings.Trim(ss[1], `";`)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err = scanner.Err(); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return &serialize.AnalysisResult{
|
||||||
|
CustomResources: []serialize.CustomResource{
|
||||||
|
{
|
||||||
|
Type: typeWPVersion,
|
||||||
|
FilePath: filePath,
|
||||||
|
Data: wpVersion,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
!!! tips
|
||||||
|
Trivy caches analysis results according to the module version.
|
||||||
|
We'd recommend cleaning the cache or changing the module version every time you update `Analyzer`.
|
||||||
|
|
||||||
|
|
||||||
|
#### PostScanner interface
|
||||||
|
`PostScan` is called after scanning and takes the scan result as an argument from Trivy.
|
||||||
|
In post scanning, your module can perform one of three actions:
|
||||||
|
|
||||||
|
- Insert
|
||||||
|
- Add a new security finding
|
||||||
|
- e.g. Add a new vulnerability and misconfiguration
|
||||||
|
- Update
|
||||||
|
- Update the detected vulnerability and misconfiguration
|
||||||
|
- e.g. Change a severity
|
||||||
|
- Delete
|
||||||
|
- Delete the detected vulnerability and misconfiguration
|
||||||
|
- e.g. Remove Spring4Shell because it is not actually affected.
|
||||||
|
|
||||||
|
`PostScanSpec()` returns which action the module does.
|
||||||
|
If it is `Update` or `Delete`, it also needs to return IDs such as CVE-ID and misconfiguration ID, which your module wants to update or delete.
|
||||||
|
|
||||||
|
`serialize.Results` contains the filtered results matching IDs you specified.
|
||||||
|
Also, it includes `CustomResources` with the values your `Analyze` returns, so you can modify the scan result according to the custom resources.
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (WordpressModule) PostScanSpec() serialize.PostScanSpec {
|
||||||
|
return serialize.PostScanSpec{
|
||||||
|
Action: api.ActionInsert, // Add new vulnerabilities
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (WordpressModule) PostScan(results serialize.Results) (serialize.Results, error) {
|
||||||
|
// e.g. results
|
||||||
|
// [
|
||||||
|
// {
|
||||||
|
// "Target": "",
|
||||||
|
// "Class": "custom",
|
||||||
|
// "CustomResources": [
|
||||||
|
// {
|
||||||
|
// "Type": "wordpress-version",
|
||||||
|
// "FilePath": "/usr/src/wordpress/wp-includes/version.php",
|
||||||
|
// "Layer": {
|
||||||
|
// "DiffID": "sha256:057649e61046e02c975b84557c03c6cca095b8c9accd3bd20eb4e432f7aec887"
|
||||||
|
// },
|
||||||
|
// "Data": "5.7.1"
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
var wpVersion int
|
||||||
|
for _, result := range results {
|
||||||
|
if result.Class != types.ClassCustom {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, c := range result.CustomResources {
|
||||||
|
if c.Type != typeWPVersion {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
wpVersion = c.Data.(string)
|
||||||
|
wasm.Info(fmt.Sprintf("WordPress Version: %s", wpVersion))
|
||||||
|
|
||||||
|
...snip...
|
||||||
|
|
||||||
|
if affectedVersion.Check(ver) {
|
||||||
|
vulnerable = true
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if vulnerable {
|
||||||
|
// Add CVE-2020-36326
|
||||||
|
results = append(results, serialize.Result{
|
||||||
|
Target: wpPath,
|
||||||
|
Class: types.ClassLangPkg,
|
||||||
|
Type: "wordpress",
|
||||||
|
Vulnerabilities: []types.DetectedVulnerability {
|
||||||
|
{
|
||||||
|
VulnerabilityID: "CVE-2020-36326",
|
||||||
|
PkgName: "wordpress",
|
||||||
|
InstalledVersion: wpVersion,
|
||||||
|
FixedVersion: "5.7.2",
|
||||||
|
Vulnerability: dbTypes.Vulnerability{
|
||||||
|
Title: "PHPMailer 6.1.8 through 6.4.0 allows object injection through Phar Deserialization via addAttachment with a UNC pathname.",
|
||||||
|
Severity: "CRITICAL",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return results, nil
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
The new vulnerability will be added to the scan results.
|
||||||
|
This example shows how the module inserts a new finding.
|
||||||
|
If you are interested in `Update`, you can see an example of [Spring4Shell][trivy-module-spring4shell].
|
||||||
|
|
||||||
|
In the `Delete` action, `PostScan` needs to return results you want to delete.
|
||||||
|
If `PostScan` returns an empty, Trivy will not delete anything.
|
||||||
|
|
||||||
|
#### Build
|
||||||
|
Follow [the install guide][tinygo-installation] and install TinyGo.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ tinygo build -o wordpress.wasm -scheduler=none -target=wasi --no-debug wordpress.go
|
||||||
|
```
|
||||||
|
|
||||||
|
Put the built binary to the module directory that is under the home directory by default.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ mkdir -p ~/.trivy/modules
|
||||||
|
$ cp spring4shell.wasm ~/.trivy/modules
|
||||||
|
```
|
||||||
|
|
||||||
|
## Distribute Your Module
|
||||||
|
You can distribute your own module in OCI registries. Please follow [the oras installation instruction][oras].
|
||||||
|
|
||||||
|
```bash
|
||||||
|
oras push ghcr.io/aquasecurity/trivy-module-wordpress:latest wordpress.wasm:application/vnd.module.wasm.content.layer.v1+wasm
|
||||||
|
Uploading 3daa3dac086b wordpress.wasm
|
||||||
|
Pushed ghcr.io/aquasecurity/trivy-module-wordpress:latest
|
||||||
|
Digest: sha256:6416d0199d66ce52ced19f01d75454b22692ff3aa7737e45f7a189880840424f
|
||||||
|
```
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
- [Spring4Shell][trivy-module-spring4shell]
|
||||||
|
- [WordPress][trivy-module-wordpress]
|
||||||
|
|
||||||
|
[regexp]: https://github.com/google/re2/wiki/Syntax
|
||||||
|
|
||||||
|
[tinygo]: https://tinygo.org/
|
||||||
|
[spring4shell]: https://blog.aquasec.com/zero-day-rce-vulnerability-spring4shell
|
||||||
|
[wazero]: https://github.com/tetratelabs/wazero
|
||||||
|
|
||||||
|
[trivy-module-spring4shell]: https://github.com/aquasecurity/trivy/tree/main/examples/module/spring4shell
|
||||||
|
[trivy-module-wordpress]: https://github.com/aquasecurity/trivy-module-wordpress
|
||||||
|
|
||||||
|
[tinygo-installation]: https://tinygo.org/getting-started/install/
|
||||||
|
[oras]: https://oras.land/cli/
|
||||||
@@ -42,6 +42,11 @@ For example, to download the Kubernetes Trivy plugin you can execute the followi
|
|||||||
```bash
|
```bash
|
||||||
$ trivy plugin install github.com/aquasecurity/trivy-plugin-kubectl
|
$ trivy plugin install github.com/aquasecurity/trivy-plugin-kubectl
|
||||||
```
|
```
|
||||||
|
Also, Trivy plugin can be installed from a local archive:
|
||||||
|
```bash
|
||||||
|
$ trivy plugin install myplugin.tar.gz
|
||||||
|
```
|
||||||
|
|
||||||
## Using Plugins
|
## Using Plugins
|
||||||
Once the plugin is installed, Trivy will load all available plugins in the cache on the start of the next Trivy execution.
|
Once the plugin is installed, Trivy will load all available plugins in the cache on the start of the next Trivy execution.
|
||||||
A plugin will be made in the Trivy CLI based on the plugin name.
|
A plugin will be made in the Trivy CLI based on the plugin name.
|
||||||
@@ -162,6 +167,21 @@ When the plugin is called via Trivy CLI, `bin` command will be executed.
|
|||||||
|
|
||||||
The plugin is responsible for handling flags and arguments. Any arguments are passed to the plugin from the `trivy` command.
|
The plugin is responsible for handling flags and arguments. Any arguments are passed to the plugin from the `trivy` command.
|
||||||
|
|
||||||
|
A plugin should be archived `*.tar.gz`.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ tar -czvf myplugin.tar.gz plugin.yaml script.py
|
||||||
|
plugin.yaml
|
||||||
|
script.py
|
||||||
|
|
||||||
|
$ trivy plugin install myplugin.tar.gz
|
||||||
|
2023-03-03T19:04:42.026+0600 INFO Installing the plugin from myplugin.tar.gz...
|
||||||
|
2023-03-03T19:04:42.026+0600 INFO Loading the plugin metadata...
|
||||||
|
|
||||||
|
$ trivy myplugin
|
||||||
|
Hello from Trivy demo plugin!
|
||||||
|
```
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
https://github.com/aquasecurity/trivy-plugin-kubectl
|
https://github.com/aquasecurity/trivy-plugin-kubectl
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,2 @@
|
|||||||
Docker Hub needs `TRIVY_USERNAME` and `TRIVY_PASSWORD`.
|
See [here](./index.md) for the detail.
|
||||||
You don't need to set ENV vars when download from public repository.
|
You don't need to provide a credential when download from public repository.
|
||||||
|
|
||||||
```bash
|
|
||||||
export TRIVY_USERNAME={DOCKERHUB_USERNAME}
|
|
||||||
export TRIVY_PASSWORD={DOCKERHUB_PASSWORD}
|
|
||||||
```
|
|
||||||
|
|||||||
@@ -2,3 +2,34 @@ Trivy uses AWS SDK. You don't need to install `aws` CLI tool.
|
|||||||
You can use [AWS CLI's ENV Vars][env-var].
|
You can use [AWS CLI's ENV Vars][env-var].
|
||||||
|
|
||||||
[env-var]: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html
|
[env-var]: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html
|
||||||
|
|
||||||
|
### AWS private registry permissions
|
||||||
|
|
||||||
|
You may need to grant permissions to allow Trivy to pull images from private ECR.
|
||||||
|
|
||||||
|
It depends on how you want to provide AWS Role to trivy.
|
||||||
|
|
||||||
|
- [IAM Role Service account](https://github.com/aws/amazon-eks-pod-identity-webhook)
|
||||||
|
- [Kube2iam](https://github.com/jtblin/kube2iam) or [Kiam](https://github.com/uswitch/kiam)
|
||||||
|
|
||||||
|
#### IAM Role Service account
|
||||||
|
|
||||||
|
Add the AWS role in trivy's service account annotations:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
trivy:
|
||||||
|
|
||||||
|
serviceAccount:
|
||||||
|
annotations: {}
|
||||||
|
# eks.amazonaws.com/role-arn: arn:aws:iam::ACCOUNT_ID:role/IAM_ROLE_NAME
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Kube2iam or Kiam
|
||||||
|
|
||||||
|
Add the AWS role to pod's annotations:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
podAnnotations: {}
|
||||||
|
## kube2iam/kiam annotation
|
||||||
|
# iam.amazonaws.com/role: arn:aws:iam::ACCOUNT_ID:role/IAM_ROLE_NAME
|
||||||
|
```
|
||||||
|
|||||||
@@ -1,4 +1,49 @@
|
|||||||
Trivy can download images from a private registry, without installing `Docker` or any other 3rd party tools.
|
Trivy can download images from a private registry without the need for installing Docker or any other 3rd party tools.
|
||||||
That's because it's easy to run in a CI process.
|
This makes it easy to run within a CI process.
|
||||||
|
|
||||||
All you have to do is install `Trivy` and set ENV vars.
|
## Credential
|
||||||
|
To use Trivy with private images, simply install it and provide your credentials:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ TRIVY_USERNAME=YOUR_USERNAME TRIVY_PASSWORD=YOUR_PASSWORD trivy image YOUR_PRIVATE_IMAGE
|
||||||
|
```
|
||||||
|
|
||||||
|
Trivy also supports providing credentials through CLI flags:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ TRIVY_PASSWORD=YOUR_PASSWORD trivy image --username YOUR_USERNAME YOUR_PRIVATE_IMAGE
|
||||||
|
```
|
||||||
|
|
||||||
|
!!! warning
|
||||||
|
The CLI flag `--password` is available, but its use is not recommended for security reasons.
|
||||||
|
|
||||||
|
You can also store your credentials in `trivy.yaml`.
|
||||||
|
For more information, please refer to [the documentation](../../references/configuration/config-file.md).
|
||||||
|
|
||||||
|
It can handle multiple sets of credentials as well:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ export TRIVY_USERNAME=USERNAME1,USERNAME2
|
||||||
|
$ export TRIVY_PASSWORD=PASSWORD1,PASSWORD2
|
||||||
|
$ trivy image YOUR_PRIVATE_IMAGE
|
||||||
|
```
|
||||||
|
|
||||||
|
In the example above, Trivy attempts to use two pairs of credentials:
|
||||||
|
|
||||||
|
- USERNAME1/PASSWORD1
|
||||||
|
- USERNAME2/PASSWORD2
|
||||||
|
|
||||||
|
Please note that the number of usernames and passwords must be the same.
|
||||||
|
|
||||||
|
## docker login
|
||||||
|
If you have Docker configured locally and have set up the credentials, Trivy can access them.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ docker login ghcr.io
|
||||||
|
Username:
|
||||||
|
Password:
|
||||||
|
$ trivy image ghcr.io/your/private_image
|
||||||
|
```
|
||||||
|
|
||||||
|
!!! note
|
||||||
|
`docker login` can be used with any container runtime, such as Podman.
|
||||||
|
|||||||
70
docs/docs/compliance/compliance.md
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
# Compliance Reports
|
||||||
|
|
||||||
|
!!! warning "EXPERIMENTAL"
|
||||||
|
This feature might change without preserving backwards compatibility.
|
||||||
|
|
||||||
|
Trivy’s compliance flag lets you curate a specific set of checks into a report. In a typical Trivy scan, there are hundreds of different checks for many different components and configurations, but sometimes you already know which specific checks you are interested in. Often this would be an industry accepted set of checks such as CIS, or some vendor specific guideline, or your own organization policy that you want to comply with. These are all possible using the flexible compliance infrastructure that's built into Trivy. Compliance reports are defined as simple YAML documents that select checks to include in the report.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
Compliance report is currently supported in the following targets (trivy sub-commands):
|
||||||
|
|
||||||
|
- `trivy image`
|
||||||
|
- `trivy aws`
|
||||||
|
- `trivy k8s`
|
||||||
|
|
||||||
|
Add the `--compliance` flag to the command line, and set it's value to desired report.
|
||||||
|
For example: `trivy k8s cluster --compliance k8s-nsa` (see below for built-in and custom reports)
|
||||||
|
|
||||||
|
### Options
|
||||||
|
|
||||||
|
The following flags are compatible with `--compliance` flag and allows customizing it's output:
|
||||||
|
|
||||||
|
| flag | effect |
|
||||||
|
|--------------------|--------------------------------------------------------------------------------------|
|
||||||
|
| `--report summary` | shows a summary of the results. for every control shows the number of failed checks. |
|
||||||
|
| `--report all` | shows fully detailed results. for every control shows where it failed and why. |
|
||||||
|
| `--format table` | shows results in textual table format (good for human readability). |
|
||||||
|
| `--format json` | shows results in json format (good for machine readability). |
|
||||||
|
|
||||||
|
## Built-in compliance
|
||||||
|
|
||||||
|
Trivy has a number of built-in compliance reports that you can asses right out of the box.
|
||||||
|
to specify a built-in compliance report, select it by ID like `trivy --compliance <compliance_id>`.
|
||||||
|
|
||||||
|
For the list of built-in compliance reports, please see the relevant section:
|
||||||
|
|
||||||
|
- [Docker compliance](../target/container_image.md#compliance)
|
||||||
|
- [Kubernetes compliance](../target/kubernetes.md#compliance)
|
||||||
|
- [AWS compliance](../target/aws.md#compliance)
|
||||||
|
|
||||||
|
## Custom compliance
|
||||||
|
|
||||||
|
You can create your own custom compliance report. A compliance report is a simple YAML document in the following format:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
spec:
|
||||||
|
id: "k8s-myreport" # report unique identifier. this should not container spaces.
|
||||||
|
title: "My custom Kubernetes report" # report title. Any one-line title.
|
||||||
|
description: "Describe your report" # description of the report. Any text.
|
||||||
|
relatedResources :
|
||||||
|
- https://some.url # useful references. URLs only.
|
||||||
|
version: "1.0" # spec version (string)
|
||||||
|
controls:
|
||||||
|
- name: "Non-root containers" # Name for the control (appears in the report as is). Any one-line name.
|
||||||
|
description: 'Check that container is not running as root' # Description (appears in the report as is). Any text.
|
||||||
|
id: "1.0" # control identifier (string)
|
||||||
|
checks: # list of existing Trivy checks that define the control
|
||||||
|
- id: AVD-KSV-0012 # check ID. Must start with `AVD-` or `CVE-`
|
||||||
|
severity: "MEDIUM" # Severity for the control (note that checks severity isn't used)
|
||||||
|
- name: "Immutable container file systems"
|
||||||
|
description: 'Check that container root file system is immutable'
|
||||||
|
id: "1.1"
|
||||||
|
checks:
|
||||||
|
- id: AVD-KSV-0014
|
||||||
|
severity: "LOW"
|
||||||
|
```
|
||||||
|
|
||||||
|
The check id field (`controls[].checks[].id`) is referring to existing check by it's "AVD ID". This AVD ID is easily located in the check's source code metadata header, or by browsing [Aqua vulnerability DB](https://avd.aquasec.com/), specifically in the [Misconfigurations](https://avd.aquasec.com/misconfig/) and [Vulnerabilities](https://avd.aquasec.com/nvd) sections.
|
||||||
|
|
||||||
|
Once you have a compliance spec, you can select it by file path: `trivy --compliance @</path/to/compliance.yaml>` (note the `@` indicating file path instead of report id).
|
||||||
@@ -1,4 +1,12 @@
|
|||||||
# Cache
|
# Cache
|
||||||
|
The cache directory includes
|
||||||
|
|
||||||
|
- [Vulnerability Database][trivy-db][^1]
|
||||||
|
- [Java Index Database][trivy-java-db][^2]
|
||||||
|
- [Misconfiguration Policies][misconf-policies][^3]
|
||||||
|
- Cache of previous scans.
|
||||||
|
|
||||||
|
The cache option is common to all scanners.
|
||||||
|
|
||||||
## Clear Caches
|
## Clear Caches
|
||||||
The `--clear-cache` option removes caches.
|
The `--clear-cache` option removes caches.
|
||||||
@@ -44,7 +52,14 @@ Two options:
|
|||||||
$ trivy server --cache-backend redis://localhost:6379
|
$ trivy server --cache-backend redis://localhost:6379
|
||||||
```
|
```
|
||||||
|
|
||||||
Trivy also support for connecting to Redis using TLS, you only need to specify `--redis-ca` , `--redis-cert` , and `--redis-key` option.
|
If you want to use TLS with Redis, you can enable it by specifying the `--redis-tls` flag.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ trivy server --cache-backend redis://localhost:6379 --redis-tls
|
||||||
|
```
|
||||||
|
|
||||||
|
Trivy also supports for connecting to Redis with your certificates.
|
||||||
|
You need to specify `--redis-ca` , `--redis-cert` , and `--redis-key` options.
|
||||||
|
|
||||||
```
|
```
|
||||||
$ trivy server --cache-backend redis://localhost:6379 \
|
$ trivy server --cache-backend redis://localhost:6379 \
|
||||||
@@ -53,4 +68,10 @@ $ trivy server --cache-backend redis://localhost:6379 \
|
|||||||
--redis-key /path/to/key.pem
|
--redis-key /path/to/key.pem
|
||||||
```
|
```
|
||||||
|
|
||||||
TLS option for redis is hidden from Trivy command-line flag, but you still can use it.
|
[trivy-db]: ./db.md#vulnerability-database
|
||||||
|
[trivy-java-db]: ./db.md#java-index-database
|
||||||
|
[misconf-policies]: ../scanner/misconfiguration/policy/builtin.md
|
||||||
|
|
||||||
|
[^1]: Downloaded when scanning for vulnerabilities
|
||||||
|
[^2]: Downloaded when scanning `jar/war/par/ear` files
|
||||||
|
[^3]: Downloaded when scanning for misconfigurations
|
||||||
@@ -1,9 +1,19 @@
|
|||||||
# Vulnerability DB
|
# DB
|
||||||
|
|
||||||
## Skip update of vulnerability DB
|
| Scanner | Supported |
|
||||||
`Trivy` downloads its vulnerability database every 12 hours when it starts operating.
|
|:----------------:|:---------:|
|
||||||
This is usually fast, as the size of the DB is only 10~30MB.
|
| Vulnerability | ✓ |
|
||||||
But if you want to skip even that, use the `--skip-db-update` option.
|
| Misconfiguration | |
|
||||||
|
| Secret | |
|
||||||
|
| License | |
|
||||||
|
|
||||||
|
The vulnerability database and the Java index database are needed only for vulnerability scanning.
|
||||||
|
See [here](../scanner/vulnerability/index.md) for the detail.
|
||||||
|
|
||||||
|
## Vulnerability Database
|
||||||
|
|
||||||
|
### Skip update of vulnerability DB
|
||||||
|
If you want to skip downloading the vulnerability database, use the `--skip-db-update` option.
|
||||||
|
|
||||||
```
|
```
|
||||||
$ trivy image --skip-db-update python:3.4-alpine3.9
|
$ trivy image --skip-db-update python:3.4-alpine3.9
|
||||||
@@ -29,7 +39,7 @@ Total: 1 (UNKNOWN: 0, LOW: 0, MEDIUM: 1, HIGH: 0, CRITICAL: 0)
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
## Only download vulnerability database
|
### Only download vulnerability database
|
||||||
You can also ask `Trivy` to simply retrieve the vulnerability database.
|
You can also ask `Trivy` to simply retrieve the vulnerability database.
|
||||||
This is useful to initialize workers in Continuous Integration systems.
|
This is useful to initialize workers in Continuous Integration systems.
|
||||||
|
|
||||||
@@ -37,9 +47,26 @@ This is useful to initialize workers in Continuous Integration systems.
|
|||||||
$ trivy image --download-db-only
|
$ trivy image --download-db-only
|
||||||
```
|
```
|
||||||
|
|
||||||
## DB Repository
|
### DB Repository
|
||||||
`Trivy` could also download the vulnerability database from an external OCI registry by using `--db-repository` option.
|
`Trivy` could also download the vulnerability database from an external OCI registry by using `--db-repository` option.
|
||||||
|
|
||||||
```
|
```
|
||||||
$ trivy image --db-repository registry.gitlab.com/gitlab-org/security-products/dependencies/trivy-db
|
$ trivy image --db-repository registry.gitlab.com/gitlab-org/security-products/dependencies/trivy-db
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Java Index Database
|
||||||
|
The same options are also available for the Java index DB, which is used for scanning Java applications.
|
||||||
|
Skipping an update can be done by using the `--skip-java-db-update` option, while `--download-java-db-only` can be used to only download the Java index DB.
|
||||||
|
|
||||||
|
Downloading the Java index DB from an external OCI registry can be done by using the `--java-db-repository` option.
|
||||||
|
|
||||||
|
```
|
||||||
|
$ trivy image --java-db-repository registry.gitlab.com/gitlab-org/security-products/dependencies/trivy-java-db --download-java-db-only
|
||||||
|
```
|
||||||
|
|
||||||
|
## Remove DBs
|
||||||
|
The `--reset` flag removes all caches and databases.
|
||||||
|
|
||||||
|
```
|
||||||
|
$ trivy image --reset
|
||||||
|
```
|
||||||
@@ -1,8 +1,18 @@
|
|||||||
# Filter Vulnerabilities
|
# Filtering
|
||||||
|
Trivy provides various methods for filtering the results.
|
||||||
|
|
||||||
|
|
||||||
## Hide Unfixed Vulnerabilities
|
## Hide Unfixed Vulnerabilities
|
||||||
|
|
||||||
By default, `Trivy` also detects unpatched/unfixed vulnerabilities. This means you can't fix these vulnerabilities even if you update all packages.
|
| Scanner | Supported |
|
||||||
|
|:----------------:|:---------:|
|
||||||
|
| Vulnerability | ✓ |
|
||||||
|
| Misconfiguration | |
|
||||||
|
| Secret | |
|
||||||
|
| License | |
|
||||||
|
|
||||||
|
By default, `Trivy` also detects unpatched/unfixed vulnerabilities.
|
||||||
|
This means you can't fix these vulnerabilities even if you update all packages.
|
||||||
If you would like to ignore them, use the `--ignore-unfixed` option.
|
If you would like to ignore them, use the `--ignore-unfixed` option.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -50,6 +60,13 @@ Total: 4730 (UNKNOWN: 1, LOW: 145, MEDIUM: 3487, HIGH: 1014, CRITICAL: 83)
|
|||||||
|
|
||||||
## By Severity
|
## By Severity
|
||||||
|
|
||||||
|
| Scanner | Supported |
|
||||||
|
|:----------------:|:---------:|
|
||||||
|
| Vulnerability | ✓ |
|
||||||
|
| Misconfiguration | ✓ |
|
||||||
|
| Secret | ✓ |
|
||||||
|
| License | ✓ |
|
||||||
|
|
||||||
Use `--severity` option.
|
Use `--severity` option.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -113,7 +130,69 @@ Total: 1785 (UNKNOWN: 0, LOW: 0, MEDIUM: 0, HIGH: 1680, CRITICAL: 105)
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
## By Vulnerability IDs
|
```bash
|
||||||
|
trivy conf --severity HIGH,CRITICAL examples/misconf/mixed
|
||||||
|
```
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Result</summary>
|
||||||
|
|
||||||
|
```shell
|
||||||
|
2022-05-16T13:50:42.718+0100 INFO Detected config files: 3
|
||||||
|
|
||||||
|
Dockerfile (dockerfile)
|
||||||
|
=======================
|
||||||
|
Tests: 17 (SUCCESSES: 16, FAILURES: 1, EXCEPTIONS: 0)
|
||||||
|
Failures: 1 (HIGH: 1, CRITICAL: 0)
|
||||||
|
|
||||||
|
HIGH: Last USER command in Dockerfile should not be 'root'
|
||||||
|
═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
|
||||||
|
Running containers with 'root' user can lead to a container escape situation. It is a best practice to run containers as non-root users, which can be done by adding a 'USER' statement to the Dockerfile.
|
||||||
|
|
||||||
|
See https://avd.aquasec.com/misconfig/ds002
|
||||||
|
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||||
|
Dockerfile:3
|
||||||
|
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||||
|
3 [ USER root
|
||||||
|
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
deployment.yaml (kubernetes)
|
||||||
|
============================
|
||||||
|
Tests: 8 (SUCCESSES: 8, FAILURES: 0, EXCEPTIONS: 0)
|
||||||
|
Failures: 0 (HIGH: 0, CRITICAL: 0)
|
||||||
|
|
||||||
|
|
||||||
|
main.tf (terraform)
|
||||||
|
===================
|
||||||
|
Tests: 1 (SUCCESSES: 0, FAILURES: 1, EXCEPTIONS: 0)
|
||||||
|
Failures: 1 (HIGH: 0, CRITICAL: 1)
|
||||||
|
|
||||||
|
CRITICAL: Classic resources should not be used.
|
||||||
|
═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
|
||||||
|
AWS Classic resources run in a shared environment with infrastructure owned by other AWS customers. You should run
|
||||||
|
resources in a VPC instead.
|
||||||
|
|
||||||
|
See https://avd.aquasec.com/misconfig/avd-aws-0081
|
||||||
|
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||||
|
main.tf:2-4
|
||||||
|
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||||
|
2 ┌ resource "aws_db_security_group" "sg" {
|
||||||
|
3 │
|
||||||
|
4 └ }
|
||||||
|
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||||
|
```
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## By Finding IDs
|
||||||
|
|
||||||
|
| Scanner | Supported |
|
||||||
|
|:----------------:|:---------:|
|
||||||
|
| Vulnerability | ✓ |
|
||||||
|
| Misconfiguration | ✓ |
|
||||||
|
| Secret | ✓ |
|
||||||
|
| License | |
|
||||||
|
|
||||||
Use `.trivyignore`.
|
Use `.trivyignore`.
|
||||||
|
|
||||||
@@ -122,9 +201,21 @@ $ cat .trivyignore
|
|||||||
# Accept the risk
|
# Accept the risk
|
||||||
CVE-2018-14618
|
CVE-2018-14618
|
||||||
|
|
||||||
|
# Accept the risk until 2023-01-01
|
||||||
|
CVE-2019-14697 exp:2023-01-01
|
||||||
|
|
||||||
# No impact in our settings
|
# No impact in our settings
|
||||||
CVE-2019-1543
|
CVE-2019-1543
|
||||||
|
|
||||||
|
# Ignore misconfigurations
|
||||||
|
AVD-DS-0002
|
||||||
|
|
||||||
|
# Ignore secrets
|
||||||
|
generic-unwanted-rule
|
||||||
|
aws-account-id
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
$ trivy image python:3.4-alpine3.9
|
$ trivy image python:3.4-alpine3.9
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -143,7 +234,14 @@ Total: 0 (UNKNOWN: 0, LOW: 0, MEDIUM: 0, HIGH: 0, CRITICAL: 0)
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
## By Type
|
## By Vulnerability Target
|
||||||
|
| Scanner | Supported |
|
||||||
|
|:----------------:|:---------:|
|
||||||
|
| Vulnerability | ✓ |
|
||||||
|
| Misconfiguration | |
|
||||||
|
| Secret | |
|
||||||
|
| License | |
|
||||||
|
|
||||||
Use `--vuln-type` option.
|
Use `--vuln-type` option.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -151,6 +249,7 @@ $ trivy image --vuln-type os ruby:2.4.0
|
|||||||
```
|
```
|
||||||
|
|
||||||
Available values:
|
Available values:
|
||||||
|
|
||||||
- library
|
- library
|
||||||
- os
|
- os
|
||||||
|
|
||||||
@@ -166,7 +265,8 @@ Available values:
|
|||||||
2019-05-22T19:36:53.406+0200 [34mINFO[0m Detecting pipenv vulnerabilities...
|
2019-05-22T19:36:53.406+0200 [34mINFO[0m Detecting pipenv vulnerabilities...
|
||||||
|
|
||||||
ruby:2.4.0 (debian 8.7)
|
ruby:2.4.0 (debian 8.7)
|
||||||
Total: 4751 (UNKNOWN: 1, LOW: 150, MEDIUM: 3504, HIGH: 1013, CRITICAL: 83)
|
=======================
|
||||||
|
Total: 7 (UNKNOWN: 0, LOW: 1, MEDIUM: 1, HIGH: 3, CRITICAL: 2)
|
||||||
|
|
||||||
+---------+------------------+----------+-------------------+---------------+----------------------------------+
|
+---------+------------------+----------+-------------------+---------------+----------------------------------+
|
||||||
| LIBRARY | VULNERABILITY ID | SEVERITY | INSTALLED VERSION | FIXED VERSION | TITLE |
|
| LIBRARY | VULNERABILITY ID | SEVERITY | INSTALLED VERSION | FIXED VERSION | TITLE |
|
||||||
@@ -177,23 +277,6 @@ Total: 4751 (UNKNOWN: 1, LOW: 150, MEDIUM: 3504, HIGH: 1013, CRITICAL: 83)
|
|||||||
| | CVE-2018-16839 | HIGH | | 7.61.1-r1 | curl: Integer overflow leading |
|
| | CVE-2018-16839 | HIGH | | 7.61.1-r1 | curl: Integer overflow leading |
|
||||||
| | | | | | to heap-based buffer overflow in |
|
| | | | | | to heap-based buffer overflow in |
|
||||||
| | | | | | Curl_sasl_create_plain_message() |
|
| | | | | | Curl_sasl_create_plain_message() |
|
||||||
+ +------------------+ + +---------------+----------------------------------+
|
|
||||||
| | CVE-2019-3822 | | | 7.61.1-r2 | curl: NTLMv2 type-3 header |
|
|
||||||
| | | | | | stack buffer overflow |
|
|
||||||
+ +------------------+ + +---------------+----------------------------------+
|
|
||||||
| | CVE-2018-16840 | | | 7.61.1-r1 | curl: Use-after-free when |
|
|
||||||
| | | | | | closing "easy" handle in |
|
|
||||||
| | | | | | Curl_close() |
|
|
||||||
+ +------------------+----------+ +---------------+----------------------------------+
|
|
||||||
| | CVE-2019-3823 | MEDIUM | | 7.61.1-r2 | curl: SMTP end-of-response |
|
|
||||||
| | | | | | out-of-bounds read |
|
|
||||||
+ +------------------+ + + +----------------------------------+
|
|
||||||
| | CVE-2018-16890 | | | | curl: NTLM type-2 heap |
|
|
||||||
| | | | | | out-of-bounds buffer read |
|
|
||||||
+ +------------------+ + +---------------+----------------------------------+
|
|
||||||
| | CVE-2018-16842 | | | 7.61.1-r1 | curl: Heap-based buffer |
|
|
||||||
| | | | | | over-read in the curl tool |
|
|
||||||
| | | | | | warning formatting |
|
|
||||||
+---------+------------------+----------+-------------------+---------------+----------------------------------+
|
+---------+------------------+----------+-------------------+---------------+----------------------------------+
|
||||||
| git | CVE-2018-17456 | HIGH | 2.15.2-r0 | 2.15.3-r0 | git: arbitrary code execution |
|
| git | CVE-2018-17456 | HIGH | 2.15.2-r0 | 2.15.3-r0 | git: arbitrary code execution |
|
||||||
| | | | | | via .gitmodules |
|
| | | | | | via .gitmodules |
|
||||||
@@ -205,67 +288,6 @@ Total: 4751 (UNKNOWN: 1, LOW: 150, MEDIUM: 3504, HIGH: 1013, CRITICAL: 83)
|
|||||||
| libssh2 | CVE-2019-3855 | CRITICAL | 1.8.0-r2 | 1.8.1-r0 | libssh2: Integer overflow in |
|
| libssh2 | CVE-2019-3855 | CRITICAL | 1.8.0-r2 | 1.8.1-r0 | libssh2: Integer overflow in |
|
||||||
| | | | | | transport read resulting in |
|
| | | | | | transport read resulting in |
|
||||||
| | | | | | out of bounds write... |
|
| | | | | | out of bounds write... |
|
||||||
+ +------------------+----------+ + +----------------------------------+
|
|
||||||
| | CVE-2019-3861 | MEDIUM | | | libssh2: Out-of-bounds reads |
|
|
||||||
| | | | | | with specially crafted SSH |
|
|
||||||
| | | | | | packets |
|
|
||||||
+ +------------------+ + + +----------------------------------+
|
|
||||||
| | CVE-2019-3857 | | | | libssh2: Integer overflow in |
|
|
||||||
| | | | | | SSH packet processing channel |
|
|
||||||
| | | | | | resulting in out of... |
|
|
||||||
+ +------------------+ + + +----------------------------------+
|
|
||||||
| | CVE-2019-3856 | | | | libssh2: Integer overflow in |
|
|
||||||
| | | | | | keyboard interactive handling |
|
|
||||||
| | | | | | resulting in out of bounds... |
|
|
||||||
+ +------------------+ + + +----------------------------------+
|
|
||||||
| | CVE-2019-3863 | | | | libssh2: Integer overflow |
|
|
||||||
| | | | | | in user authenticate |
|
|
||||||
| | | | | | keyboard interactive allows |
|
|
||||||
| | | | | | out-of-bounds writes |
|
|
||||||
+ +------------------+ + + +----------------------------------+
|
|
||||||
| | CVE-2019-3862 | | | | libssh2: Out-of-bounds memory |
|
|
||||||
| | | | | | comparison with specially |
|
|
||||||
| | | | | | crafted message channel |
|
|
||||||
| | | | | | request |
|
|
||||||
+ +------------------+ + + +----------------------------------+
|
|
||||||
| | CVE-2019-3860 | | | | libssh2: Out-of-bounds reads |
|
|
||||||
| | | | | | with specially crafted SFTP |
|
|
||||||
| | | | | | packets |
|
|
||||||
+ +------------------+ + + +----------------------------------+
|
|
||||||
| | CVE-2019-3858 | | | | libssh2: Zero-byte allocation |
|
|
||||||
| | | | | | with a specially crafted SFTP |
|
|
||||||
| | | | | | packed leading to an... |
|
|
||||||
+ +------------------+ + + +----------------------------------+
|
|
||||||
| | CVE-2019-3859 | | | | libssh2: Unchecked use of |
|
|
||||||
| | | | | | _libssh2_packet_require and |
|
|
||||||
| | | | | | _libssh2_packet_requirev |
|
|
||||||
| | | | | | resulting in out-of-bounds |
|
|
||||||
| | | | | | read |
|
|
||||||
+---------+------------------+ +-------------------+---------------+----------------------------------+
|
|
||||||
| libxml2 | CVE-2018-14404 | | 2.9.7-r0 | 2.9.8-r1 | libxml2: NULL pointer |
|
|
||||||
| | | | | | dereference in |
|
|
||||||
| | | | | | xpath.c:xmlXPathCompOpEval() |
|
|
||||||
| | | | | | can allow attackers to cause |
|
|
||||||
| | | | | | a... |
|
|
||||||
+ +------------------+ + + +----------------------------------+
|
|
||||||
| | CVE-2018-14567 | | | | libxml2: Infinite loop when |
|
|
||||||
| | | | | | --with-lzma is used allows for |
|
|
||||||
| | | | | | denial of service... |
|
|
||||||
+ +------------------+----------+ + +----------------------------------+
|
|
||||||
| | CVE-2018-9251 | LOW | | | libxml2: infinite loop in |
|
|
||||||
| | | | | | xz_decomp function in xzlib.c |
|
|
||||||
+---------+------------------+----------+-------------------+---------------+----------------------------------+
|
|
||||||
| openssh | CVE-2019-6109 | MEDIUM | 7.5_p1-r9 | 7.5_p1-r10 | openssh: Missing character |
|
|
||||||
| | | | | | encoding in progress display |
|
|
||||||
| | | | | | allows for spoofing of scp... |
|
|
||||||
+ +------------------+ + + +----------------------------------+
|
|
||||||
| | CVE-2019-6111 | | | | openssh: Improper validation |
|
|
||||||
| | | | | | of object names allows |
|
|
||||||
| | | | | | malicious server to overwrite |
|
|
||||||
| | | | | | files... |
|
|
||||||
+ +------------------+----------+ + +----------------------------------+
|
|
||||||
| | CVE-2018-20685 | LOW | | | openssh: scp client improper |
|
|
||||||
| | | | | | directory name validation |
|
|
||||||
+---------+------------------+----------+-------------------+---------------+----------------------------------+
|
+---------+------------------+----------+-------------------+---------------+----------------------------------+
|
||||||
| sqlite | CVE-2018-20346 | MEDIUM | 3.21.0-r1 | 3.25.3-r0 | CVE-2018-20505 CVE-2018-20506 |
|
| sqlite | CVE-2018-20346 | MEDIUM | 3.21.0-r1 | 3.25.3-r0 | CVE-2018-20505 CVE-2018-20506 |
|
||||||
| | | | | | sqlite: Multiple flaws in |
|
| | | | | | sqlite: Multiple flaws in |
|
||||||
@@ -280,13 +302,20 @@ Total: 4751 (UNKNOWN: 1, LOW: 150, MEDIUM: 3504, HIGH: 1013, CRITICAL: 83)
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
|
||||||
## By Open Policy Agent
|
## By Open Policy Agent
|
||||||
|
|
||||||
|
| Scanner | Supported |
|
||||||
|
|:----------------:|:---------:|
|
||||||
|
| Vulnerability | ✓ |
|
||||||
|
| Misconfiguration | ✓ |
|
||||||
|
| Secret | |
|
||||||
|
| License | |
|
||||||
|
|
||||||
!!! warning "EXPERIMENTAL"
|
!!! warning "EXPERIMENTAL"
|
||||||
This feature might change without preserving backwards compatibility.
|
This feature might change without preserving backwards compatibility.
|
||||||
|
|
||||||
Trivy supports Open Policy Agent (OPA) to filter vulnerabilities. You can specify a Rego file with `--ignore-policy` option.
|
Trivy supports Open Policy Agent (OPA) to filter vulnerabilities.
|
||||||
|
You can specify a Rego file with `--ignore-policy` option.
|
||||||
|
|
||||||
The Rego package name must be `trivy` and it must include a rule called `ignore` which determines if each individual vulnerability should be excluded (ignore=true) or not (ignore=false). In the policy, each vulnerability will be available for inspection as the `input` variable. The structure of each vulnerability input is the same as for the Trivy JSON output.
|
The Rego package name must be `trivy` and it must include a rule called `ignore` which determines if each individual vulnerability should be excluded (ignore=true) or not (ignore=false). In the policy, each vulnerability will be available for inspection as the `input` variable. The structure of each vulnerability input is the same as for the Trivy JSON output.
|
||||||
There is a built-in Rego library with helper functions that you can import into your policy using: `import data.lib.trivy`. For more info about the helper functions, look at the library [here][helper]
|
There is a built-in Rego library with helper functions that you can import into your policy using: `import data.lib.trivy`. For more info about the helper functions, look at the library [here][helper]
|
||||||
@@ -354,3 +383,28 @@ Total: 9 (UNKNOWN: 0, LOW: 0, MEDIUM: 0, HIGH: 4, CRITICAL: 5)
|
|||||||
|
|
||||||
[helper]: https://github.com/aquasecurity/trivy/tree/{{ git.tag }}/pkg/result/module.go
|
[helper]: https://github.com/aquasecurity/trivy/tree/{{ git.tag }}/pkg/result/module.go
|
||||||
[policy]: https://github.com/aquasecurity/trivy/tree/{{ git.tag }}/contrib/example_policy
|
[policy]: https://github.com/aquasecurity/trivy/tree/{{ git.tag }}/contrib/example_policy
|
||||||
|
|
||||||
|
## By Inline Comments
|
||||||
|
|
||||||
|
| Scanner | Supported |
|
||||||
|
|:----------------:|:---------:|
|
||||||
|
| Vulnerability | |
|
||||||
|
| Misconfiguration | ✓ |
|
||||||
|
| Secret | |
|
||||||
|
| License | |
|
||||||
|
|
||||||
|
Some configuration file formats (e.g. Terraform) support inline comments.
|
||||||
|
|
||||||
|
In cases where trivy can detect comments of a specific format immediately adjacent to resource definitions, it is possible to filter/ignore findings from a single point of resource definition (in contrast to `.trivyignore`, which has a directory-wide scope on all of the files scanned).
|
||||||
|
|
||||||
|
The format for these comments is `trivy:ignore:<Vulnerability ID>` immediately following the format-specific line-comment token.
|
||||||
|
|
||||||
|
For example, to filter a Vulnerability ID "AVD-GCP-0051" in a Terraform HCL file:
|
||||||
|
|
||||||
|
```terraform
|
||||||
|
#trivy:ignore:AVD-GCP-0051
|
||||||
|
resource "google_container_cluster" "one_off_test" {
|
||||||
|
name = var.cluster_name
|
||||||
|
location = var.region
|
||||||
|
}
|
||||||
|
```
|
||||||
31
docs/docs/configuration/index.md
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
# Configuration
|
||||||
|
Trivy can be configured using the following ways. Each item takes precedence over the item below it:
|
||||||
|
|
||||||
|
- CLI flags
|
||||||
|
- Environment variables
|
||||||
|
- Configuration file
|
||||||
|
|
||||||
|
## CLI Flags
|
||||||
|
You can view the list of available flags using the `--help` option.
|
||||||
|
For more details, please refer to [the CLI reference](../references/configuration/cli/trivy.md).
|
||||||
|
|
||||||
|
## Environment Variables
|
||||||
|
Trivy can be customized by environment variables.
|
||||||
|
The environment variable key is the flag name converted by the following procedure.
|
||||||
|
|
||||||
|
- Add `TRIVY_` prefix
|
||||||
|
- Make it all uppercase
|
||||||
|
- Replace `-` with `_`
|
||||||
|
|
||||||
|
For example,
|
||||||
|
|
||||||
|
- `--debug` => `TRIVY_DEBUG`
|
||||||
|
- `--cache-dir` => `TRIVY_CACHE_DIR`
|
||||||
|
|
||||||
|
```
|
||||||
|
$ TRIVY_DEBUG=true TRIVY_SEVERITY=CRITICAL trivy image alpine:3.15
|
||||||
|
```
|
||||||
|
|
||||||
|
## Configuration File
|
||||||
|
By default, Trivy reads the `trivy.yaml` file.
|
||||||
|
For more details, please refer to [the page](../references/configuration/config-file.md).
|
||||||
201
docs/docs/configuration/others.md
Normal file
@@ -0,0 +1,201 @@
|
|||||||
|
# Others
|
||||||
|
|
||||||
|
## Enable/Disable Scanners
|
||||||
|
You can enable/disable scanners with the `--scanners` flag.
|
||||||
|
|
||||||
|
Supported values:
|
||||||
|
|
||||||
|
- vuln
|
||||||
|
- config
|
||||||
|
- secret
|
||||||
|
- license
|
||||||
|
|
||||||
|
For example, container image scanning enables vulnerability and secret scanners by default.
|
||||||
|
If you don't need secret scanning, it can be disabled.
|
||||||
|
|
||||||
|
``` shell
|
||||||
|
$ trivy image --scanners vuln alpine:3.15
|
||||||
|
```
|
||||||
|
|
||||||
|
## Skip Files
|
||||||
|
| Scanner | Supported |
|
||||||
|
|:----------------:|:---------:|
|
||||||
|
| Vulnerability | ✓ |
|
||||||
|
| Misconfiguration | ✓ |
|
||||||
|
| Secret | ✓ |
|
||||||
|
| License | ✓ |
|
||||||
|
|
||||||
|
By default, Trivy traverses directories and searches for all necessary files for scanning.
|
||||||
|
You can skip files that you don't maintain using the `--skip-files` flag.
|
||||||
|
|
||||||
|
```
|
||||||
|
$ trivy image --skip-files "/Gemfile.lock" --skip-files "/var/lib/gems/2.5.0/gems/http_parser.rb-0.6.0/Gemfile.lock" quay.io/fluentd_elasticsearch/fluentd:v2.9.0
|
||||||
|
```
|
||||||
|
|
||||||
|
It's possible to specify globs as part of the value.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ trivy image --skip-files "./testdata/*/bar" .
|
||||||
|
```
|
||||||
|
|
||||||
|
Will skip any file named `bar` in the subdirectories of testdata.
|
||||||
|
|
||||||
|
## Skip Directories
|
||||||
|
| Scanner | Supported |
|
||||||
|
|:----------------:|:---------:|
|
||||||
|
| Vulnerability | ✓ |
|
||||||
|
| Misconfiguration | ✓ |
|
||||||
|
| Secret | ✓ |
|
||||||
|
| License | ✓ |
|
||||||
|
|
||||||
|
By default, Trivy traverses directories and searches for all necessary files for scanning.
|
||||||
|
You can skip directories that you don't maintain using the `--skip-dirs` flag.
|
||||||
|
|
||||||
|
```
|
||||||
|
$ trivy image --skip-dirs /var/lib/gems/2.5.0/gems/fluent-plugin-detect-exceptions-0.0.13 --skip-dirs "/var/lib/gems/2.5.0/gems/http_parser.rb-0.6.0" quay.io/fluentd_elasticsearch/fluentd:v2.9.0
|
||||||
|
```
|
||||||
|
|
||||||
|
It's possible to specify globs as part of the value.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ trivy image --skip-dirs "./testdata/*" .
|
||||||
|
```
|
||||||
|
|
||||||
|
Will skip all subdirectories of the testdata directory.
|
||||||
|
|
||||||
|
!!! tip
|
||||||
|
Glob patterns work with any trivy subcommand (image, config, etc.) and can be specified to skip both directories (with `--skip-dirs`) and files (with `--skip-files`).
|
||||||
|
|
||||||
|
|
||||||
|
### Advanced globbing
|
||||||
|
Trivy also supports the [globstar](https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Pattern-Matching) pattern matching.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ trivy image --skip-files "**/foo"``` image:tag
|
||||||
|
```
|
||||||
|
|
||||||
|
Will skip the file `foo` that happens to be nested under any parent(s).
|
||||||
|
|
||||||
|
## File patterns
|
||||||
|
| Scanner | Supported |
|
||||||
|
|:----------------:|:---------:|
|
||||||
|
| Vulnerability | ✓ |
|
||||||
|
| Misconfiguration | ✓ |
|
||||||
|
| Secret | |
|
||||||
|
| License | |
|
||||||
|
|
||||||
|
When a directory is given as an input, Trivy will recursively look for and test all files based on file patterns.
|
||||||
|
The default file patterns are [here](../scanner/misconfiguration/custom/index.md).
|
||||||
|
|
||||||
|
In addition to the default file patterns, the `--file-patterns` option takes regexp patterns to look for your files.
|
||||||
|
For example, it may be useful when your file name of Dockerfile doesn't match the default patterns.
|
||||||
|
|
||||||
|
This can be repeated for specifying multiple file patterns.
|
||||||
|
|
||||||
|
A file pattern contains the analyzer it is used for, and the pattern itself, joined by a semicolon. For example:
|
||||||
|
```
|
||||||
|
--file-patterns "dockerfile:.*.docker" --file-patterns "yaml:deployment" --file-patterns "pip:requirements-.*\.txt"
|
||||||
|
```
|
||||||
|
|
||||||
|
The prefixes are listed [here](https://github.com/aquasecurity/trivy/tree/{{ git.commit }}/pkg/fanal/analyzer/const.go)
|
||||||
|
|
||||||
|
## Exit Code
|
||||||
|
| Scanner | Supported |
|
||||||
|
|:----------------:|:---------:|
|
||||||
|
| Vulnerability | ✓ |
|
||||||
|
| Misconfiguration | ✓ |
|
||||||
|
| Secret | ✓ |
|
||||||
|
| License | ✓ |
|
||||||
|
|
||||||
|
By default, `Trivy` exits with code 0 even when security issues are detected.
|
||||||
|
Use the `--exit-code` option if you want to exit with a non-zero exit code.
|
||||||
|
|
||||||
|
```
|
||||||
|
$ trivy image --exit-code 1 python:3.4-alpine3.9
|
||||||
|
```
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Result</summary>
|
||||||
|
|
||||||
|
```
|
||||||
|
2019-05-16T12:51:43.500+0900 INFO Updating vulnerability database...
|
||||||
|
2019-05-16T12:52:00.387+0900 INFO Detecting Alpine vulnerabilities...
|
||||||
|
|
||||||
|
python:3.4-alpine3.9 (alpine 3.9.2)
|
||||||
|
===================================
|
||||||
|
Total: 1 (UNKNOWN: 0, LOW: 0, MEDIUM: 1, HIGH: 0, CRITICAL: 0)
|
||||||
|
|
||||||
|
+---------+------------------+----------+-------------------+---------------+--------------------------------+
|
||||||
|
| LIBRARY | VULNERABILITY ID | SEVERITY | INSTALLED VERSION | FIXED VERSION | TITLE |
|
||||||
|
+---------+------------------+----------+-------------------+---------------+--------------------------------+
|
||||||
|
| openssl | CVE-2019-1543 | MEDIUM | 1.1.1a-r1 | 1.1.1b-r1 | openssl: ChaCha20-Poly1305 |
|
||||||
|
| | | | | | with long nonces |
|
||||||
|
+---------+------------------+----------+-------------------+---------------+--------------------------------+
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
This option is useful for CI/CD. In the following example, the test will fail only when a critical vulnerability is found.
|
||||||
|
|
||||||
|
```
|
||||||
|
$ trivy image --exit-code 0 --severity MEDIUM,HIGH ruby:2.4.0
|
||||||
|
$ trivy image --exit-code 1 --severity CRITICAL ruby:2.4.0
|
||||||
|
```
|
||||||
|
|
||||||
|
## Exit on EOL
|
||||||
|
| Scanner | Supported |
|
||||||
|
|:----------------:|:---------:|
|
||||||
|
| Vulnerability | ✓ |
|
||||||
|
| Misconfiguration | |
|
||||||
|
| Secret | |
|
||||||
|
| License | |
|
||||||
|
|
||||||
|
Sometimes you may surprisingly get 0 vulnerabilities in an old image:
|
||||||
|
|
||||||
|
- Enabling `--ignore-unfixed` option while all packages have no fixed versions.
|
||||||
|
- Scanning a rather outdated OS (e.g. Ubuntu 10.04).
|
||||||
|
|
||||||
|
An OS at the end of service/life (EOL) usually gets into this situation, which is definitely full of vulnerabilities.
|
||||||
|
`--exit-on-eol` can fail scanning on EOL OS with a non-zero code.
|
||||||
|
This flag is available with the following targets.
|
||||||
|
|
||||||
|
- Container images (`trivy image`)
|
||||||
|
- Virtual machine images (`trivy vm`)
|
||||||
|
- SBOM (`trivy sbom`)
|
||||||
|
- Root filesystem (`trivy rootfs`)
|
||||||
|
|
||||||
|
```
|
||||||
|
$ trivy image --exit-on-eol 1 alpine:3.10
|
||||||
|
```
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Result</summary>
|
||||||
|
|
||||||
|
```
|
||||||
|
2023-03-01T11:07:15.455+0200 INFO Vulnerability scanning is enabled
|
||||||
|
...
|
||||||
|
2023-03-01T11:07:17.938+0200 WARN This OS version is no longer supported by the distribution: alpine 3.10.9
|
||||||
|
2023-03-01T11:07:17.938+0200 WARN The vulnerability detection may be insufficient because security updates are not provided
|
||||||
|
|
||||||
|
alpine:3.10 (alpine 3.10.9)
|
||||||
|
===========================
|
||||||
|
Total: 1 (UNKNOWN: 0, LOW: 0, MEDIUM: 0, HIGH: 0, CRITICAL: 1)
|
||||||
|
|
||||||
|
┌───────────┬────────────────┬──────────┬───────────────────┬───────────────┬─────────────────────────────────────────────────────────────┐
|
||||||
|
│ Library │ Vulnerability │ Severity │ Installed Version │ Fixed Version │ Title │
|
||||||
|
├───────────┼────────────────┼──────────┼───────────────────┼───────────────┼─────────────────────────────────────────────────────────────┤
|
||||||
|
│ apk-tools │ CVE-2021-36159 │ CRITICAL │ 2.10.6-r0 │ 2.10.7-r0 │ libfetch before 2021-07-26, as used in apk-tools, xbps, and │
|
||||||
|
│ │ │ │ │ │ other products, mishandles... │
|
||||||
|
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2021-36159 │
|
||||||
|
└───────────┴────────────────┴──────────┴───────────────────┴───────────────┴─────────────────────────────────────────────────────────────┘
|
||||||
|
2023-03-01T11:07:17.941+0200 ERROR Detected EOL OS: alpine 3.10.9
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
This option is useful for CI/CD.
|
||||||
|
The following example will fail when a critical vulnerability is found or the OS is EOSL:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ trivy image --exit-code 1 --exit-on-eol 1 --severity CRITICAL alpine:3.16.3
|
||||||
|
```
|
||||||
363
docs/docs/configuration/reporting.md
Normal file
@@ -0,0 +1,363 @@
|
|||||||
|
# Reporting
|
||||||
|
|
||||||
|
Trivy supports the following formats:
|
||||||
|
|
||||||
|
- Table
|
||||||
|
- JSON
|
||||||
|
- [SARIF](https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning)
|
||||||
|
- Template
|
||||||
|
- SBOM
|
||||||
|
|
||||||
|
## Table (Default)
|
||||||
|
|
||||||
|
| Scanner | Supported |
|
||||||
|
|:----------------:|:---------:|
|
||||||
|
| Vulnerability | ✓ |
|
||||||
|
| Misconfiguration | ✓ |
|
||||||
|
| Secret | ✓ |
|
||||||
|
| License | ✓ |
|
||||||
|
|
||||||
|
```
|
||||||
|
$ trivy image -f table golang:1.12-alpine
|
||||||
|
```
|
||||||
|
|
||||||
|
### Show origins of vulnerable dependencies
|
||||||
|
|
||||||
|
| Scanner | Supported |
|
||||||
|
|:----------------:|:---------:|
|
||||||
|
| Vulnerability | ✓ |
|
||||||
|
| Misconfiguration | |
|
||||||
|
| Secret | |
|
||||||
|
| License | |
|
||||||
|
|
||||||
|
!!! warning "EXPERIMENTAL"
|
||||||
|
This feature might change without preserving backwards compatibility.
|
||||||
|
|
||||||
|
Modern software development relies on the use of third-party libraries.
|
||||||
|
Third-party dependencies also depend on others so a list of dependencies can be represented as a dependency graph.
|
||||||
|
In some cases, vulnerable dependencies are not linked directly, and it requires analyses of the tree.
|
||||||
|
To make this task simpler Trivy can show a dependency origin tree with the `--dependency-tree` flag.
|
||||||
|
This flag is only available with the `--format table` flag.
|
||||||
|
|
||||||
|
The following packages/languages are currently supported:
|
||||||
|
|
||||||
|
- OS packages
|
||||||
|
- apk
|
||||||
|
- dpkg
|
||||||
|
- rpm
|
||||||
|
- Node.js
|
||||||
|
- npm: package-lock.json
|
||||||
|
- pnpm: pnpm-lock.yaml
|
||||||
|
- yarn: yarn.lock
|
||||||
|
- .NET
|
||||||
|
- NuGet: packages.lock.json
|
||||||
|
- Python
|
||||||
|
- Poetry: poetry.lock
|
||||||
|
- Ruby
|
||||||
|
- Bundler: Gemfile.lock
|
||||||
|
- Rust
|
||||||
|
- Binaries built with [cargo-auditable][cargo-auditable]
|
||||||
|
- Go
|
||||||
|
- Modules: go.mod
|
||||||
|
- PHP
|
||||||
|
- Composer
|
||||||
|
|
||||||
|
This tree is the reverse of the npm list command.
|
||||||
|
However, if you want to resolve a vulnerability in a particular indirect dependency, the reversed tree is useful to know where that dependency comes from and identify which package you actually need to update.
|
||||||
|
|
||||||
|
In table output, it looks like:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ trivy fs --severity HIGH,CRITICAL --dependency-tree /path/to/your_node_project
|
||||||
|
|
||||||
|
package-lock.json (npm)
|
||||||
|
=======================
|
||||||
|
Total: 2 (HIGH: 1, CRITICAL: 1)
|
||||||
|
|
||||||
|
┌──────────────────┬────────────────┬──────────┬───────────────────┬───────────────┬────────────────────────────────────────────────────────────┐
|
||||||
|
│ Library │ Vulnerability │ Severity │ Installed Version │ Fixed Version │ Title │
|
||||||
|
├──────────────────┼────────────────┼──────────┼───────────────────┼───────────────┼────────────────────────────────────────────────────────────┤
|
||||||
|
│ follow-redirects │ CVE-2022-0155 │ HIGH │ 1.14.6 │ 1.14.7 │ follow-redirects: Exposure of Private Personal Information │
|
||||||
|
│ │ │ │ │ │ to an Unauthorized Actor │
|
||||||
|
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2022-0155 │
|
||||||
|
├──────────────────┼────────────────┼──────────┼───────────────────┼───────────────┼────────────────────────────────────────────────────────────┤
|
||||||
|
│ glob-parent │ CVE-2020-28469 │ CRITICAL │ 3.1.0 │ 5.1.2 │ nodejs-glob-parent: Regular expression denial of service │
|
||||||
|
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2020-28469 │
|
||||||
|
└──────────────────┴────────────────┴──────────┴───────────────────┴───────────────┴────────────────────────────────────────────────────────────┘
|
||||||
|
|
||||||
|
Dependency Origin Tree (Reversed)
|
||||||
|
=================================
|
||||||
|
package-lock.json
|
||||||
|
├── follow-redirects@1.14.6, (HIGH: 1, CRITICAL: 0)
|
||||||
|
│ └── axios@0.21.4
|
||||||
|
└── glob-parent@3.1.0, (HIGH: 0, CRITICAL: 1)
|
||||||
|
└── chokidar@2.1.8
|
||||||
|
└── watchpack-chokidar2@2.0.1
|
||||||
|
└── watchpack@1.7.5
|
||||||
|
└── webpack@4.46.0
|
||||||
|
└── cra-append-sw@2.7.0
|
||||||
|
```
|
||||||
|
|
||||||
|
Vulnerable dependencies are shown in the top level of the tree.
|
||||||
|
Lower levels show how those vulnerabilities are introduced.
|
||||||
|
In the example above **axios@0.21.4** included in the project directly depends on the vulnerable **follow-redirects@1.14.6**.
|
||||||
|
Also, **glob-parent@3.1.0** with some vulnerabilities is included through chain of dependencies that is added by **cra-append-sw@2.7.0**.
|
||||||
|
|
||||||
|
Then, you can try to update **axios@0.21.4** and **cra-append-sw@2.7.0** to resolve vulnerabilities in **follow-redirects@1.14.6** and **glob-parent@3.1.0**.
|
||||||
|
|
||||||
|
## JSON
|
||||||
|
|
||||||
|
| Scanner | Supported |
|
||||||
|
|:----------------:|:---------:|
|
||||||
|
| Vulnerability | ✓ |
|
||||||
|
| Misconfiguration | ✓ |
|
||||||
|
| Secret | ✓ |
|
||||||
|
| License | ✓ |
|
||||||
|
|
||||||
|
```
|
||||||
|
$ trivy image -f json -o results.json golang:1.12-alpine
|
||||||
|
```
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Result</summary>
|
||||||
|
|
||||||
|
```
|
||||||
|
2019-05-16T01:46:31.777+0900 INFO Updating vulnerability database...
|
||||||
|
2019-05-16T01:47:03.007+0900 INFO Detecting Alpine vulnerabilities...
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>JSON</summary>
|
||||||
|
|
||||||
|
```
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"Target": "php-app/composer.lock",
|
||||||
|
"Vulnerabilities": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Target": "node-app/package-lock.json",
|
||||||
|
"Vulnerabilities": [
|
||||||
|
{
|
||||||
|
"VulnerabilityID": "CVE-2018-16487",
|
||||||
|
"PkgName": "lodash",
|
||||||
|
"InstalledVersion": "4.17.4",
|
||||||
|
"FixedVersion": "\u003e=4.17.11",
|
||||||
|
"Title": "lodash: Prototype pollution in utilities function",
|
||||||
|
"Description": "A prototype pollution vulnerability was found in lodash \u003c4.17.11 where the functions merge, mergeWith, and defaultsDeep can be tricked into adding or modifying properties of Object.prototype.",
|
||||||
|
"Severity": "HIGH",
|
||||||
|
"References": [
|
||||||
|
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-16487",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Target": "trivy-ci-test (alpine 3.7.1)",
|
||||||
|
"Vulnerabilities": [
|
||||||
|
{
|
||||||
|
"VulnerabilityID": "CVE-2018-16840",
|
||||||
|
"PkgName": "curl",
|
||||||
|
"InstalledVersion": "7.61.0-r0",
|
||||||
|
"FixedVersion": "7.61.1-r1",
|
||||||
|
"Title": "curl: Use-after-free when closing \"easy\" handle in Curl_close()",
|
||||||
|
"Description": "A heap use-after-free flaw was found in curl versions from 7.59.0 through 7.61.1 in the code related to closing an easy handle. ",
|
||||||
|
"Severity": "HIGH",
|
||||||
|
"References": [
|
||||||
|
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-16840",
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"VulnerabilityID": "CVE-2019-3822",
|
||||||
|
"PkgName": "curl",
|
||||||
|
"InstalledVersion": "7.61.0-r0",
|
||||||
|
"FixedVersion": "7.61.1-r2",
|
||||||
|
"Title": "curl: NTLMv2 type-3 header stack buffer overflow",
|
||||||
|
"Description": "libcurl versions from 7.36.0 to before 7.64.0 are vulnerable to a stack-based buffer overflow. ",
|
||||||
|
"Severity": "HIGH",
|
||||||
|
"References": [
|
||||||
|
"https://curl.haxx.se/docs/CVE-2019-3822.html",
|
||||||
|
"https://lists.apache.org/thread.html/8338a0f605bdbb3a6098bb76f666a95fc2b2f53f37fa1ecc89f1146f@%3Cdevnull.infra.apache.org%3E"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"VulnerabilityID": "CVE-2018-16839",
|
||||||
|
"PkgName": "curl",
|
||||||
|
"InstalledVersion": "7.61.0-r0",
|
||||||
|
"FixedVersion": "7.61.1-r1",
|
||||||
|
"Title": "curl: Integer overflow leading to heap-based buffer overflow in Curl_sasl_create_plain_message()",
|
||||||
|
"Description": "Curl versions 7.33.0 through 7.61.1 are vulnerable to a buffer overrun in the SASL authentication code that may lead to denial of service.",
|
||||||
|
"Severity": "HIGH",
|
||||||
|
"References": [
|
||||||
|
"https://github.com/curl/curl/commit/f3a24d7916b9173c69a3e0ee790102993833d6c5",
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"VulnerabilityID": "CVE-2018-19486",
|
||||||
|
"PkgName": "git",
|
||||||
|
"InstalledVersion": "2.15.2-r0",
|
||||||
|
"FixedVersion": "2.15.3-r0",
|
||||||
|
"Title": "git: Improper handling of PATH allows for commands to be executed from the current directory",
|
||||||
|
"Description": "Git before 2.19.2 on Linux and UNIX executes commands from the current working directory (as if '.' were at the end of $PATH) in certain cases involving the run_command() API and run-command.c, because there was a dangerous change from execvp to execv during 2017.",
|
||||||
|
"Severity": "HIGH",
|
||||||
|
"References": [
|
||||||
|
"https://usn.ubuntu.com/3829-1/",
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"VulnerabilityID": "CVE-2018-17456",
|
||||||
|
"PkgName": "git",
|
||||||
|
"InstalledVersion": "2.15.2-r0",
|
||||||
|
"FixedVersion": "2.15.3-r0",
|
||||||
|
"Title": "git: arbitrary code execution via .gitmodules",
|
||||||
|
"Description": "Git before 2.14.5, 2.15.x before 2.15.3, 2.16.x before 2.16.5, 2.17.x before 2.17.2, 2.18.x before 2.18.1, and 2.19.x before 2.19.1 allows remote code execution during processing of a recursive \"git clone\" of a superproject if a .gitmodules file has a URL field beginning with a '-' character.",
|
||||||
|
"Severity": "HIGH",
|
||||||
|
"References": [
|
||||||
|
"http://www.securitytracker.com/id/1041811",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Target": "python-app/Pipfile.lock",
|
||||||
|
"Vulnerabilities": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Target": "ruby-app/Gemfile.lock",
|
||||||
|
"Vulnerabilities": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Target": "rust-app/Cargo.lock",
|
||||||
|
"Vulnerabilities": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
`VulnerabilityID`, `PkgName`, `InstalledVersion`, and `Severity` in `Vulnerabilities` are always filled with values, but other fields might be empty.
|
||||||
|
|
||||||
|
## SARIF
|
||||||
|
| Scanner | Supported |
|
||||||
|
|:----------------:|:---------:|
|
||||||
|
| Vulnerability | ✓ |
|
||||||
|
| Misconfiguration | ✓ |
|
||||||
|
| Secret | ✓ |
|
||||||
|
| License | |
|
||||||
|
|
||||||
|
[SARIF][sarif] can be generated with the `--format sarif` flag.
|
||||||
|
|
||||||
|
```
|
||||||
|
$ trivy image --format sarif -o report.sarif golang:1.12-alpine
|
||||||
|
```
|
||||||
|
|
||||||
|
This SARIF file can be uploaded to GitHub code scanning results, and there is a [Trivy GitHub Action][action] for automating this process.
|
||||||
|
|
||||||
|
## Template
|
||||||
|
|
||||||
|
| Scanner | Supported |
|
||||||
|
|:----------------:|:---------:|
|
||||||
|
| Vulnerability | ✓ |
|
||||||
|
| Misconfiguration | ✓ |
|
||||||
|
| Secret | ✓ |
|
||||||
|
| License | ✓ |
|
||||||
|
|
||||||
|
### Custom Template
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
|
```
|
||||||
|
$ trivy image --format template --template "{{ range . }} {{ .Target }} {{ end }}" golang:1.12-alpine
|
||||||
|
```
|
||||||
|
{% endraw %}
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Result</summary>
|
||||||
|
|
||||||
|
```
|
||||||
|
2020-01-02T18:02:32.856+0100 INFO Detecting Alpine vulnerabilities...
|
||||||
|
golang:1.12-alpine (alpine 3.10.2)
|
||||||
|
```
|
||||||
|
</details>
|
||||||
|
|
||||||
|
You can compute different figures within the template using [sprig][sprig] functions.
|
||||||
|
As an example you can summarize the different classes of issues:
|
||||||
|
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
|
```
|
||||||
|
$ trivy image --format template --template '{{- $critical := 0 }}{{- $high := 0 }}{{- range . }}{{- range .Vulnerabilities }}{{- if eq .Severity "CRITICAL" }}{{- $critical = add $critical 1 }}{{- end }}{{- if eq .Severity "HIGH" }}{{- $high = add $high 1 }}{{- end }}{{- end }}{{- end }}Critical: {{ $critical }}, High: {{ $high }}' golang:1.12-alpine
|
||||||
|
```
|
||||||
|
{% endraw %}
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Result</summary>
|
||||||
|
|
||||||
|
```
|
||||||
|
Critical: 0, High: 2
|
||||||
|
```
|
||||||
|
</details>
|
||||||
|
|
||||||
|
For other features of sprig, see the official [sprig][sprig] documentation.
|
||||||
|
|
||||||
|
### Load templates from a file
|
||||||
|
You can load templates from a file prefixing the template path with an @.
|
||||||
|
|
||||||
|
```
|
||||||
|
$ trivy image --format template --template "@/path/to/template" golang:1.12-alpine
|
||||||
|
```
|
||||||
|
|
||||||
|
### Default Templates
|
||||||
|
|
||||||
|
If Trivy is installed using rpm then default templates can be found at `/usr/local/share/trivy/templates`.
|
||||||
|
|
||||||
|
#### JUnit
|
||||||
|
| Scanner | Supported |
|
||||||
|
|:----------------:|:---------:|
|
||||||
|
| Vulnerability | ✓ |
|
||||||
|
| Misconfiguration | ✓ |
|
||||||
|
| Secret | |
|
||||||
|
| License | |
|
||||||
|
|
||||||
|
In the following example using the template `junit.tpl` XML can be generated.
|
||||||
|
```
|
||||||
|
$ trivy image --format template --template "@contrib/junit.tpl" -o junit-report.xml golang:1.12-alpine
|
||||||
|
```
|
||||||
|
|
||||||
|
#### ASFF
|
||||||
|
| Scanner | Supported |
|
||||||
|
|:----------------:|:---------:|
|
||||||
|
| Vulnerability | ✓ |
|
||||||
|
| Misconfiguration | ✓ |
|
||||||
|
| Secret | ✓ |
|
||||||
|
| License | |
|
||||||
|
|
||||||
|
Trivy also supports an [ASFF template for reporting findings to AWS Security Hub][asff]
|
||||||
|
|
||||||
|
#### HTML
|
||||||
|
| Scanner | Supported |
|
||||||
|
|:----------------:|:---------:|
|
||||||
|
| Vulnerability | ✓ |
|
||||||
|
| Misconfiguration | ✓ |
|
||||||
|
| Secret | |
|
||||||
|
| License | |
|
||||||
|
|
||||||
|
```
|
||||||
|
$ trivy image --format template --template "@contrib/html.tpl" -o report.html golang:1.12-alpine
|
||||||
|
```
|
||||||
|
|
||||||
|
The following example shows use of default HTML template when Trivy is installed using rpm.
|
||||||
|
|
||||||
|
```
|
||||||
|
$ trivy image --format template --template "@/usr/local/share/trivy/templates/html.tpl" -o report.html golang:1.12-alpine
|
||||||
|
```
|
||||||
|
|
||||||
|
## SBOM
|
||||||
|
See [here](../supply-chain/sbom.md) for details.
|
||||||
|
|
||||||
|
[cargo-auditable]: https://github.com/rust-secure-code/cargo-auditable/
|
||||||
|
[action]: https://github.com/aquasecurity/trivy-action
|
||||||
|
[asff]: ../../tutorials/integrations/aws-security-hub.md
|
||||||
|
[sarif]: https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/managing-results-from-code-scanning
|
||||||
|
[sprig]: http://masterminds.github.io/sprig/
|
||||||
@@ -1,93 +1,5 @@
|
|||||||
# Docs
|
# Docs
|
||||||
|
|
||||||
Trivy detects two types of security issues:
|
In this section you can find the complete reference documentation for all of the different features and settings that Trivy has to offer.
|
||||||
|
|
||||||
- [Vulnerabilities][vuln]
|
👈 Please use the side-navigation on the left in order to browse the different topics.
|
||||||
- [Misconfigurations][misconf]
|
|
||||||
|
|
||||||
Trivy can scan four different artifacts:
|
|
||||||
|
|
||||||
- [Container Images][container]
|
|
||||||
- [Filesystem][filesystem] and [Rootfs][rootfs]
|
|
||||||
- [Git Repositories][repo]
|
|
||||||
- [Kubernetes][kubernetes]
|
|
||||||
|
|
||||||
Trivy can be run in two different modes:
|
|
||||||
|
|
||||||
- [Standalone][standalone]
|
|
||||||
- [Client/Server][client-server]
|
|
||||||
|
|
||||||
Trivy can be run as a Kubernetes Operator:
|
|
||||||
|
|
||||||
- [Kubernetes Operator][kubernetesoperator]
|
|
||||||
|
|
||||||
It is designed to be used in CI. Before pushing to a container registry or deploying your application, you can scan your local container image and other artifacts easily.
|
|
||||||
See [Integrations][integrations] for details.
|
|
||||||
|
|
||||||
## Features
|
|
||||||
|
|
||||||
- Comprehensive vulnerability detection
|
|
||||||
- [OS packages][os] (Alpine, Red Hat Universal Base Image, Red Hat Enterprise Linux, CentOS, AlmaLinux, Rocky Linux, CBL-Mariner, Oracle Linux, Debian, Ubuntu, Amazon Linux, openSUSE Leap, SUSE Enterprise Linux, Photon OS and Distroless)
|
|
||||||
- [**Language-specific packages**][lang] (Bundler, Composer, Pipenv, Poetry, npm, yarn, Cargo, NuGet, Maven, and Go)
|
|
||||||
- Detect IaC misconfigurations
|
|
||||||
- A wide variety of [built-in policies][builtin] are provided **out of the box**:
|
|
||||||
- Kubernetes
|
|
||||||
- Docker
|
|
||||||
- Terraform
|
|
||||||
- more coming soon
|
|
||||||
- Support custom policies
|
|
||||||
- Simple
|
|
||||||
- Specify only an image name, a directory containing IaC configs, or an artifact name
|
|
||||||
- See [Quick Start][quickstart]
|
|
||||||
- Fast
|
|
||||||
- The first scan will finish within 10 seconds (depending on your network). Consequent scans will finish in single seconds.
|
|
||||||
- Unlike other scanners that take long to fetch vulnerability information (~10 minutes) on the first run, and encourage you to maintain a durable vulnerability database, Trivy is stateless and requires no maintenance or preparation.
|
|
||||||
- Easy installation
|
|
||||||
- `apt-get install`, `yum install` and `brew install` is possible (See [Installation][installation])
|
|
||||||
- **No pre-requisites** such as installation of DB, libraries, etc.
|
|
||||||
- High accuracy
|
|
||||||
- **Especially Alpine Linux and RHEL/CentOS**
|
|
||||||
- Other OSes are also high
|
|
||||||
- DevSecOps
|
|
||||||
- **Suitable for CI** such as Travis CI, CircleCI, Jenkins, GitLab CI, etc.
|
|
||||||
- See [CI Example][integrations]
|
|
||||||
- Support multiple formats
|
|
||||||
- container image
|
|
||||||
- A local image in Docker Engine which is running as a daemon
|
|
||||||
- A local image in [Podman][podman] (>=2.0) which is exposing a socket
|
|
||||||
- A remote image in Docker Registry such as Docker Hub, ECR, GCR and ACR
|
|
||||||
- A tar archive stored in the `docker save` / `podman save` formatted file
|
|
||||||
- An image directory compliant with [OCI Image Format][oci]
|
|
||||||
- local filesystem and rootfs
|
|
||||||
- remote git repository
|
|
||||||
- [SBOM][sbom] (Software Bill of Materials) support
|
|
||||||
- CycloneDX
|
|
||||||
- SPDX
|
|
||||||
|
|
||||||
Please see [LICENSE][license] for Trivy licensing information.
|
|
||||||
|
|
||||||
[installation]: ../getting-started/installation.md
|
|
||||||
[vuln]: ../docs/vulnerability/scanning/index.md
|
|
||||||
[misconf]: ../docs/misconfiguration/scanning.md
|
|
||||||
[kubernetesoperator]: ../docs/kubernetes/operator/index.md
|
|
||||||
[container]: ../docs/vulnerability/scanning/image.md
|
|
||||||
[rootfs]: ../docs/vulnerability/scanning/rootfs.md
|
|
||||||
[filesystem]: ../docs/vulnerability/scanning/filesystem.md
|
|
||||||
[repo]: ../docs/vulnerability/scanning/git-repository.md
|
|
||||||
[kubernetes]: ../docs/kubernetes/cli/scanning.md
|
|
||||||
|
|
||||||
[standalone]: ../docs/references/modes/standalone.md
|
|
||||||
[client-server]: ../docs/references/modes/client-server.md
|
|
||||||
[integrations]: ../docs/integrations/index.md
|
|
||||||
|
|
||||||
[os]: ../docs/vulnerability/detection/os.md
|
|
||||||
[lang]: ../docs/vulnerability/detection/language.md
|
|
||||||
|
|
||||||
[builtin]: ../docs/misconfiguration/policy/builtin.md
|
|
||||||
[quickstart]: ../getting-started/quickstart.md
|
|
||||||
[podman]: ../docs/advanced/container/podman.md
|
|
||||||
|
|
||||||
[sbom]: ../docs/sbom/index.md
|
|
||||||
|
|
||||||
[oci]: https://github.com/opencontainers/image-spec
|
|
||||||
[license]: https://github.com/aquasecurity/trivy/blob/main/LICENSE
|
|
||||||
|
|||||||
@@ -1,29 +0,0 @@
|
|||||||
# AWS Security Hub
|
|
||||||
|
|
||||||
## Upload findings to Security Hub
|
|
||||||
|
|
||||||
In the following example using the template `asff.tpl`, [ASFF](https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-findings-format.html) file can be generated.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ AWS_REGION=us-west-1 AWS_ACCOUNT_ID=123456789012 trivy image --format template --template "@contrib/asff.tpl" -o report.asff golang:1.12-alpine
|
|
||||||
```
|
|
||||||
|
|
||||||
ASFF template needs AWS_REGION and AWS_ACCOUNT_ID from environment variables.
|
|
||||||
|
|
||||||
Then, you can upload it with AWS CLI.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ aws securityhub batch-import-findings --findings file://report.asff
|
|
||||||
```
|
|
||||||
|
|
||||||
## Customize
|
|
||||||
You can customize [asff.tpl](https://github.com/aquasecurity/trivy/blob/main/contrib/asff.tpl)
|
|
||||||
|
|
||||||
```
|
|
||||||
$ export AWS_REGION=us-west-1
|
|
||||||
$ export AWS_ACCOUNT_ID=123456789012
|
|
||||||
$ trivy image --format template --template "@your-asff.tpl" -o report.asff golang:1.12-alpine
|
|
||||||
```
|
|
||||||
|
|
||||||
## Reference
|
|
||||||
https://aws.amazon.com/blogs/security/how-to-build-ci-cd-pipeline-container-vulnerability-scanning-trivy-and-aws-security-hub/
|
|
||||||
@@ -1,200 +0,0 @@
|
|||||||
# Kubernetes
|
|
||||||
|
|
||||||
!!! warning "EXPERIMENTAL"
|
|
||||||
|
|
||||||
This feature might change without preserving backwards compatibility.
|
|
||||||
|
|
||||||
Scan your Kubernetes cluster for both Vulnerabilities and Misconfigurations.
|
|
||||||
|
|
||||||
Trivy uses your local kubectl configuration to access the API server to list artifacts.
|
|
||||||
|
|
||||||
Scan a full cluster and generate a simple summary report:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ trivy k8s --report=summary
|
|
||||||
```
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
The summary report is the default. To get all of the detail the output contains, use `--report all`.
|
|
||||||
|
|
||||||
Filter by severity:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ trivy k8s --severity=CRITICAL --report=all
|
|
||||||
```
|
|
||||||
|
|
||||||
Scan a specific namespace:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ trivy k8s -n kube-system --report=summary
|
|
||||||
```
|
|
||||||
|
|
||||||
Scan a specific resource and get all the output:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ trivy k8s deployment/appname
|
|
||||||
```
|
|
||||||
|
|
||||||
The supported formats are `table`, which is the default, and `json`.
|
|
||||||
To get a JSON output on a full cluster scan:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ trivy k8s --format json -o results.json
|
|
||||||
```
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>Result</summary>
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"ClusterName": "minikube",
|
|
||||||
"Vulnerabilities": [
|
|
||||||
{
|
|
||||||
"Namespace": "default",
|
|
||||||
"Kind": "Deployment",
|
|
||||||
"Name": "app",
|
|
||||||
"Results": [
|
|
||||||
{
|
|
||||||
"Target": "ubuntu:latest (ubuntu 22.04)",
|
|
||||||
"Class": "os-pkgs",
|
|
||||||
"Type": "ubuntu",
|
|
||||||
"Vulnerabilities": [
|
|
||||||
{
|
|
||||||
"VulnerabilityID": "CVE-2016-2781",
|
|
||||||
"PkgName": "coreutils",
|
|
||||||
"InstalledVersion": "8.32-4.1ubuntu1",
|
|
||||||
"Layer": {
|
|
||||||
"Digest": "sha256:125a6e411906fe6b0aaa50fc9d600bf6ff9bb11a8651727ce1ed482dc271c24c",
|
|
||||||
"DiffID": "sha256:e59fc94956120a6c7629f085027578e6357b48061d45714107e79f04a81a6f0c"
|
|
||||||
},
|
|
||||||
"SeveritySource": "ubuntu",
|
|
||||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2016-2781",
|
|
||||||
"DataSource": {
|
|
||||||
"ID": "ubuntu",
|
|
||||||
"Name": "Ubuntu CVE Tracker",
|
|
||||||
"URL": "https://git.launchpad.net/ubuntu-cve-tracker"
|
|
||||||
},
|
|
||||||
"Title": "coreutils: Non-privileged session can escape to the parent session in chroot",
|
|
||||||
"Description": "chroot in GNU coreutils, when used with --userspec, allows local users to escape to the parent session via a crafted TIOCSTI ioctl call, which pushes characters to the terminal's input buffer.",
|
|
||||||
"Severity": "LOW",
|
|
||||||
"CweIDs": [
|
|
||||||
"CWE-20"
|
|
||||||
],
|
|
||||||
"VendorSeverity": {
|
|
||||||
"cbl-mariner": 2,
|
|
||||||
"nvd": 2,
|
|
||||||
"redhat": 2,
|
|
||||||
"ubuntu": 1
|
|
||||||
},
|
|
||||||
"CVSS": {
|
|
||||||
"nvd": {
|
|
||||||
"V2Vector": "AV:L/AC:L/Au:N/C:N/I:P/A:N",
|
|
||||||
"V3Vector": "CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:N",
|
|
||||||
"V2Score": 2.1,
|
|
||||||
"V3Score": 6.5
|
|
||||||
},
|
|
||||||
"redhat": {
|
|
||||||
"V2Vector": "AV:L/AC:H/Au:N/C:C/I:C/A:C",
|
|
||||||
"V3Vector": "CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H",
|
|
||||||
"V2Score": 6.2,
|
|
||||||
"V3Score": 8.6
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"References": [
|
|
||||||
"http://seclists.org/oss-sec/2016/q1/452",
|
|
||||||
"http://www.openwall.com/lists/oss-security/2016/02/28/2",
|
|
||||||
"http://www.openwall.com/lists/oss-security/2016/02/28/3",
|
|
||||||
"https://access.redhat.com/security/cve/CVE-2016-2781",
|
|
||||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-2781",
|
|
||||||
"https://lists.apache.org/thread.html/rf9fa47ab66495c78bb4120b0754dd9531ca2ff0430f6685ac9b07772@%3Cdev.mina.apache.org%3E",
|
|
||||||
"https://lore.kernel.org/patchwork/patch/793178/",
|
|
||||||
"https://nvd.nist.gov/vuln/detail/CVE-2016-2781"
|
|
||||||
],
|
|
||||||
"PublishedDate": "2017-02-07T15:59:00Z",
|
|
||||||
"LastModifiedDate": "2021-02-25T17:15:00Z"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"Misconfigurations": [
|
|
||||||
{
|
|
||||||
"Namespace": "default",
|
|
||||||
"Kind": "Deployment",
|
|
||||||
"Name": "app",
|
|
||||||
"Results": [
|
|
||||||
{
|
|
||||||
"Target": "Deployment/app",
|
|
||||||
"Class": "config",
|
|
||||||
"Type": "kubernetes",
|
|
||||||
"MisconfSummary": {
|
|
||||||
"Successes": 20,
|
|
||||||
"Failures": 19,
|
|
||||||
"Exceptions": 0
|
|
||||||
},
|
|
||||||
"Misconfigurations": [
|
|
||||||
{
|
|
||||||
"Type": "Kubernetes Security Check",
|
|
||||||
"ID": "KSV001",
|
|
||||||
"Title": "Process can elevate its own privileges",
|
|
||||||
"Description": "A program inside the container can elevate its own privileges and run as root, which might give the program control over the container and node.",
|
|
||||||
"Message": "Container 'app' of Deployment 'app' should set 'securityContext.allowPrivilegeEscalation' to false",
|
|
||||||
"Namespace": "builtin.kubernetes.KSV001",
|
|
||||||
"Query": "data.builtin.kubernetes.KSV001.deny",
|
|
||||||
"Resolution": "Set 'set containers[].securityContext.allowPrivilegeEscalation' to 'false'.",
|
|
||||||
"Severity": "MEDIUM",
|
|
||||||
"PrimaryURL": "https://avd.aquasec.com/misconfig/ksv001",
|
|
||||||
"References": [
|
|
||||||
"https://kubernetes.io/docs/concepts/security/pod-security-standards/#restricted",
|
|
||||||
"https://avd.aquasec.com/misconfig/ksv001"
|
|
||||||
],
|
|
||||||
"Status": "FAIL",
|
|
||||||
"Layer": {},
|
|
||||||
"IacMetadata": {
|
|
||||||
"Provider": "Kubernetes",
|
|
||||||
"Service": "general",
|
|
||||||
"StartLine": 121,
|
|
||||||
"EndLine": 133
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Type": "Kubernetes Security Check",
|
|
||||||
"ID": "KSV003",
|
|
||||||
"Title": "Default capabilities not dropped",
|
|
||||||
"Description": "The container should drop all default capabilities and add only those that are needed for its execution.",
|
|
||||||
"Message": "Container 'app' of Deployment 'app' should add 'ALL' to 'securityContext.capabilities.drop'",
|
|
||||||
"Namespace": "builtin.kubernetes.KSV003",
|
|
||||||
"Query": "data.builtin.kubernetes.KSV003.deny",
|
|
||||||
"Resolution": "Add 'ALL' to containers[].securityContext.capabilities.drop.",
|
|
||||||
"Severity": "LOW",
|
|
||||||
"PrimaryURL": "https://avd.aquasec.com/misconfig/ksv003",
|
|
||||||
"References": [
|
|
||||||
"https://kubesec.io/basics/containers-securitycontext-capabilities-drop-index-all/",
|
|
||||||
"https://avd.aquasec.com/misconfig/ksv003"
|
|
||||||
],
|
|
||||||
"Status": "FAIL",
|
|
||||||
"Layer": {},
|
|
||||||
"IacMetadata": {
|
|
||||||
"Provider": "Kubernetes",
|
|
||||||
"Service": "general",
|
|
||||||
"StartLine": 121,
|
|
||||||
"EndLine": 133
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Namespace": "default",
|
|
||||||
"Kind": "ConfigMap",
|
|
||||||
"Name": "kube-root-ca.crt"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
</details>
|
|
||||||
@@ -1,108 +0,0 @@
|
|||||||
# Built-in Configuration Audit Policies
|
|
||||||
|
|
||||||
The following sections list built-in configuration audit policies installed with trivy-operator. They are stored in the
|
|
||||||
`trivy-operator-policies-config` ConfigMap created in the installation namespace (e.g. `trivy-system`). You can modify
|
|
||||||
them or add a new policy. For example, follow the [Writing Custom Configuration Audit Policies] tutorial to add a custom
|
|
||||||
policy that checks for recommended Kubernetes labels on any resource kind.
|
|
||||||
|
|
||||||
## General
|
|
||||||
|
|
||||||
| NAME | DESCRIPTION | KINDS |
|
|
||||||
|--------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|
|
|
||||||
| [CPU not limited] | Enforcing CPU limits prevents DoS via resource exhaustion. | Workload |
|
|
||||||
| [CPU requests not specified] | When containers have resource requests specified, the scheduler can make better decisions about which nodes to place pods on, and how to deal with resource contention. | Workload |
|
|
||||||
| [SYS_ADMIN capability added] | SYS_ADMIN gives the processes running inside the container privileges that are equivalent to root. | Workload |
|
|
||||||
| [Default capabilities not dropped] | The container should drop all default capabilities and add only those that are needed for its execution. | Workload |
|
|
||||||
| [Root file system is not read-only] | An immutable root file system prevents applications from writing to their local disk. This can limit intrusions, as attackers will not be able to tamper with the file system or write foreign executables to disk. | Workload |
|
|
||||||
| [Memory not limited] | Enforcing memory limits prevents DoS via resource exhaustion. | Workload |
|
|
||||||
| [Memory requests not specified] | When containers have memory requests specified, the scheduler can make better decisions about which nodes to place pods on, and how to deal with resource contention. | Workload |
|
|
||||||
| [hostPath volume mounted with docker.sock] | Mounting docker.sock from the host can give the container full root access to the host. | Workload |
|
|
||||||
| [Runs with low group ID] | Force the container to run with group ID > 10000 to avoid conflicts with the host’s user table. | Workload |
|
|
||||||
| [Runs with low user ID] | Force the container to run with user ID > 10000 to avoid conflicts with the host’s user table. | Workload |
|
|
||||||
| [Tiller Is Deployed] | Check if Helm Tiller component is deployed. | Workload |
|
|
||||||
| [Image tag ':latest' used] | It is best to avoid using the ':latest' image tag when deploying containers in production. Doing so makes it hard to track which version of the image is running, and hard to roll back the version. | Workload |
|
|
||||||
|
|
||||||
## Advanced
|
|
||||||
|
|
||||||
| NAME | DESCRIPTION | KINDS |
|
|
||||||
|----------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------|---------------|
|
|
||||||
| [Unused capabilities should be dropped (drop any)] | Security best practices require containers to run with minimal required capabilities. | Workload |
|
|
||||||
| [hostAliases is set] | Managing /etc/hosts aliases can prevent the container engine from modifying the file after a pod’s containers have already been started. | Workload |
|
|
||||||
| [User Pods should not be placed in kube-system namespace] | ensure that User pods are not placed in kube-system namespace | Workload |
|
|
||||||
| [Protecting Pod service account tokens] | ensure that Pod specifications disable the secret token being mounted by setting automountServiceAccountToken: false | Workload |
|
|
||||||
| [Selector usage in network policies] | ensure that network policies selectors are applied to pods or namespaces to restricted ingress and egress traffic within the pod network | NetworkPolicy |
|
|
||||||
| [limit range usage] | ensure limit range policy has configure in order to limit resource usage for namespaces or nodes | LimitRange |
|
|
||||||
| [resource quota usage] | ensure resource quota policy has configure in order to limit aggregate resource usage within namespace | ResourceQuota |
|
|
||||||
| [All container images must start with the *.azurecr.io domain] | Containers should only use images from trusted registries. | Workload |
|
|
||||||
| [All container images must start with a GCR domain] | Containers should only use images from trusted GCR registries. | Workload |
|
|
||||||
|
|
||||||
## Pod Security Standard
|
|
||||||
|
|
||||||
### Baseline
|
|
||||||
|
|
||||||
| NAME | DESCRIPTION | KINDS |
|
|
||||||
|------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|
|
|
||||||
| [Access to host IPC namespace] | Sharing the host’s IPC namespace allows container processes to communicate with processes on the host. | Workload |
|
|
||||||
| [Access to host network] | Sharing the host’s network namespace permits processes in the pod to communicate with processes bound to the host’s loopback adapter. | Workload |
|
|
||||||
| [Access to host PID] | Sharing the host’s PID namespace allows visibility on host processes, potentially leaking information such as environment variables and configuration. | Workload |
|
|
||||||
| [Privileged container] | Privileged containers share namespaces with the host system and do not offer any security. They should be used exclusively for system containers that require high privileges. | Workload |
|
|
||||||
| [Non-default capabilities added] | Adding NET_RAW or capabilities beyond the default set must be disallowed. | Workload |
|
|
||||||
| [hostPath volumes mounted] | HostPath volumes must be forbidden. | Workload |
|
|
||||||
| [Access to host ports] | HostPorts should be disallowed, or at minimum restricted to a known list. | Workload |
|
|
||||||
| [Default AppArmor profile not set] | A program inside the container can bypass AppArmor protection policies. | Workload |
|
|
||||||
| [SELinux custom options set] | Setting a custom SELinux user or role option should be forbidden. | Workload |
|
|
||||||
| [Non-default /proc masks set] | The default /proc masks are set up to reduce attack surface, and should be required. | Workload |
|
|
||||||
| [Unsafe sysctl options set] | Sysctls can disable security mechanisms or affect all containers on a host, and should be disallowed except for an allowed 'safe' subset. A sysctl is considered safe if it is namespaced in the container or the Pod, and it is isolated from other Pods or processes on the same Node. | Workload |
|
|
||||||
|
|
||||||
### Restricted
|
|
||||||
|
|
||||||
| NAME | DESCRIPTION | KINDS |
|
|
||||||
|-------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|----------|
|
|
||||||
| [Non-ephemeral volume types used] | In addition to restricting HostPath volumes, usage of non-ephemeral volume types should be limited to those defined through PersistentVolumes. | Workload |
|
|
||||||
| [Process can elevate its own privileges] | A program inside the container can elevate its own privileges and run as root, which might give the program control over the container and node. | Workload |
|
|
||||||
| [Runs as root user] | 'runAsNonRoot' forces the running image to run as a non-root user to ensure least privileges. | Workload |
|
|
||||||
| [A root primary or supplementary GID set] | Containers should be forbidden from running with a root primary or supplementary GID. | Workload |
|
|
||||||
| [Default Seccomp profile not set] | The RuntimeDefault seccomp profile must be required, or allow specific additional profiles. | Workload |
|
|
||||||
|
|
||||||
[Writing Custom Configuration Audit Policies]: ./../tutorials/writing-custom-configuration-audit-policies.md
|
|
||||||
|
|
||||||
[CPU not limited]: https://avd.aquasec.com/misconfig/kubernetes/ksv011/
|
|
||||||
[CPU requests not specified]: https://avd.aquasec.com/misconfig/kubernetes/ksv015/
|
|
||||||
[SYS_ADMIN capability added]: https://avd.aquasec.com/misconfig/kubernetes/ksv005/
|
|
||||||
[Default capabilities not dropped]: https://avd.aquasec.com/misconfig/kubernetes/ksv003/
|
|
||||||
[Root file system is not read-only]: https://avd.aquasec.com/misconfig/kubernetes/ksv014/
|
|
||||||
[Memory not limited]: https://avd.aquasec.com/misconfig/kubernetes/ksv018/
|
|
||||||
[Memory requests not specified]: https://avd.aquasec.com/misconfig/kubernetes/ksv016/
|
|
||||||
[hostPath volume mounted with docker.sock]: https://avd.aquasec.com/misconfig/kubernetes/ksv006/
|
|
||||||
[Runs with low group ID]: https://avd.aquasec.com/misconfig/kubernetes/ksv021/
|
|
||||||
[Runs with low user ID]: https://avd.aquasec.com/misconfig/kubernetes/ksv020/
|
|
||||||
[Tiller Is Deployed]: https://avd.aquasec.com/misconfig/kubernetes/ksv102/
|
|
||||||
[Image tag ':latest' used]: https://avd.aquasec.com/misconfig/kubernetes/ksv013/
|
|
||||||
|
|
||||||
[Unused capabilities should be dropped (drop any)]: https://avd.aquasec.com/misconfig/kubernetes/ksv004/
|
|
||||||
[hostAliases is set]: https://avd.aquasec.com/misconfig/kubernetes/ksv007/
|
|
||||||
[User Pods should not be placed in kube-system namespace]: https://avd.aquasec.com/misconfig/kubernetes/ksv037/
|
|
||||||
[Protecting Pod service account tokens]: https://avd.aquasec.com/misconfig/kubernetes/ksv036/
|
|
||||||
[Selector usage in network policies]: https://avd.aquasec.com/misconfig/kubernetes/ksv038/
|
|
||||||
[limit range usage]: https://avd.aquasec.com/misconfig/kubernetes/ksv039/
|
|
||||||
[resource quota usage]: https://avd.aquasec.com/misconfig/kubernetes/ksv040/
|
|
||||||
[All container images must start with the *.azurecr.io domain]: https://avd.aquasec.com/misconfig/kubernetes/ksv032/
|
|
||||||
[All container images must start with a GCR domain]: https://avd.aquasec.com/misconfig/kubernetes/ksv033/
|
|
||||||
|
|
||||||
[Access to host IPC namespace]: https://avd.aquasec.com/misconfig/kubernetes/ksv008/
|
|
||||||
[Access to host network]: https://avd.aquasec.com/misconfig/kubernetes/ksv009/
|
|
||||||
[Access to host PID]: https://avd.aquasec.com/misconfig/kubernetes/ksv010/
|
|
||||||
[Privileged container]: https://avd.aquasec.com/misconfig/kubernetes/ksv017/
|
|
||||||
[Non-default capabilities added]: https://avd.aquasec.com/misconfig/kubernetes/ksv022/
|
|
||||||
[hostPath volumes mounted]: https://avd.aquasec.com/misconfig/kubernetes/ksv023/
|
|
||||||
[Access to host ports]: https://avd.aquasec.com/misconfig/kubernetes/ksv024/
|
|
||||||
[Default AppArmor profile not set]: https://avd.aquasec.com/misconfig/kubernetes/ksv002/
|
|
||||||
[SELinux custom options set]: https://avd.aquasec.com/misconfig/kubernetes/ksv025/
|
|
||||||
[Non-default /proc masks set]: https://avd.aquasec.com/misconfig/kubernetes/ksv027/
|
|
||||||
[Unsafe sysctl options set]: https://avd.aquasec.com/misconfig/kubernetes/ksv026/
|
|
||||||
|
|
||||||
[Non-ephemeral volume types used]: https://avd.aquasec.com/misconfig/kubernetes/ksv028/
|
|
||||||
[Process can elevate its own privileges]: https://avd.aquasec.com/misconfig/kubernetes/ksv001/
|
|
||||||
[Runs as root user]: https://avd.aquasec.com/misconfig/kubernetes/ksv012/
|
|
||||||
[A root primary or supplementary GID set]: https://avd.aquasec.com/misconfig/kubernetes/ksv029/
|
|
||||||
[Default Seccomp profile not set]: https://avd.aquasec.com/misconfig/kubernetes/ksv030/
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# Configuration Auditing
|
|
||||||
|
|
||||||
As your organization deploys containerized workloads in Kubernetes environments, you will be faced with many
|
|
||||||
configuration choices related to images, containers, control plane, and data plane. Setting these configurations
|
|
||||||
improperly creates a high-impact security and compliance risk. DevOps, and platform owners need the ability to
|
|
||||||
continuously assess build artifacts, workloads, and infrastructure against configuration hardening standards to
|
|
||||||
remediate any violations.
|
|
||||||
|
|
||||||
trivy-operator configuration audit capabilities are purpose-built for Kubernetes environments. In particular, trivy
|
|
||||||
Operator continuously checks images, workloads, and Kubernetes infrastructure components against common configurations
|
|
||||||
security standards and generates detailed assessment reports, which are then stored in the default Kubernetes database.
|
|
||||||
|
|
||||||
Kubernetes applications and other core configuration objects, such as Ingress, NetworkPolicy and ResourceQuota resources, are evaluated against [Built-in Policies].
|
|
||||||
Additionally, application and infrastructure owners can integrate these reports into incident response workflows for
|
|
||||||
active remediation.
|
|
||||||
|
|
||||||
[Built-in Policies]: ./built-in-policies.md
|
|
||||||
|
|
||||||
@@ -1,100 +0,0 @@
|
|||||||
# Configuration
|
|
||||||
|
|
||||||
You can configure Trivy-Operator to control it's behavior and adapt it to your needs. Aspects of the operator machinery are configured using environment variables on the operator Pod, while aspects of the scanning behavior are controlled by ConfigMaps and Secrets.
|
|
||||||
|
|
||||||
# Operator Configuration
|
|
||||||
|
|
||||||
| NAME| DEFAULT| DESCRIPTION|
|
|
||||||
|---|---|---|
|
|
||||||
| `OPERATOR_NAMESPACE`| N/A| See [Install modes](#install-modes)|
|
|
||||||
| `OPERATOR_TARGET_NAMESPACES`| N/A| See [Install modes](#install-modes)|
|
|
||||||
| `OPERATOR_EXCLUDE_NAMESPACES`| N/A| A comma separated list of namespaces (or glob patterns) to be excluded from scanning in all namespaces [Install mode](#install-modes).|
|
|
||||||
| `OPERATOR_SERVICE_ACCOUNT`| `trivy-operator`| The name of the service account assigned to the operator's pod|
|
|
||||||
| `OPERATOR_LOG_DEV_MODE`| `false`| The flag to use (or not use) development mode (more human-readable output, extra stack traces and logging information, etc).|
|
|
||||||
| `OPERATOR_SCAN_JOB_TIMEOUT`| `5m`| The length of time to wait before giving up on a scan job|
|
|
||||||
| `OPERATOR_CONCURRENT_SCAN_JOBS_LIMIT`| `10`| The maximum number of scan jobs create by the operator|
|
|
||||||
| `OPERATOR_SCAN_JOB_RETRY_AFTER`| `30s`| The duration to wait before retrying a failed scan job|
|
|
||||||
| `OPERATOR_BATCH_DELETE_LIMIT`| `10`| The maximum number of config audit reports deleted by the operator when the plugin's config has changed.|
|
|
||||||
| `OPERATOR_BATCH_DELETE_DELAY`| `10s`| The duration to wait before deleting another batch of config audit reports.|
|
|
||||||
| `OPERATOR_METRICS_BIND_ADDRESS`| `:8080`| The TCP address to bind to for serving [Prometheus][prometheus] metrics. It can be set to `0` to disable the metrics serving.|
|
|
||||||
| `OPERATOR_HEALTH_PROBE_BIND_ADDRESS`| `:9090`| The TCP address to bind to for serving health probes, i.e. `/healthz/` and `/readyz/` endpoints.|
|
|
||||||
| `OPERATOR_VULNERABILITY_SCANNER_ENABLED`| `true`| The flag to enable vulnerability scanner|
|
|
||||||
| `OPERATOR_CONFIG_AUDIT_SCANNER_ENABLED`| `false`| The flag to enable configuration audit scanner|
|
|
||||||
| `OPERATOR_CONFIG_AUDIT_SCANNER_SCAN_ONLY_CURRENT_REVISIONS`| `false`| The flag to enable config audit scanner to only scan the current revision of a deployment|
|
|
||||||
| `OPERATOR_CONFIG_AUDIT_SCANNER_BUILTIN`| `true`| The flag to enable built-in configuration audit scanner|
|
|
||||||
| `OPERATOR_VULNERABILITY_SCANNER_SCAN_ONLY_CURRENT_REVISIONS`| `false`| The flag to enable vulnerability scanner to only scan the current revision of a deployment|
|
|
||||||
| `OPERATOR_VULNERABILITY_SCANNER_REPORT_TTL`| `""`| The flag to set how long a vulnerability report should exist. When a old report is deleted a new one will be created by the controller. It can be set to `""` to disabled the TTL for vulnerability scanner. |
|
|
||||||
| `OPERATOR_LEADER_ELECTION_ENABLED`| `false`| The flag to enable operator replica leader election|
|
|
||||||
| `OPERATOR_LEADER_ELECTION_ID`| `trivy-operator-lock`| The name of the resource lock for leader election|
|
|
||||||
|
|
||||||
The values of the `OPERATOR_NAMESPACE` and `OPERATOR_TARGET_NAMESPACES` determine the install mode, which in turn determines the multitenancy support of the operator.
|
|
||||||
|
|
||||||
| MODE| OPERATOR_NAMESPACE | OPERATOR_TARGET_NAMESPACES | DESCRIPTION|
|
|
||||||
|---|---|---|---|
|
|
||||||
| OwnNamespace| `operators`| `operators`| The operator can be configured to watch events in the namespace it is deployed in. |
|
|
||||||
| SingleNamespace| `operators`| `foo`| The operator can be configured to watch for events in a single namespace that the operator is not deployed in. |
|
|
||||||
| MultiNamespace| `operators`| `foo,bar,baz`| The operator can be configured to watch for events in more than one namespace. |
|
|
||||||
| AllNamespaces| `operators`| (blank string)| The operator can be configured to watch for events in all namespaces.|
|
|
||||||
|
|
||||||
## Example - configure namespaces to scan
|
|
||||||
|
|
||||||
To change the target namespace from all namespaces to the `default` namespace edit the `trivy-operator` Deployment and change the value of the `OPERATOR_TARGET_NAMESPACES` environment variable from the blank string (`""`) to the `default` value.
|
|
||||||
|
|
||||||
# Scanning configuration
|
|
||||||
|
|
||||||
| CONFIGMAP KEY| DEFAULT| DESCRIPTION|
|
|
||||||
|---|---|---|
|
|
||||||
| `vulnerabilityReports.scanner`| `Trivy`| The name of the plugin that generates vulnerability reports. Either `Trivy` or `Aqua`.|
|
|
||||||
| `vulnerabilityReports.scanJobsInSameNamespace` | `"false"`| Whether to run vulnerability scan jobs in same namespace of workload. Set `"true"` to enable.|
|
|
||||||
| `scanJob.tolerations`| N/A| JSON representation of the [tolerations] to be applied to the scanner pods so that they can run on nodes with matching taints. Example: `'[{"key":"key1", "operator":"Equal", "value":"value1", "effect":"NoSchedule"}]'`|
|
|
||||||
| `scanJob.annotations`| N/A| One-line comma-separated representation of the annotations which the user wants the scanner pods to be annotated with. Example: `foo=bar,env=stage` will annotate the scanner pods with the annotations `foo: bar` and `env: stage` |
|
|
||||||
| `scanJob.templateLabel`| N/A| One-line comma-separated representation of the template labels which the user wants the scanner pods to be labeled with. Example: `foo=bar,env=stage` will labeled the scanner pods with the labels `foo: bar` and `env: stage`|
|
|
||||||
|
|
||||||
## Example - patch ConfigMap
|
|
||||||
|
|
||||||
By default Trivy displays vulnerabilities with all severity levels (`UNKNOWN`, `LOW`, `MEDIUM`, `HIGH`, `CRITICAL`). To display only `HIGH` and `CRITICAL` vulnerabilities by patching the `trivy.severity` value in the `trivy-operator-trivy-config` ConfigMap:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
kubectl patch cm trivy-operator-trivy-config -n trivy-operator \
|
|
||||||
--type merge \
|
|
||||||
-p "$(cat <<EOF
|
|
||||||
{
|
|
||||||
"data": {
|
|
||||||
"trivy.severity": "HIGH,CRITICAL"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
)"
|
|
||||||
```
|
|
||||||
|
|
||||||
## Example - patch Secret
|
|
||||||
|
|
||||||
To set the GitHub token used by Trivy scanner add the `trivy.githubToken` value to the `trivy-operator-trivy-config` Secret:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
kubectl patch secret trivy-operator-trivy-config -n trivy-operator \
|
|
||||||
--type merge \
|
|
||||||
-p "$(cat <<EOF
|
|
||||||
{
|
|
||||||
"data": {
|
|
||||||
"trivy.githubToken": "$(echo -n <your token> | base64)"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
)"
|
|
||||||
```
|
|
||||||
|
|
||||||
## Example - delete a key
|
|
||||||
|
|
||||||
The following `kubectl patch` command deletes the `trivy.httpProxy` key:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
kubectl patch cm trivy-operator-trivy-config -n trivy-operator \
|
|
||||||
--type json \
|
|
||||||
-p '[{"op": "remove", "path": "/data/trivy.httpProxy"}]'
|
|
||||||
```
|
|
||||||
|
|
||||||
[tolerations]: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration
|
|
||||||
|
|
||||||
|
|
||||||
[prometheus]: https://github.com/prometheus
|
|
||||||
@@ -1,202 +0,0 @@
|
|||||||
# Getting Started
|
|
||||||
|
|
||||||
## Before you Begin
|
|
||||||
|
|
||||||
You need to have a Kubernetes cluster, and the kubectl command-line tool must be configured to communicate with your
|
|
||||||
cluster. If you do not already have a cluster, you can create one by installing [minikube] or [kind], or you can use one
|
|
||||||
of these Kubernetes playgrounds:
|
|
||||||
|
|
||||||
* [Katacoda]
|
|
||||||
* [Play with Kubernetes]
|
|
||||||
|
|
||||||
You also need the Trivy-Operator to be installed in the `trivy-system` namespace, e.g. with
|
|
||||||
[kubectl](./installation/kubectl.md) or [Helm](./installation/helm.md). Let's also assume that the operator is
|
|
||||||
configured to discover built-in Kubernetes resources in all namespaces, except `kube-system` and `trivy-system`.
|
|
||||||
|
|
||||||
## Workloads Scanning
|
|
||||||
|
|
||||||
Let's create the `nginx` Deployment that we know is vulnerable:
|
|
||||||
|
|
||||||
```
|
|
||||||
kubectl create deployment nginx --image nginx:1.16
|
|
||||||
```
|
|
||||||
|
|
||||||
When the `nginx` Deployment is created, the operator immediately detects its current revision (aka active ReplicaSet)
|
|
||||||
and scans the `nginx:1.16` image for vulnerabilities. It also audits the ReplicaSet's specification for common pitfalls
|
|
||||||
such as running the `nginx` container as root.
|
|
||||||
|
|
||||||
If everything goes fine, the operator saves scan reports as VulnerabilityReport and ConfigAuditReport resources in the
|
|
||||||
`default` namespace. Reports are named after the scanned ReplicaSet. For image vulnerability scans, the operator creates
|
|
||||||
a VulnerabilityReport for each different container. In this example there is just one container image called `nginx`:
|
|
||||||
|
|
||||||
```
|
|
||||||
kubectl get vulnerabilityreports -o wide
|
|
||||||
```
|
|
||||||
<details>
|
|
||||||
<summary>Result</summary>
|
|
||||||
|
|
||||||
```
|
|
||||||
NAME REPOSITORY TAG SCANNER AGE CRITICAL HIGH MEDIUM LOW UNKNOWN
|
|
||||||
replicaset-nginx-78449c65d4-nginx library/nginx 1.16 Trivy 85s 33 62 49 114 1
|
|
||||||
```
|
|
||||||
</details>
|
|
||||||
|
|
||||||
```
|
|
||||||
kubectl get configauditreports -o wide
|
|
||||||
```
|
|
||||||
<details>
|
|
||||||
<summary>Result</summary>
|
|
||||||
|
|
||||||
```
|
|
||||||
NAME SCANNER AGE CRITICAL HIGH MEDIUM LOW
|
|
||||||
replicaset-nginx-78449c65d4 Trivy-Operator 2m7s 0 0 6 7
|
|
||||||
```
|
|
||||||
</details>
|
|
||||||
|
|
||||||
Notice that scan reports generated by the operator are controlled by Kubernetes workloads. In our example,
|
|
||||||
VulnerabilityReport and ConfigAuditReport resources are controlled by the active ReplicaSet of the `nginx` Deployment:
|
|
||||||
|
|
||||||
```console
|
|
||||||
kubectl tree deploy nginx
|
|
||||||
```
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>Result</summary>
|
|
||||||
|
|
||||||
```
|
|
||||||
NAMESPACE NAME READY REASON AGE
|
|
||||||
default Deployment/nginx - 7h2m
|
|
||||||
default └─ReplicaSet/nginx-78449c65d4 - 7h2m
|
|
||||||
default ├─ConfigAuditReport/replicaset-nginx-78449c65d4 - 2m31s
|
|
||||||
default ├─Pod/nginx-78449c65d4-5wvdx True 7h2m
|
|
||||||
default └─VulnerabilityReport/replicaset-nginx-78449c65d4-nginx - 2m7s
|
|
||||||
```
|
|
||||||
</details>
|
|
||||||
|
|
||||||
!!! note
|
|
||||||
The [tree] command is a kubectl plugin to browse Kubernetes object hierarchies as a tree.
|
|
||||||
|
|
||||||
Moving forward, let's update the container image of the `nginx` Deployment from `nginx:1.16` to `nginx:1.17`. This will
|
|
||||||
trigger a rolling update of the Deployment and eventually create another ReplicaSet.
|
|
||||||
|
|
||||||
```
|
|
||||||
kubectl set image deployment nginx nginx=nginx:1.17
|
|
||||||
```
|
|
||||||
|
|
||||||
Even this time the operator will pick up changes and rescan our Deployment with updated configuration:
|
|
||||||
|
|
||||||
```
|
|
||||||
kubectl tree deploy nginx
|
|
||||||
```
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>Result</summary>
|
|
||||||
|
|
||||||
```
|
|
||||||
NAMESPACE NAME READY REASON AGE
|
|
||||||
default Deployment/nginx - 7h5m
|
|
||||||
default ├─ReplicaSet/nginx-5fbc65fff - 2m36s
|
|
||||||
default │ ├─ConfigAuditReport/replicaset-nginx-5fbc65fff - 2m36s
|
|
||||||
default │ ├─Pod/nginx-5fbc65fff-j7zl2 True 2m36s
|
|
||||||
default │ └─VulnerabilityReport/replicaset-nginx-5fbc65fff-nginx - 2m22s
|
|
||||||
default └─ReplicaSet/nginx-78449c65d4 - 7h5m
|
|
||||||
default ├─ConfigAuditReport/replicaset-nginx-78449c65d4 - 5m46s
|
|
||||||
default └─VulnerabilityReport/replicaset-nginx-78449c65d4-nginx - 5m22s
|
|
||||||
```
|
|
||||||
</details>
|
|
||||||
|
|
||||||
By following this guide you could realize that the operator knows how to attach VulnerabilityReport and
|
|
||||||
ConfigAuditReport resources to build-in Kubernetes objects. What's more, in this approach where a custom resource
|
|
||||||
inherits a life cycle of the built-in resource we could leverage Kubernetes garbage collection. For example, when the
|
|
||||||
previous ReplicaSet named `nginx-78449c65d4` is deleted the VulnerabilityReport named `replicaset-nginx-78449c65d4-nginx`
|
|
||||||
as well as the ConfigAuditReport named `replicaset-nginx-78449c65d46` are automatically garbage collected.
|
|
||||||
|
|
||||||
!!! tip
|
|
||||||
If you only want the latest ReplicaSet in your Deployment to be scanned for vulnerabilities, you can set the value
|
|
||||||
of the `OPERATOR_VULNERABILITY_SCANNER_SCAN_ONLY_CURRENT_REVISIONS` environment variable to `true` in the operator's
|
|
||||||
deployment descriptor. This is useful to identify vulnerabilities that impact only the running workloads.
|
|
||||||
|
|
||||||
!!! tip
|
|
||||||
If you only want the latest ReplicaSet in your Deployment to be scanned for config audit, you can set the value
|
|
||||||
of the `OPERATOR_CONFIG_AUDIT_SCANNER_SCAN_ONLY_CURRENT_REVISIONS` environment variable to `true` in the operator's
|
|
||||||
deployment descriptor. This is useful to identify config issues that impact only the running workloads.
|
|
||||||
|
|
||||||
!!! tip
|
|
||||||
You can get and describe `vulnerabilityreports` and `configauditreports` as built-in Kubernetes objects:
|
|
||||||
```
|
|
||||||
kubectl get vulnerabilityreport replicaset-nginx-5fbc65fff-nginx -o json
|
|
||||||
kubectl describe configauditreport replicaset-nginx-5fbc65fff
|
|
||||||
```
|
|
||||||
|
|
||||||
Notice that scaling up the `nginx` Deployment will not schedule new scans because all replica Pods refer to the same Pod
|
|
||||||
template defined by the `nginx-5fbc65fff` ReplicaSet.
|
|
||||||
|
|
||||||
```
|
|
||||||
kubectl scale deploy nginx --replicas 3
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
|
||||||
kubectl tree deploy nginx
|
|
||||||
```
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>Result</summary>
|
|
||||||
|
|
||||||
```
|
|
||||||
NAMESPACE NAME READY REASON AGE
|
|
||||||
default Deployment/nginx - 7h6m
|
|
||||||
default ├─ReplicaSet/nginx-5fbc65fff - 4m7s
|
|
||||||
default │ ├─ConfigAuditReport/replicaset-nginx-5fbc65fff - 4m7s
|
|
||||||
default │ ├─Pod/nginx-5fbc65fff-458n7 True 8s
|
|
||||||
default │ ├─Pod/nginx-5fbc65fff-fk847 True 8s
|
|
||||||
default │ ├─Pod/nginx-5fbc65fff-j7zl2 True 4m7s
|
|
||||||
default │ └─VulnerabilityReport/replicaset-nginx-5fbc65fff-nginx - 3m53s
|
|
||||||
default └─ReplicaSet/nginx-78449c65d4 - 7h6m
|
|
||||||
default ├─ConfigAuditReport/replicaset-nginx-78449c65d4 - 7m17s
|
|
||||||
default └─VulnerabilityReport/replicaset-nginx-78449c65d4-nginx - 6m53s
|
|
||||||
```
|
|
||||||
</details>
|
|
||||||
|
|
||||||
Finally, when you delete the `nginx` Deployment, orphaned security reports will be deleted in the background by the
|
|
||||||
Kubernetes garbage collection controller.
|
|
||||||
|
|
||||||
```
|
|
||||||
kubectl delete deploy nginx
|
|
||||||
```
|
|
||||||
|
|
||||||
```console
|
|
||||||
kubectl get vuln,configaudit
|
|
||||||
```
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>Result</summary>
|
|
||||||
|
|
||||||
```
|
|
||||||
No resources found in default namespace.
|
|
||||||
```
|
|
||||||
</details>
|
|
||||||
|
|
||||||
!!! Tip
|
|
||||||
Use `vuln` and `configaudit` as short names for `vulnerabilityreports` and `configauditreports` resources.
|
|
||||||
|
|
||||||
!!! Note
|
|
||||||
You can define the validity period for VulnerabilityReports by setting the duration as the value of the
|
|
||||||
`OPERATOR_VULNERABILITY_SCANNER_REPORT_TTL` environment variable. For example, setting the value to `24h`
|
|
||||||
would delete reports after 24 hours. When a VulnerabilityReport gets deleted Trivy-Operator will automatically
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## What's Next?
|
|
||||||
|
|
||||||
- Find out how the operator scans workloads that use container images from [Private Registries].
|
|
||||||
- By default, the operator uses Trivy as [Vulnerability Scanner] and Polaris as [Configuration Checker], but you can
|
|
||||||
choose other tools that are integrated with Trivy-Operator or even implement you own plugin.
|
|
||||||
|
|
||||||
[minikube]: https://minikube.sigs.k8s.io/docs/
|
|
||||||
[kind]: https://kind.sigs.k8s.io/docs/
|
|
||||||
[Katacoda]: https://www.katacoda.com/courses/kubernetes/playground/
|
|
||||||
[Play with Kubernetes]: http://labs.play-with-k8s.com/
|
|
||||||
[tree]: https://github.com/ahmetb/kubectl-tree
|
|
||||||
[Private Registries]: ./../vulnerability-scanning/private-registries.md
|
|
||||||
[Vulnerability Scanner]: ./../vulnerability-scanning/index.md
|
|
||||||
[Configuration Checker]: ./../configuration-auditing/index.md
|
|
||||||
|
Before Width: | Height: | Size: 1.6 MiB |
|
Before Width: | Height: | Size: 1.6 MiB |
|
Before Width: | Height: | Size: 361 KiB |
|
Before Width: | Height: | Size: 325 KiB |
|
Before Width: | Height: | Size: 368 KiB |
|
Before Width: | Height: | Size: 249 KiB |
|
Before Width: | Height: | Size: 529 KiB |
@@ -1 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22"><path d="M19.90856,11.37359l-.94046,1.16318.04433.42088a.66075.66075,0,0,1,.00653.25385l-.00778.04071a.66193.66193,0,0,1-.08906.21314c-.01313.01986-.027.03932-.0384.0537l-4.57928,5.69351a.70189.70189,0,0,1-.53066.25266l-7.34439-.00171a.70458.70458,0,0,1-.52974-.25154L1.32209,13.51754a.64957.64957,0,0,1-.096-.16658.71032.71032,0,0,1-.02863-.08952.66205.66205,0,0,1-.00515-.30511l1.6348-7.10077a.66883.66883,0,0,1,.1355-.274.65915.65915,0,0,1,.22568-.17666L9.80881,2.24386a.69063.69063,0,0,1,.29475-.0667l.00515.0002.03424.00112a.68668.68668,0,0,1,.25649.06544l6.61569,3.161a.66765.66765,0,0,1,.21678.165.675.675,0,0,1,.14909.29139l.60521,2.64815,1.1606-.20569-.61853-2.70614a1.85372,1.85372,0,0,0-1.00544-1.25474l-6.616-3.16113a1.84812,1.84812,0,0,0-.67883-.17726l-.03061-.00218c-.02692-.00125-.05416-.00152-.05851-.00152L10.10146,1a1.87317,1.87317,0,0,0-.80022.18175l-6.62038,3.161a1.83083,1.83083,0,0,0-.62572.48916,1.84956,1.84956,0,0,0-.37523.75964L.04518,12.69226a1.84474,1.84474,0,0,0,.00956.8516,1.88289,1.88289,0,0,0,.07772.24244,1.826,1.826,0,0,0,.27219.46878L4.98281,19.9503a1.8815,1.8815,0,0,0,1.4473.6903l7.34394.00172a1.87874,1.87874,0,0,0,1.4475-.69182l4.58278-5.698c.03609-.04578.07026-.093.10252-.14243a1.82018,1.82018,0,0,0,.25207-.59695c.00805-.03517.01484-.07079.021-.10773a1.8273,1.8273,0,0,0-.02032-.71135Z" style="fill:#fff"/><polygon points="9.436 4.863 9.332 11.183 12.92 10.115 9.436 4.863" style="fill:#fff"/><polygon points="7.913 11.605 8.265 11.5 8.617 11.395 8.629 11.392 8.74 4.605 8.753 3.838 8.384 4.915 8.015 5.994 5.964 11.986 6.684 11.971 7.913 11.605" style="fill:#fff"/><polygon points="5.738 13.279 5.888 12.956 6.014 12.685 5.723 12.691 5.352 12.699 5.06 12.705 1.918 12.771 4.498 15.952 5.588 13.603 5.738 13.279" style="fill:#fff"/><polygon points="14.026 10.516 13.675 10.621 13.324 10.725 9.32 11.917 8.969 12.021 8.617 12.126 8.604 12.13 8.252 12.235 7.9 12.339 7.593 12.431 7.894 12.688 8.238 12.982 8.583 13.277 8.598 13.289 8.943 13.584 9.288 13.879 9.61 14.154 9.896 14.398 10.183 14.643 14.064 17.958 22 8.143 14.026 10.516" style="fill:#fff"/><polygon points="9.273 14.787 9.229 14.749 8.943 14.505 8.928 14.492 8.583 14.197 8.567 14.183 8.222 13.889 7.877 13.594 7.362 13.154 7.086 12.919 6.81 12.683 6.794 12.669 6.641 12.998 6.488 13.328 6.468 13.371 6.318 13.694 6.168 14.017 4.989 16.557 4.989 16.558 4.99 16.558 4.992 16.559 5.341 16.638 5.691 16.716 12.164 18.175 12.895 18.339 13.625 18.504 9.516 14.994 9.273 14.787" style="fill:#fff"/></svg>
|
|
||||||
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 125 KiB |
|
Before Width: | Height: | Size: 56 KiB |
@@ -1,15 +0,0 @@
|
|||||||
# Trivy Operator
|
|
||||||
|
|
||||||
Trivy has a native [Kubernetes Operator](operator) which continuously scans your Kubernetes cluster for security issues, and generates security reports as Kubernetes [Custom Resources](crd). It does it by watching Kubernetes for state changes and automatically triggering scans in response to changes, for example initiating a vulnerability scan when a new Pod is created.
|
|
||||||
|
|
||||||
> Trivy Operator is based on existing Aqua OSS project - [Starboard], and shares some of the design, principles and code with it. Existing content that relates to Starboard Operator might also be relevant for Trivy Operator. To learn more about the transition from Starboard from Trivy, see the [announcement discussion](starboard-announcement).
|
|
||||||
|
|
||||||
<figure>
|
|
||||||
<img src="./images/operator/trivy-operator-workloads.png" />
|
|
||||||
<figcaption>Workload reconcilers discover K8s controllers, manage scan jobs, and create VulnerabilityReport and ConfigAuditReport objects.</figcaption>
|
|
||||||
</figure>
|
|
||||||
|
|
||||||
[operator]: https://kubernetes.io/docs/concepts/extend-kubernetes/operator/
|
|
||||||
[crd]: https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/
|
|
||||||
[Starboard]: https://github.com/aquasecurity/starboard
|
|
||||||
[starboard-announcement]: https://github.com/aquasecurity/starboard/discussions/1173
|
|
||||||
@@ -1,90 +0,0 @@
|
|||||||
# Helm
|
|
||||||
|
|
||||||
[Helm], which is a popular package manager for Kubernetes, allows installing applications from parameterized
|
|
||||||
YAML manifests called Helm [charts].
|
|
||||||
|
|
||||||
The Helm chart is available on GitHub in [https://github.com/aquasecurity/trivy-operator](https://github.com/aquasecurity/trivy-operator) under `/deploy/helm` and is also hosted in a Chart repository for your convenience under [https://aquasecurity.github.io/helm-charts/](https://aquasecurity.github.io/helm-charts/).
|
|
||||||
|
|
||||||
## Example - Chart repository
|
|
||||||
|
|
||||||
This will install the operator in the `trivy-system` namespace and configure it to scan all namespaces, except `kube-system` and `trivy-system`:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
helm repo add aqua https://aquasecurity.github.io/helm-charts/
|
|
||||||
helm repo update
|
|
||||||
helm install trivy-operator aqua/trivy-operator \
|
|
||||||
--namespace trivy-system \
|
|
||||||
--create-namespace \
|
|
||||||
--set="trivy.ignoreUnfixed=true" \
|
|
||||||
--version {{ var.operator_version }}
|
|
||||||
```
|
|
||||||
|
|
||||||
## Example - Download the chart
|
|
||||||
|
|
||||||
This will install the operator in the `trivy-system` namespace and configure it to scan all namespaces, except `kube-system` and `trivy-system`:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git clone --depth 1 --branch {{ var.operator_version }} https://github.com/aquasecurity/trivy-operator.git
|
|
||||||
cd trivy-operator
|
|
||||||
helm install trivy-operator ./deploy/helm \
|
|
||||||
--namespace trivy-system \
|
|
||||||
--create-namespace \
|
|
||||||
--set="trivy.ignoreUnfixed=true"
|
|
||||||
```
|
|
||||||
|
|
||||||
## Post install sanity check
|
|
||||||
|
|
||||||
Check that the `trivy-operator` Helm release is created in the `trivy-system` namespace, and it has status `deployed`:
|
|
||||||
|
|
||||||
```console
|
|
||||||
$ helm list -n trivy-system
|
|
||||||
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
|
|
||||||
trivy-operator trivy-system 1 2021-01-27 20:09:53.158961 +0100 CET deployed trivy-operator-{{ var.operator_version }} {{ var.operator_version[1:] }}
|
|
||||||
```
|
|
||||||
|
|
||||||
To confirm that the operator is running, check that the `trivy-operator` Deployment in the `trivy-system`
|
|
||||||
namespace is available and all its containers are ready:
|
|
||||||
|
|
||||||
```console
|
|
||||||
$ kubectl get deployment -n trivy-system
|
|
||||||
NAME READY UP-TO-DATE AVAILABLE AGE
|
|
||||||
trivy-operator 1/1 1 1 11m
|
|
||||||
```
|
|
||||||
|
|
||||||
If for some reason it's not ready yet, check the logs of the Deployment for errors:
|
|
||||||
|
|
||||||
```
|
|
||||||
kubectl logs deployment/trivy-operator -n trivy-system
|
|
||||||
```
|
|
||||||
|
|
||||||
## Advanced Configuration
|
|
||||||
|
|
||||||
The Helm chart supports all available [installation modes](./../configuration.md#install-modes) of Trivy Operator.
|
|
||||||
|
|
||||||
Please refer to the chart's [values] file for configuration options.
|
|
||||||
|
|
||||||
## Uninstall
|
|
||||||
|
|
||||||
You can uninstall the operator with the following command:
|
|
||||||
|
|
||||||
```
|
|
||||||
helm uninstall trivy-operator -n trivy-system
|
|
||||||
```
|
|
||||||
|
|
||||||
You have to manually delete custom resource definitions created by the `helm install` command:
|
|
||||||
|
|
||||||
!!! danger
|
|
||||||
Deleting custom resource definitions will also delete all security reports generated by the operator.
|
|
||||||
|
|
||||||
```
|
|
||||||
kubectl delete crd vulnerabilityreports.aquasecurity.github.io
|
|
||||||
kubectl delete crd clustervulnerabilityreports.aquasecurity.github.io
|
|
||||||
kubectl delete crd configauditreports.aquasecurity.github.io
|
|
||||||
kubectl delete crd clusterconfigauditreports.aquasecurity.github.io
|
|
||||||
kubectl delete crd clustercompliancereports.aquasecurity.github.io
|
|
||||||
kubectl delete crd clustercompliancedetailreports.aquasecurity.github.io
|
|
||||||
```
|
|
||||||
|
|
||||||
[Helm]: https://helm.sh/
|
|
||||||
[charts]: https://helm.sh/docs/topics/charts/
|
|
||||||
[values]: https://raw.githubusercontent.com/aquasecurity/trivy-operator/{{ var.operator_version }}/deploy/helm/values.yaml
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
# kubectl
|
|
||||||
|
|
||||||
Kubernetes Yaml deployment files are available on GitHub in [https://github.com/aquasecurity/trivy-operator](https://github.com/aquasecurity/trivy-operator) under `/deploy/static`.
|
|
||||||
|
|
||||||
## Example - Deploy from GitHub
|
|
||||||
|
|
||||||
This will install the operator in the `trivy-system` namespace and configure it to scan all namespaces, except `kube-system` and `trivy-system`:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
kubectl apply -f https://raw.githubusercontent.com/aquasecurity/trivy-operator/{{ var.operator_version }}/deploy/static/trivy-operator.yaml
|
|
||||||
```
|
|
||||||
|
|
||||||
To confirm that the operator is running, check that the `trivy-operator` Deployment in the `trivy-system`
|
|
||||||
namespace is available and all its containers are ready:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ kubectl get deployment -n trivy-system
|
|
||||||
NAME READY UP-TO-DATE AVAILABLE AGE
|
|
||||||
trivy-operator 1/1 1 1 11m
|
|
||||||
```
|
|
||||||
|
|
||||||
If for some reason it's not ready yet, check the logs of the `trivy-operator` Deployment for errors:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
kubectl logs deployment/trivy-operator -n trivy-system
|
|
||||||
```
|
|
||||||
|
|
||||||
## Advanced Configuration
|
|
||||||
|
|
||||||
You can configure Trivy-Operator to control it's behavior and adapt it to your needs. Aspects of the operator machinery are configured using environment variables on the operator Pod, while aspects of the scanning behavior are controlled by ConfigMaps and Secrets.
|
|
||||||
To learn more, please refer to the [Configuration](config) documentation.
|
|
||||||
|
|
||||||
## Uninstall
|
|
||||||
|
|
||||||
!!! danger
|
|
||||||
Uninstalling the operator and deleting custom resource definitions will also delete all generated security reports.
|
|
||||||
|
|
||||||
You can uninstall the operator with the following command:
|
|
||||||
|
|
||||||
```
|
|
||||||
kubectl delete -f https://raw.githubusercontent.com/aquasecurity/trivy-operator/{{ var.operator_version }}/deploy/static/trivy-operator.yaml
|
|
||||||
```
|
|
||||||
|
|
||||||
[Settings]: ./../../settings.md
|
|
||||||
[Helm]: ./helm.md
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
# Upgrade
|
|
||||||
|
|
||||||
We recommend that you upgrade Trivy Operator often to stay up to date with the latest fixes and enhancements.
|
|
||||||
|
|
||||||
However, at this stage we do not provide automated upgrades. Therefore, uninstall the previous version of the operator
|
|
||||||
before you install the latest release.
|
|
||||||
|
|
||||||
!!! warning
|
|
||||||
Consult release notes and changelog to revisit and migrate configuration settings which may not be compatible
|
|
||||||
between different versions.
|
|
||||||
@@ -1,106 +0,0 @@
|
|||||||
# Troubleshooting the Trivy Operator
|
|
||||||
|
|
||||||
The Trivy Operator installs several Kubernetes resources into your Kubernetes cluster.
|
|
||||||
|
|
||||||
Here are the common steps to check whether the operator is running correctly and to troubleshoot common issues.
|
|
||||||
|
|
||||||
So in addition to this section, you might want to check [issues](https://github.com/aquasecurity/trivy/issues), [discussion forum](https://github.com/aquasecurity/trivy/discussions), or [Slack](https://slack.aquasec.com) to see if someone from the community had similar problems before.
|
|
||||||
|
|
||||||
Also note that Trivy Operator is based on existing Aqua OSS project - [Starboard], and shares some of the design, principles and code with it. Existing content that relates to Starboard Operator might also be relevant for Trivy Operator, and Starboard's [issues](https://github.com/aquasecurity/starboard/issues), [discussion forum](https://github.com/aquasecurity/starboard/discussions), or [Slack](https://slack.aquasec.com) might also be interesting to check.
|
|
||||||
In some cases you might want to refer to [Starboard's Design documents](https://aquasecurity.github.io/starboard/latest/design/)
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
Make sure that the latest version of the Trivy Operator is installed. For this, have a look at the installation [options.](./installation/helm.md)
|
|
||||||
|
|
||||||
For instance, if your are using the Helm deployment, you need to check the Helm Chart version deployed to your cluster. You can check the Helm Chart version with the following command:
|
|
||||||
```
|
|
||||||
helm list -n trivy-operator
|
|
||||||
```
|
|
||||||
|
|
||||||
## Operator Pod Not Running
|
|
||||||
|
|
||||||
The Trivy Operator will run a pod inside your cluster. If you have followed the installation guide, you will have installed the Operator to the `trivy-system`.
|
|
||||||
|
|
||||||
Make sure that the pod is in the `Running` status:
|
|
||||||
```
|
|
||||||
kubectl get pods -n trivy-operator
|
|
||||||
```
|
|
||||||
|
|
||||||
This is how it will look if it is running okay:
|
|
||||||
|
|
||||||
```
|
|
||||||
NAMESPACE NAME READY STATUS RESTARTS AGE
|
|
||||||
trivy-operator trivy-operator-6c9bd97d58-hsz4g 1/1 Running 5 (19m ago) 30h
|
|
||||||
```
|
|
||||||
|
|
||||||
If the pod is in `Failed`, `Pending`, or `Unknown` check the events and the logs of the pod.
|
|
||||||
|
|
||||||
First, check the events, since they might be more descriptive of the problem. However, if the events do not give a clear reason why the pod cannot spin up, then you want to check the logs, which provide more detail.
|
|
||||||
|
|
||||||
```
|
|
||||||
kubectl describe pod <POD-NAME> -n trivy-system
|
|
||||||
```
|
|
||||||
|
|
||||||
To check the logs, use the following command:
|
|
||||||
```
|
|
||||||
kubectl logs deployment/trivy-operator -n trivy-system
|
|
||||||
```
|
|
||||||
|
|
||||||
If your pod is not running, try to look for errors as they can give an indication on the problem.
|
|
||||||
|
|
||||||
If there are too many logs messages, try deleting the Trivy pod and observe its behavior upon restarting. A new pod should spin up automatically after deleting the failed pod.
|
|
||||||
|
|
||||||
## ImagePullBackOff or ErrImagePull
|
|
||||||
|
|
||||||
Check the status of the Trivy Operator pod running inside of your Kubernetes cluster. If the Status is ImagePullBackOff or ErrImagePull, it means that the Operator either
|
|
||||||
|
|
||||||
* tries to access the wrong image
|
|
||||||
* cannot pull the image from the registry
|
|
||||||
|
|
||||||
Make sure that you are providing the right resources upon installing the Trivy Operator.
|
|
||||||
|
|
||||||
## CrashLoopBackOff
|
|
||||||
|
|
||||||
If your pod is in `CrashLoopBackOff`, it is likely the case that the pod cannot be scheduled on the Kubernetes node that it is trying to schedule on.
|
|
||||||
In this case, you want to investigate further whether there is an issue with the node. It could for instance be the case that the node does not have sufficient resources.
|
|
||||||
|
|
||||||
## Reconcilation Error
|
|
||||||
|
|
||||||
It could happen that the pod appears to be running normally but does not reconcile the resources inside of your Kubernetes cluster.
|
|
||||||
|
|
||||||
Check the logs for reconcilation errors:
|
|
||||||
```
|
|
||||||
kubectl logs deployment/trivy-operator -n trivy-system
|
|
||||||
```
|
|
||||||
|
|
||||||
If this is the case, the Trivy Operator likely does not have the right configurations to access your resource.
|
|
||||||
|
|
||||||
## Operator does not Create VulnerabilityReports
|
|
||||||
|
|
||||||
VulnerabilityReports are owned and controlled by the immediate Kubernetes workload. Every VulnerabilityReport of a pod is thus, linked to a [ReplicaSet.](./index.md) In case the Trivy Operator does not create a VulnerabilityReport for your workloads, it could be that it is not monitoring the namespace that your workloads are running on.
|
|
||||||
|
|
||||||
An easy way to check this is by looking for the `ClusterRoleBinding` for the Trivy Operator:
|
|
||||||
|
|
||||||
```
|
|
||||||
kubectl get ClusterRoleBinding | grep "trivy-operator"
|
|
||||||
```
|
|
||||||
|
|
||||||
Alternatively, you could use the `kubectl-who-can` [plugin by Aqua](https://github.com/aquasecurity/kubectl-who-can):
|
|
||||||
|
|
||||||
```console
|
|
||||||
$ kubectl who-can list vulnerabilityreports
|
|
||||||
No subjects found with permissions to list vulnerabilityreports assigned through RoleBindings
|
|
||||||
|
|
||||||
CLUSTERROLEBINDING SUBJECT TYPE SA-NAMESPACE
|
|
||||||
cluster-admin system:masters Group
|
|
||||||
trivy-operator trivy-operator ServiceAccount trivy-system
|
|
||||||
system:controller:generic-garbage-collector generic-garbage-collector ServiceAccount kube-system
|
|
||||||
system:controller:namespace-controller namespace-controller ServiceAccount kube-system
|
|
||||||
system:controller:resourcequota-controller resourcequota-controller ServiceAccount kube-system
|
|
||||||
system:kube-controller-manager system:kube-controller-manager User
|
|
||||||
```
|
|
||||||
|
|
||||||
If the `ClusterRoleBinding` does not exist, Trivy currently cannot monitor any namespace outside of the `trivy-system` namespace.
|
|
||||||
|
|
||||||
For instance, if you are using the [Helm Chart](./installation/helm.md), you want to make sure to set the `targetNamespace` to the namespace that you want the Operator to monitor.
|
|
||||||
@@ -1,109 +0,0 @@
|
|||||||
# Vulnerability Scanning Configuration
|
|
||||||
|
|
||||||
## Standalone
|
|
||||||
|
|
||||||
The default configuration settings enable Trivy `vulnerabilityReports.scanner` in [`Standalone`][trivy-standalone]
|
|
||||||
`trivy.mode`. Even though it doesn't require any additional setup, it's the least efficient method. Each Pod created
|
|
||||||
by a scan Job has the init container that downloads the Trivy vulnerabilities database from the GitHub releases page
|
|
||||||
and stores it in the local file system of the [emptyDir volume]. This volume is then shared with containers that perform
|
|
||||||
the actual scanning. Finally, the Pod is deleted along with the emptyDir volume.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
The number of containers defined by a scan Job equals the number of containers defined by the scanned Kubernetes
|
|
||||||
workload, so the cache in this mode is useful only if the workload defines multiple containers.
|
|
||||||
|
|
||||||
Beyond that, frequent downloads from GitHub might lead to a [rate limiting] problem. The limits are imposed by GitHub on
|
|
||||||
all anonymous requests originating from a given IP. To mitigate such problems you can add the `trivy.githubToken` key to
|
|
||||||
the `trivy-operator` secret.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
|
|
||||||
kubectl patch secret trivy-operator-trivy-config -n trivy-operator \
|
|
||||||
--type merge \
|
|
||||||
-p "$(cat <<EOF
|
|
||||||
{
|
|
||||||
"data": {
|
|
||||||
"trivy.githubToken": "$(echo -n <GITHUB_TOKEN> | base64)"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
)"
|
|
||||||
```
|
|
||||||
|
|
||||||
## ClientServer
|
|
||||||
|
|
||||||
You can connect Trivy to an external Trivy server by changing the default `trivy.mode` from
|
|
||||||
[`Standalone`][trivy-standalone] to [`ClientServer`][trivy-clientserver] and specifying `trivy.serverURL`.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
kubectl patch cm trivy-operator-trivy-config -n trivy-operator \
|
|
||||||
--type merge \
|
|
||||||
-p "$(cat <<EOF
|
|
||||||
{
|
|
||||||
"data": {
|
|
||||||
"trivy.mode": "ClientServer",
|
|
||||||
"trivy.serverURL": "<TRIVY_SERVER_URL>"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
)"
|
|
||||||
```
|
|
||||||
|
|
||||||
The Trivy server could be your own deployment, or it could be an external service. See [Trivy server][trivy-clientserver] documentation for more information.
|
|
||||||
|
|
||||||
If the server requires access token and/or custom HTTP authentication headers, you may add `trivy.serverToken` and `trivy.serverCustomHeaders` properties to the Trivy Operator secret.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
kubectl patch secret trivy-operator-trivy-config -n trivy-operator \
|
|
||||||
--type merge \
|
|
||||||
-p "$(cat <<EOF
|
|
||||||
{
|
|
||||||
"data": {
|
|
||||||
"trivy.serverToken": "$(echo -n <SERVER_TOKEN> | base64)",
|
|
||||||
"trivy.serverCustomHeaders": "$(echo -n x-api-token:<X_API_TOKEN> | base64)"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
)"
|
|
||||||
```
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## Settings
|
|
||||||
|
|
||||||
| CONFIGMAP KEY| DEFAULT| DESCRIPTION|
|
|
||||||
|---|---|---|
|
|
||||||
| `trivy.imageRef`| `docker.io/aquasec/trivy:0.25.2`| Trivy image reference|
|
|
||||||
| `trivy.dbRepository`| `ghcr.io/aquasecurity/trivy-db`| External OCI Registry to download the vulnerability database|
|
|
||||||
| `trivy.mode`| `Standalone`| Trivy client mode. Either `Standalone` or `ClientServer`. Depending on the active mode other settings might be applicable or required. |
|
|
||||||
| `trivy.severity`| `UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL` | A comma separated list of severity levels reported by Trivy|
|
|
||||||
| `trivy.ignoreUnfixed`| N/A| Whether to show only fixed vulnerabilities in vulnerabilities reported by Trivy. Set to `"true"` to enable it.|
|
|
||||||
| `trivy.skipFiles`| N/A| A comma separated list of file paths for Trivy to skip traversal.|
|
|
||||||
| `trivy.skipDirs`| N/A| A comma separated list of directories for Trivy to skip traversal.|
|
|
||||||
| `trivy.ignoreFile`| N/A| It specifies the `.trivyignore` file which contains a list of vulnerability IDs to be ignored from vulnerabilities reported by Trivy.|
|
|
||||||
| `trivy.timeout`| `5m0s`| The duration to wait for scan completion|
|
|
||||||
| `trivy.serverURL`| N/A| The endpoint URL of the Trivy server. Required in `ClientServer` mode.|
|
|
||||||
| `trivy.serverTokenHeader`| `Trivy-Token`| The name of the HTTP header to send the authentication token to Trivy server. Only application in `ClientServer` mode when `trivy.serverToken` is specified.|
|
|
||||||
| `trivy.serverInsecure`| N/A| The Flag to enable insecure connection to the Trivy server.|
|
|
||||||
| `trivy.insecureRegistry.<id>`| N/A| The registry to which insecure connections are allowed. There can be multiple registries with different registry `<id>`.|
|
|
||||||
| `trivy.nonSslRegistry.<id>`| N/A| A registry without SSL. There can be multiple registries with different registry `<id>`.|
|
|
||||||
| `trivy.registry.mirror.<registry>` | N/A| Mirror for the registry `<registry>`, e.g. `trivy.registry.mirror.index.docker.io: mirror.io` would use `mirror.io` to get images originated from `index.docker.io` |
|
|
||||||
| `trivy.httpProxy`| N/A| The HTTP proxy used by Trivy to download the vulnerabilities database from GitHub.|
|
|
||||||
| `trivy.httpsProxy`| N/A| The HTTPS proxy used by Trivy to download the vulnerabilities database from GitHub.|
|
|
||||||
| `trivy.noProxy`| N/A| A comma separated list of IPs and domain names that are not subject to proxy settings.|
|
|
||||||
| `trivy.resources.requests.cpu`| `100m`| The minimum amount of CPU required to run Trivy scanner pod.|
|
|
||||||
| `trivy.resources.requests.memory`| `100M`| The minimum amount of memory required to run Trivy scanner pod.|
|
|
||||||
| `trivy.resources.limits.cpu`| `500m`| The maximum amount of CPU allowed to run Trivy scanner pod.|
|
|
||||||
| `trivy.resources.limits.memory`| `500M`| The maximum amount of memory allowed to run Trivy scanner pod.|
|
|
||||||
|
|
||||||
| SECRET KEY| DESCRIPTION|
|
|
||||||
|---|---|
|
|
||||||
| `trivy.githubToken`| The GitHub access token used by Trivy to download the vulnerabilities database from GitHub. Only applicable in `Standalone` mode. |
|
|
||||||
| `trivy.serverToken`| The token to authenticate Trivy client with Trivy server. Only applicable in `ClientServer` mode.|
|
|
||||||
| `trivy.serverCustomHeaders`| A comma separated list of custom HTTP headers sent by Trivy client to Trivy server. Only applicable in `ClientServer` mode.|
|
|
||||||
|
|
||||||
[trivy-standalone]: https://aquasecurity.github.io/trivy/latest/modes/standalone/
|
|
||||||
[emptyDir volume]: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir
|
|
||||||
[rate limiting]: https://docs.github.com/en/free-pro-team@latest/rest/overview/resources-in-the-rest-api#rate-limiting
|
|
||||||
[trivy-clientserver]: https://aquasecurity.github.io/trivy/latest/advanced/modes/client-server/
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
# Frequently Asked Questions
|
|
||||||
|
|
||||||
## Why do you duplicate instances of VulnerabilityReports for the same image digest?
|
|
||||||
|
|
||||||
Docker image reference is not a first class citizen in Kubernetes. It's a
|
|
||||||
property of the container definition. Trivy-operator relies on label selectors to
|
|
||||||
associate VulnerabilityReports with corresponding Kubernetes workloads, not
|
|
||||||
particular image references. For example, we can get all reports for the
|
|
||||||
wordpress Deployment with the following command:
|
|
||||||
|
|
||||||
```text
|
|
||||||
kubectl get vulnerabilityreports \
|
|
||||||
-l trivy-operator.resource.kind=Deployment \
|
|
||||||
-l trivy-operator.resource.name=wordpress
|
|
||||||
```
|
|
||||||
|
|
||||||
Beyond that, for each instance of the VulnerabilityReports we set the owner
|
|
||||||
reference pointing to the corresponding pods controller. By doing that we can
|
|
||||||
manage orphaned VulnerabilityReports and leverage Kubernetes garbage collection.
|
|
||||||
For example, if the `wordpress` Deployment is deleted, all related
|
|
||||||
VulnerabilityReports are automatically garbage collected.
|
|
||||||
|
|
||||||
## Why do you create an instance of the VulnerabilityReport for each container?
|
|
||||||
The idea is to partition VulnerabilityReports generated for a particular
|
|
||||||
Kubernetes workload by containers is to mitigate the risk of exceeding the etcd
|
|
||||||
request payload limit. By default, the payload of each Kubernetes object stored
|
|
||||||
etcd is subject to 1.5 MiB.
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
# Vulnerability Scanners
|
|
||||||
|
|
||||||
Vulnerability scanning is an important way to identify and remediate security gaps in Kubernetes workloads. The
|
|
||||||
process involves scanning container images to check all software on them and report any vulnerabilities found.
|
|
||||||
|
|
||||||
Trivy Operator automatically discovers and scans all images that are being used in a Kubernetes cluster, including
|
|
||||||
images of application pods and system pods. Scan reports are saved as [VulnerabilityReport] resources, which are owned
|
|
||||||
by a Kubernetes controller.
|
|
||||||
|
|
||||||
For example, when Trivy scans a Deployment, the corresponding VulnerabilityReport instance is attached to its
|
|
||||||
current revision. In other words, the VulnerabilityReport inherits the life cycle of the Kubernetes controller. This
|
|
||||||
also implies that when a Deployment is rolling updated, it will get scanned automatically, and a new instance of the
|
|
||||||
VulnerabilityReport will be created and attached to the new revision. On the other hand, if the previous revision is
|
|
||||||
deleted, the corresponding VulnerabilityReport will be deleted automatically by the Kubernetes garbage collector.
|
|
||||||
|
|
||||||
Trivy may scan Kubernetes workloads that run images from [Private Registries] and certain [Managed Registries].
|
|
||||||
|
|
||||||
[VulnerabilityReport]: ./../crds/vulnerability-report.md
|
|
||||||
[Trivy]: ./trivy.md
|
|
||||||
[Private Registries]: ./private-registries.md
|
|
||||||
[Managed Registries]: ./managed-registries.md
|
|
||||||
@@ -1,77 +0,0 @@
|
|||||||
## Amazon Elastic Container Registry (ECR)
|
|
||||||
|
|
||||||
You must create an IAM OIDC identity provider for your cluster:
|
|
||||||
|
|
||||||
```
|
|
||||||
eksctl utils associate-iam-oidc-provider \
|
|
||||||
--cluster <cluster_name> \
|
|
||||||
--approve
|
|
||||||
```
|
|
||||||
|
|
||||||
Override the existing `trivy-operator` service account and
|
|
||||||
attach the IAM policy to grant it permission to pull images from the ECR:
|
|
||||||
|
|
||||||
```
|
|
||||||
eksctl create iamserviceaccount \
|
|
||||||
--name trivy-operator \
|
|
||||||
--namespace trivy-operator \
|
|
||||||
--cluster <cluster_name> \
|
|
||||||
--attach-policy-arn arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly \
|
|
||||||
--approve \
|
|
||||||
--override-existing-serviceaccounts
|
|
||||||
```
|
|
||||||
|
|
||||||
## Azure Container Registry (ACR)
|
|
||||||
|
|
||||||
Before you can start, you need to install `aad-pod-identity` inside your cluster, see installation instructions:
|
|
||||||
https://azure.github.io/aad-pod-identity/docs/getting-started/installation/
|
|
||||||
|
|
||||||
Create a managed identity and assign the permission to the ACR.
|
|
||||||
```sh
|
|
||||||
export IDENTITY_NAME=trivy-operator-identity
|
|
||||||
export AZURE_RESOURCE_GROUP=<my_resource_group>
|
|
||||||
export AZURE_LOCATION=westeurope
|
|
||||||
export ACR_NAME=<my_azure_container_registry>
|
|
||||||
|
|
||||||
az identity create --name ${IDENTITY_NAME} --resource-group ${AZURE_RESOURCE_GROUP} --location ${AZURE_LOCATION}
|
|
||||||
|
|
||||||
export IDENTITY_ID=(az identity show --name ${IDENTITY_NAME} --resource-group ${AZURE_RESOURCE_GROUP} --query id -o tsv)
|
|
||||||
export IDENTITY_CLIENT_ID=$(az identity show --name ${IDENTITY_NAME} --resource-group ${AZURE_RESOURCE_GROUP} --query clientId -o tsv)
|
|
||||||
export ACR_ID=$(az acr show --name ${ACR_NAME} --query id -o tsv)
|
|
||||||
|
|
||||||
az role assignment create --assignee ${IDENTITY_CLIENT_ID} --role 'AcrPull' --scope ${ACR_ID}
|
|
||||||
```
|
|
||||||
|
|
||||||
create an `AzureIdentity` and `AzureIdentityBinding` resource inside your kubernetes cluster:
|
|
||||||
```yaml
|
|
||||||
apiVersion: aadpodidentity.k8s.io/v1
|
|
||||||
kind: AzureIdentity
|
|
||||||
metadata:
|
|
||||||
name: trivy-identity
|
|
||||||
namespace: trivy-operator
|
|
||||||
spec:
|
|
||||||
clientID: ${IDENTITY_ID}
|
|
||||||
resourceID: ${IDENTITY_CLIENT_ID}
|
|
||||||
type: 0
|
|
||||||
```
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
apiVersion: aadpodidentity.k8s.io/v1
|
|
||||||
kind: AzureIdentityBinding
|
|
||||||
metadata:
|
|
||||||
name: trivy-id-binding
|
|
||||||
namespace: trivy-operator
|
|
||||||
spec:
|
|
||||||
azureIdentity: trivy-operator-identity
|
|
||||||
selector: trivy-operator-label
|
|
||||||
```
|
|
||||||
|
|
||||||
add `scanJob.podTemplateLabels` to the Trivy Operator config map, the value must match the `AzureIdentityBinding` selector.
|
|
||||||
|
|
||||||
```sh
|
|
||||||
kubectl -n trivy-operator edit cm trivy-operator
|
|
||||||
# Insert scanJob.podTemplateLabels: aadpodidbinding=trivy-operator-label in data block
|
|
||||||
|
|
||||||
# validate
|
|
||||||
trivy-operator config --get scanJob.podTemplateLabels
|
|
||||||
```
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
# vs cfsec
|
|
||||||
[cfsec][cfsec] uses static analysis of your CloudFormation templates to spot potential security issues.
|
|
||||||
Trivy uses cfsec internally to scan both JSON and YAML configuration files, but Trivy doesn't support some features provided by cfsec.
|
|
||||||
This section describes the differences between Trivy and cfsec.
|
|
||||||
|
|
||||||
| Feature | Trivy | cfsec |
|
|
||||||
|-----------------------|--------------------------------------------------------|------------------------------|
|
|
||||||
| Built-in Policies | :material-check: | :material-check: |
|
|
||||||
| Custom Policies | :material-check: | :material-close: |
|
|
||||||
| Policy Metadata[^1] | :material-check: | :material-check: |
|
|
||||||
| Show Successes | :material-check: | :material-check: |
|
|
||||||
| Disable Policies | :material-check: | :material-check: |
|
|
||||||
| Show Issue Lines | :material-check: | :material-check: |
|
|
||||||
| View Statistics | :material-close: | :material-check: |
|
|
||||||
| Filtering by Severity | :material-check: | :material-close: |
|
|
||||||
| Supported Formats | Dockerfile, JSON, YAML, Terraform, CloudFormation etc. | CloudFormation JSON and YAML |
|
|
||||||
|
|
||||||
[^1]: To enrich the results such as ID, Title, Description, Severity, etc.
|
|
||||||
|
|
||||||
cfsec is designed for CloudFormation.
|
|
||||||
People who use only want to scan their CloudFormation templates should use cfsec.
|
|
||||||
People who want to scan a wide range of configuration files should use Trivy.
|
|
||||||
|
|
||||||
[cfsec]: https://github.com/aquasecurity/cfsec
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
# vs Conftest
|
|
||||||
[Conftest][conftest] is a really nice tool to help you write tests against structured configuration data.
|
|
||||||
Misconfiguration detection in Trivy is heavily inspired by Conftest and provides similar features Conftest has.
|
|
||||||
This section describes the differences between Trivy and Conftest.
|
|
||||||
|
|
||||||
| Feature | Trivy | Conftest |
|
|
||||||
| --------------------------- | -------------------- | -------------------- |
|
|
||||||
| Support Rego Language | :material-check: | :material-check: |
|
|
||||||
| Built-in Policies | :material-check: | :material-close: |
|
|
||||||
| Custom Policies | :material-check: | :material-check: |
|
|
||||||
| Custom Data | :material-check: | :material-check: |
|
|
||||||
| Combine | :material-check: | :material-check: |
|
|
||||||
| Combine per Policy | :material-check: | :material-close: |
|
|
||||||
| Policy Input Selector[^1] | :material-check: | :material-close: |
|
|
||||||
| Policy Metadata[^2] | :material-check: | :material-close:[^3] |
|
|
||||||
| Filtering by Severity | :material-check: | :material-close: |
|
|
||||||
| Rule-based Exceptions | :material-check: | :material-check: |
|
|
||||||
| Namespace-based Exceptions | :material-check: | :material-close: |
|
|
||||||
| Sharing Policies | :material-close: | :material-check: |
|
|
||||||
| Show Successes | :material-check: | :material-close: |
|
|
||||||
| Flexible Exit Code | :material-check: | :material-close: |
|
|
||||||
| Rego Unit Tests | :material-close:[^4] | :material-check: |
|
|
||||||
| Go Testing | :material-check: | :material-close: |
|
|
||||||
| Verbose Trace | :material-check: | :material-check: |
|
|
||||||
| Supported Formats | 6 formats[^5] | 14 formats[^6] |
|
|
||||||
|
|
||||||
Trivy offers built-in policies and a variety of options, while Conftest only supports custom policies.
|
|
||||||
In other words, Conftest is simpler and lighter.
|
|
||||||
|
|
||||||
Conftest is a general testing tool for configuration files, and Trivy is more security-focused.
|
|
||||||
People who need an out-of-the-box misconfiguration scanner should use Trivy.
|
|
||||||
People who don't need built-in policies and write your policies should use Conftest.
|
|
||||||
|
|
||||||
[^1]: Pass only the types of configuration file as input, specified in selector
|
|
||||||
[^2]: To enrich the results such as ID, Title, Description, etc.
|
|
||||||
[^3]: Conftest supports [structured errors in rules][conftest-structured], but they are free format and not natively supported by Conftest.
|
|
||||||
[^4]: Trivy is not able to run `*_test.rego` like `conftest verify`.
|
|
||||||
[^5]: Dockerfile, HCL, HCL2, JSON, TOML, and YAML
|
|
||||||
[^6]: CUE, Dockerfile, EDN, HCL, HCL2, HOCON, Ignore files, INI, JSON, Jsonnet, TOML, VCL, XML, and YAML
|
|
||||||
|
|
||||||
|
|
||||||
[conftest-structured]: https://github.com/open-policy-agent/conftest/pull/243
|
|
||||||
[conftest]: https://github.com/open-policy-agent/conftest
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
# vs tfsec
|
|
||||||
[tfsec][tfsec] uses static analysis of your Terraform templates to spot potential security issues.
|
|
||||||
Trivy uses tfsec internally to scan Terraform HCL files, but Trivy doesn't support some features provided by tfsec.
|
|
||||||
This section describes the differences between Trivy and tfsec.
|
|
||||||
|
|
||||||
| Feature | Trivy | tfsec |
|
|
||||||
|-----------------------|--------------------------------------------------------|----------------------|
|
|
||||||
| Built-in Policies | :material-check: | :material-check: |
|
|
||||||
| Custom Policies | Rego | Rego, JSON, and YAML |
|
|
||||||
| Policy Metadata[^1] | :material-check: | :material-check: |
|
|
||||||
| Show Successes | :material-check: | :material-check: |
|
|
||||||
| Disable Policies | :material-check: | :material-check: |
|
|
||||||
| Show Issue Lines | :material-check: | :material-check: |
|
|
||||||
| Support .tfvars | :material-close: | :material-check: |
|
|
||||||
| View Statistics | :material-close: | :material-check: |
|
|
||||||
| Filtering by Severity | :material-check: | :material-check: |
|
|
||||||
| Supported Formats | Dockerfile, JSON, YAML, Terraform, CloudFormation etc. | Terraform |
|
|
||||||
|
|
||||||
[^1]: To enrich the results such as ID, Title, Description, Severity, etc.
|
|
||||||
|
|
||||||
tfsec is designed for Terraform.
|
|
||||||
People who use only Terraform should use tfsec.
|
|
||||||
People who want to scan a wide range of configuration files should use Trivy.
|
|
||||||
|
|
||||||
[tfsec]: https://github.com/aquasecurity/tfsec
|
|
||||||
@@ -1,184 +0,0 @@
|
|||||||
# Custom Policies
|
|
||||||
|
|
||||||
## Overview
|
|
||||||
You can write custom policies in [Rego][rego].
|
|
||||||
Once you finish writing custom policies, you can pass the directory where those policies are stored with `--policy` option.
|
|
||||||
|
|
||||||
``` bash
|
|
||||||
trivy conf --policy /path/to/custom_policies --namespaces user /path/to/config_dir
|
|
||||||
```
|
|
||||||
|
|
||||||
As for `--namespaces` option, the detail is described as below.
|
|
||||||
|
|
||||||
### File formats
|
|
||||||
If a file name matches the following file patterns, Trivy will parse the file and pass it as input to your Rego policy.
|
|
||||||
|
|
||||||
| File format | File pattern |
|
|
||||||
| ------------- | --------------------------------------------------------- |
|
|
||||||
| JSON | `*.json` |
|
|
||||||
| YAML | `*.yaml` |
|
|
||||||
| TOML | `*.toml` |
|
|
||||||
| HCL | `*.hcl`, `*.hcl1`, and `*.hcl2` |
|
|
||||||
| Dockerfile | `Dockerfile`, `Dockerfile.*`, and `*.Dockerfile` |
|
|
||||||
| Containerfile | `Containerfile`, `Containerfile.*`, and `*.Containerfile` |
|
|
||||||
|
|
||||||
### Configuration languages
|
|
||||||
In the above general file formats, Trivy automatically identifies the following types of configuration files:
|
|
||||||
|
|
||||||
- Ansible (YAML)
|
|
||||||
- CloudFormation (JSON/YAML)
|
|
||||||
- Kubernetes (JSON/YAML)
|
|
||||||
|
|
||||||
This is useful for filtering inputs, as described below.
|
|
||||||
|
|
||||||
!!! warning
|
|
||||||
Custom policies do not support Terraform at the moment.
|
|
||||||
|
|
||||||
## Rego format
|
|
||||||
A single package must contain only one policy.
|
|
||||||
|
|
||||||
!!!example
|
|
||||||
``` rego
|
|
||||||
package user.kubernetes.ID001
|
|
||||||
|
|
||||||
__rego_metadata__ := {
|
|
||||||
"id": "ID001",
|
|
||||||
"title": "Deployment not allowed",
|
|
||||||
"severity": "LOW",
|
|
||||||
"type": "Custom Kubernetes Check",
|
|
||||||
"description": "Deployments are not allowed because of some reasons.",
|
|
||||||
}
|
|
||||||
|
|
||||||
__rego_input__ := {
|
|
||||||
"selector": [
|
|
||||||
{"type": "kubernetes"},
|
|
||||||
],
|
|
||||||
}
|
|
||||||
|
|
||||||
deny[msg] {
|
|
||||||
input.kind == "Deployment"
|
|
||||||
msg = sprintf("Found deployment '%s' but deployments are not allowed", [input.metadata.name])
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
In this example, ID001 "Deployment not allowed" is defined under `user.kubernetes.ID001`.
|
|
||||||
If you add a new custom policy, it must be defined under a new package like `user.kubernetes.ID002`.
|
|
||||||
|
|
||||||
### Policy structure
|
|
||||||
|
|
||||||
`package` (required)
|
|
||||||
: - MUST follow the Rego's [specification][package]
|
|
||||||
- MUST be unique per policy
|
|
||||||
- SHOULD include policy id for uniqueness
|
|
||||||
- MAY include the group name such as `kubernetes` for clarity
|
|
||||||
- Group name has no effect on policy evaluation
|
|
||||||
|
|
||||||
`__rego_metadata__` (optional)
|
|
||||||
: - SHOULD be defined for clarity since these values will be displayed in the scan results
|
|
||||||
|
|
||||||
`__rego_input__` (optional)
|
|
||||||
: - MAY be defined when you want to specify input format
|
|
||||||
|
|
||||||
`deny` (required)
|
|
||||||
: - SHOULD be `deny` or start with `deny_`
|
|
||||||
- Although `warn`, `warn_*`, `violation`, `violation_` also work for compatibility, `deny` is recommended as severity can be defined in `__rego_metadata__`.
|
|
||||||
- SHOULD return `string`
|
|
||||||
- Although `object` with `msg` field is accepted, other fields are dropped and `string` is recommended.
|
|
||||||
- e.g. `{"msg": "deny message", "details": "something"}`
|
|
||||||
|
|
||||||
|
|
||||||
### Package
|
|
||||||
A package name must be unique per policy.
|
|
||||||
|
|
||||||
!!!example
|
|
||||||
``` rego
|
|
||||||
package user.kubernetes.ID001
|
|
||||||
```
|
|
||||||
|
|
||||||
By default, only `builtin.*` packages will be evaluated.
|
|
||||||
If you define custom packages, you have to specify the package prefix via `--namespaces` option.
|
|
||||||
|
|
||||||
``` bash
|
|
||||||
trivy conf --policy /path/to/custom_policies --namespaces user /path/to/config_dir
|
|
||||||
```
|
|
||||||
|
|
||||||
In this case, `user.*` will be evaluated.
|
|
||||||
Any package prefixes such as `main` and `user` are allowed.
|
|
||||||
|
|
||||||
### Metadata
|
|
||||||
Metadata helps enrich Trivy's scan results with useful information.
|
|
||||||
|
|
||||||
!!!example
|
|
||||||
``` rego
|
|
||||||
__rego_metadata__ := {
|
|
||||||
"id": "ID001",
|
|
||||||
"title": "Deployment not allowed",
|
|
||||||
"severity": "LOW",
|
|
||||||
"type": "Custom Kubernetes Check",
|
|
||||||
"description": "Deployments are not allowed because of some reasons.",
|
|
||||||
"recommended_actions": "Remove Deployment",
|
|
||||||
"url": "https://cloud.google.com/blog/products/containers-kubernetes/kubernetes-best-practices-resource-requests-and-limits",
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
All fields under `__rego_metadata__` are optional.
|
|
||||||
|
|
||||||
| Field name | Allowed values | Default value | In table | In JSON |
|
|
||||||
| ------------------ | ------------------------------------| :-----------: | :----------------: |:---------------: |
|
|
||||||
| id | Any characters | N/A | :material-check: | :material-check: |
|
|
||||||
| title | Any characters | N/A | :material-check: | :material-check: |
|
|
||||||
| severity | `LOW`, `MEDIUM`, `HIGH`, `CRITICAL` | UNKNOWN | :material-check: | :material-check: |
|
|
||||||
| type | Any characters | N/A | :material-check: | :material-check: |
|
|
||||||
| description | Any characters | | :material-close: | :material-check: |
|
|
||||||
| recommended_actions| Any characters | | :material-close: | :material-check: |
|
|
||||||
| url | Any characters | | :material-close: | :material-check: |
|
|
||||||
|
|
||||||
Some fields are displayed in scan results.
|
|
||||||
|
|
||||||
``` bash
|
|
||||||
deployment.yaml (kubernetes)
|
|
||||||
============================
|
|
||||||
Tests: 28 (SUCCESSES: 14, FAILURES: 14, EXCEPTIONS: 0)
|
|
||||||
Failures: 14 (HIGH: 1)
|
|
||||||
|
|
||||||
+---------------------------+------------+-------------------------------------+----------+------------------------------------------+
|
|
||||||
| TYPE | MISCONF ID | CHECK | SEVERITY | MESSAGE |
|
|
||||||
+---------------------------+------------+-------------------------------------+----------+------------------------------------------+
|
|
||||||
| Custom Kubernetes Check | ID001 | Deployment not allowed | LOW | Found deployment 'test' but deployments |
|
|
||||||
| | | | | are not allowed |
|
|
||||||
+---------------------------+------------+-------------------------------------+----------+------------------------------------------+
|
|
||||||
```
|
|
||||||
|
|
||||||
### Input
|
|
||||||
You can specify input format via `__rego_input__`.
|
|
||||||
All fields under `__rego_input` are optional.
|
|
||||||
|
|
||||||
!!!example
|
|
||||||
``` rego
|
|
||||||
__rego_input__ := {
|
|
||||||
"combine": false,
|
|
||||||
"selector": [
|
|
||||||
{"type": "kubernetes"},
|
|
||||||
],
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
`combine` (boolean)
|
|
||||||
: The details is [here](combine.md).
|
|
||||||
|
|
||||||
`selector` (array)
|
|
||||||
: This option filters the input by file formats or configuration languages.
|
|
||||||
In the above example, Trivy passes only Kubernetes files to this policy.
|
|
||||||
Even if Dockerfile exists in the specified directory, it will not be passed to the policy as input.
|
|
||||||
|
|
||||||
When configuration language such as Kubernetes is not identified, file format such as JSON will be used as `type`.
|
|
||||||
When configuration language is identified, it will overwrite `type`.
|
|
||||||
|
|
||||||
!!! example
|
|
||||||
`pod.yaml` including Kubernetes Pod will be handled as `kubernetes`, not `yaml`.
|
|
||||||
`type` is overwritten by `kubernetes` from `yaml`.
|
|
||||||
|
|
||||||
`type` accepts `kubernetes`, `dockerfile`, `ansible`, `cloudformation`, `json`, `yaml`, `toml`, or `hcl`.
|
|
||||||
|
|
||||||
[rego]: https://www.openpolicyagent.org/docs/latest/policy-language/
|
|
||||||
[package]: https://www.openpolicyagent.org/docs/latest/policy-language/#packages
|
|
||||||