Skip to content

Commit 3206bd1

Browse files
fix: epss schema parsing
1 parent b0d7a99 commit 3206bd1

4 files changed

Lines changed: 95 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [UNRELEASED]
99

10+
### Fixed
11+
12+
- Updated EPSS schema to work with 3.14.2025
13+
1014
## [0.8.0] - 2024-10-23
1115

1216
* Fixed a bug where validation failures were not resulting in a non-zero exit code
1317
* Renamed the --file / -f CLI argument to --config / -f for consistency with other tools
14-
* improvements to validate output
18+
* improvements to validate output
1519
These "improvements" are short term hacks. There is a need for a fundamental
1620
overhaul of how output is generated to improve usability
1721
* Implemented code coverage support.

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
[![Go Reference](https://pkg.go.dev/badge/github.com/gatecheckdev/gatecheck.svg)](https://pkg.go.dev/github.com/gatecheckdev/gatecheck)
44
[![Go Report Card](https://goreportcard.com/badge/github.com/gatecheckdev/gatecheck)](https://goreportcard.com/report/github.com/gatecheckdev/gatecheck)
55

6-
76
![Gatecheck Logo](https://static.gatecheck.dev/gatecheck-logo-splash-dark.png)
87

98
Gatecheck automates report validation in a CI/CD Pipeline by comparing security findings to pre-determined thresholds.

Taskfile.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
version: "3"
2+
3+
env:
4+
INSTALL_DIR: "/usr/local/bin"
5+
IMAGE_TAG: "gatecheck:latest"
6+
7+
tasks:
8+
build:
9+
desc: "Build the gatecheck binary"
10+
vars:
11+
BUILD_DATE: '{{dateInZone "2006-01-02T15:04:05Z" now "UTC"}}'
12+
CLI_VERSION:
13+
sh: git describe --tags || git rev-parse --short HEAD || "v0.0.0-unknown"
14+
GIT_COMMIT:
15+
sh: git rev-parse HEAD
16+
GIT_DESCRIPTION:
17+
sh: git log -1 --pretty=%B
18+
cmds:
19+
- mkdir -p bin
20+
- go build -ldflags="-X 'main.cliVersion={{.CLI_VERSION}}' -X 'main.gitCommit={{.GIT_COMMIT}}' -X 'main.buildDate={{.BUILD_DATE}}' -X 'main.gitDescription={{.GIT_DESCRIPTION}}'" -o ./bin ./cmd/gatecheck
21+
sources:
22+
- cmd/*
23+
- pkg/*
24+
- go*
25+
generates:
26+
- bin/gatecheck
27+
28+
install:
29+
desc: "Install the gatecheck binary"
30+
prompt: 'Install gatecheck binary to {{joinPath .INSTALL_DIR "gatecheck"}} ...Continue?'
31+
deps:
32+
- build
33+
cmds:
34+
- cp ./bin/gatecheck {{joinPath .INSTALL_DIR "gatecheck"}}
35+
sources:
36+
- ./bin/gatecheck
37+
generates:
38+
- '{{joinPath .INSTALL_DIR "gatecheck"}}'
39+
40+
uninstall:
41+
desc: "Uninstall the gatecheck binary"
42+
prompt: 'Will remove binary {{joinPath .INSTALL_DIR "gatecheck"}}'
43+
cmds:
44+
- rm '{{joinPath .INSTALL_DIR "gatecheck"}}'
45+
46+
test:
47+
desc: "Run unit tests with coverage"
48+
cmds:
49+
- go test -cover ./...
50+
51+
lint:
52+
desc: "Run golangci-lint in view-only mode"
53+
cmds:
54+
- golangci-lint run --fast
55+
56+
fix:
57+
desc: "Fix linting errors and format code"
58+
cmds:
59+
- golangci-lint run --fast --fix
60+
61+
release-snapshot:
62+
desc: "Create a snapshot release"
63+
cmds:
64+
- goreleaser release --snapshot --rm-dist
65+
66+
release:
67+
desc: "Create a release"
68+
cmds:
69+
- goreleaser release --rm-dist
70+
71+
upgrade:
72+
desc: "Upgrade package dependencies"
73+
preconditions:
74+
- sh: git status --porcelain | grep -q .
75+
msg: "Repository is dirty, commit changes before upgrading."
76+
cmds:
77+
- go get -u ./...
78+
- go mod tidy
79+
80+
serve-docs:
81+
desc: "Serve documentation locally"
82+
cmds:
83+
- mdbook serve
84+
85+
clean:
86+
desc: "Clean up build directory"
87+
cmds:
88+
- rm -rf ./bin

pkg/epss/epss.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ import (
1717
)
1818

1919
const (
20-
dataModel = "v2023.03.01"
21-
modelDateLayout = "2006-01-02T15:04:05-0700"
20+
dataModel = "v2025.03.14"
21+
modelDateLayout = "2006-01-02T15:04:05Z"
2222
defaultEPSSURL = "https://epss.cyentia.com"
2323
)
2424

0 commit comments

Comments
 (0)