Skip to content

Commit b0d7a99

Browse files
Merge pull request #70 from easy-up/main
fix: crash bug when adding a bundle file with no tag
2 parents 010a2e4 + bc048e0 commit b0d7a99

16 files changed

Lines changed: 306 additions & 74 deletions

File tree

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [UNRELEASED]
99

10+
## [0.8.0] - 2024-10-23
11+
12+
* Fixed a bug where validation failures were not resulting in a non-zero exit code
13+
* Renamed the --file / -f CLI argument to --config / -f for consistency with other tools
14+
* improvements to validate output
15+
These "improvements" are short term hacks. There is a need for a fundamental
16+
overhaul of how output is generated to improve usability
17+
* Implemented code coverage support.
18+
* Updated the docs to reflect the removal of the --all flag
19+
20+
## [0.7.6] - 2024-09-08
21+
22+
### Fixed
23+
24+
- Crash when running `gatecheck bundle add` with no tags
25+
1026
## [0.7.5] - 2024-06-18
1127

1228
### Fixed

cmd/cli-config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ var RuntimeConfig = metaConfig{
4545
BundleTag: configkit.MetaField{
4646
FieldName: "BundleTag",
4747
EnvKey: "GATECHECK_BUNDLE_TAG",
48-
DefaultValue: "",
48+
DefaultValue: []string{},
4949
FlagValueP: new([]string),
5050
EnvToValueFunc: func(s string) any {
5151
return strings.Split(s, ",")
@@ -165,7 +165,7 @@ var RuntimeConfig = metaConfig{
165165
CobraSetupFunc: func(f configkit.MetaField, cmd *cobra.Command) {
166166
valueP := f.FlagValueP.(*string)
167167
usage := f.Metadata[metadataFlagUsage]
168-
cmd.PersistentFlags().StringVarP(valueP, "file", "f", "", usage)
168+
cmd.PersistentFlags().StringVarP(valueP, "config", "f", "", usage)
169169
},
170170
Metadata: map[string]string{
171171
metadataFlagUsage: "a validation configuration file",

cmd/validate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ var validateCmd = &cobra.Command{
6969
return nil
7070
}
7171

72-
return nil
72+
return err
7373
},
7474
}
7575

demos/bundle.tape

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Set Width 1800
1010

1111
Output dist/gatecheck-bundle.gif
1212

13-
Type "gatecheck ls --all grype-report.json | less"
13+
Type "gatecheck ls grype-report.json | less"
1414
Sleep 1
1515
Enter
1616
Sleep 5

demos/list.tape

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Set Width 1600
1010

1111
Output dist/gatecheck-list.gif
1212

13-
Type "grype ubuntu:latest -o json | gatecheck ls --all -i grype | less"
13+
Type "grype ubuntu:latest -o json | gatecheck ls -i grype | less"
1414
Sleep 1
1515
Enter
1616

demos/validate.tape

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Set Width 1700
1010

1111
Output dist/gatecheck-validate.gif
1212

13-
Type "gatecheck ls --all grype-report.json | less"
13+
Type "gatecheck ls grype-report.json | less"
1414
Sleep 1
1515
Enter
1616
Sleep 5
-327 KB
Binary file not shown.

docs/list-reports.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,3 @@ gatecheck ls grype-scan-report.json
2222
```
2323

2424
![Screenshot Example List](assets/screenshot-grype-list.png)
25-
26-
Using the `--all` or `-a` flag will do a full listing, cross-referencing with FIRST EPSS API
27-
28-
```shell
29-
grype bkimminich/juice-shop:latest -o json | gatecheck ls --all -i grype
30-
```
31-
32-
![Screenshot Example List All](assets/screenshot-grype-list-all.png)

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ require (
1414
)
1515

1616
require (
17+
github.com/easy-up/go-coverage v0.0.0-20241018034313-3de592d59a78 // indirect
1718
github.com/fsnotify/fsnotify v1.7.0 // indirect
1819
github.com/hashicorp/hcl v1.0.0 // indirect
1920
github.com/inconshreveable/mousetrap v1.1.0 // indirect

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1
55
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
66
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
77
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
8+
github.com/easy-up/go-coverage v0.0.0-20241018034313-3de592d59a78 h1:e2x+TfIgebN3zfr8wGqAYI9lK4ql7Rut6OTEhBmJr5k=
9+
github.com/easy-up/go-coverage v0.0.0-20241018034313-3de592d59a78/go.mod h1:fsSINOc273zPnsBaKNjNffZXZpicAArpv/cTiFYgPys=
810
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
911
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
1012
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=

0 commit comments

Comments
 (0)