Commit a587d03
authored
feat(scan): current and released package scan (#65)
* feat(scan): zarf and release scanning with grype
* added missing license
* added a comment
* drop -v for verbose output - it's already used for version
* add missing check for errors on mkdirtemp
* slog logging
* add some colors to logging
* dropped zarf package loader deps, switched to a supported yaml lib
* minor fixes
* drop unnecessary oci url building
* minor clean up
* added scan and compare
* added an option to override image name - if image name changed between the released and the current version
* generated some e2e tests
* sth working
* separate mock files
* e2e tests for scan commands
* lint fixes
* added missing license
* explicitly ignore fprintf error
* drop unnecessary todos
* minor fix
* fix comment
* switch scanning commands to structs
* switch scanning commands to structs
* reworks - batch 1
* simplified fetching sboms for flavors logic
* more rework
* try direct defer calls
* try to silence linter when swallowing irrelevant errors
* refactored commands - not working fetching
* superfluous logging
* fixed running
* switched to `flags` for flag parsing in grype mock
* a bit of rework + fixing lint errors
* rearranged the commands to be under `scan` parent command
* pulled out exec function to options
* drop overcomplicated Close() error swallowing
* drop more overcomplicated Close() error swallowing1 parent 62f3acd commit a587d03
File tree
10 files changed
+1585
-24
lines changed- src
- cmd
- scan
- test/e2e
- utils
10 files changed
+1585
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| 17 | + | |
| 18 | + | |
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
| |||
83 | 86 | | |
84 | 87 | | |
85 | 88 | | |
86 | | - | |
87 | 89 | | |
88 | 90 | | |
89 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
| 129 | + | |
128 | 130 | | |
129 | 131 | | |
130 | 132 | | |
| |||
275 | 277 | | |
276 | 278 | | |
277 | 279 | | |
| 280 | + | |
| 281 | + | |
278 | 282 | | |
279 | 283 | | |
280 | 284 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
| 12 | + | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| |||
15 | 19 | | |
16 | 20 | | |
17 | 21 | | |
18 | | - | |
19 | | - | |
| 22 | + | |
| 23 | + | |
20 | 24 | | |
21 | 25 | | |
22 | 26 | | |
| |||
52 | 56 | | |
53 | 57 | | |
54 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
55 | 101 | | |
56 | 102 | | |
57 | 103 | | |
| |||
62 | 108 | | |
63 | 109 | | |
64 | 110 | | |
| 111 | + | |
| 112 | + | |
65 | 113 | | |
66 | 114 | | |
67 | 115 | | |
| |||
0 commit comments