Skip to content

Commit

Permalink
fix cve report generator workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Feb 18, 2024
1 parent c13ae75 commit 53d9cce
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 396 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/cve-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,14 @@ jobs:
- name: Generate report
run: |
./hack/scripts/update-chart-dependencies.sh
go run ./cmd/generate-cve-report/main.go
- name: Update repo
run: |
git add --all
if [[ $(git status --porcelain) ]]; then
git commit -s -a -m "update redis images $(date --rfc-3339=date)"
git commit -s -a -m "update cve report $(date --rfc-3339=date)"
git fetch origin
# https://git-scm.com/docs/merge-strategies
git pull --rebase -s ours origin master
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ ct: $(BUILD_DIRS)
ct $(CT_COMMAND) --debug --validate-maintainers=false $(CT_ARGS) \
"

ADDTL_LINTERS := goconst,gofmt,goimports,unparam
ADDTL_LINTERS := gofmt,goimports,unparam

.PHONY: lint
lint: $(BUILD_DIRS)
Expand All @@ -394,7 +394,7 @@ lint: $(BUILD_DIRS)
--env GO111MODULE=on \
--env GOFLAGS="-mod=vendor" \
$(BUILD_IMAGE) \
golangci-lint run --enable $(ADDTL_LINTERS) --timeout=10m --skip-files="generated.*\.go$\" --skip-dirs-use-default --skip-dirs=client,vendor
golangci-lint run --enable $(ADDTL_LINTERS) --max-same-issues=100 --timeout=10m --skip-files="generated.*\.go$\" --skip-dirs-use-default --skip-dirs=client,vendor

$(BUILD_DIRS):
@mkdir -p $@
Expand Down
2 changes: 0 additions & 2 deletions cmd/generate-cve-report/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,6 @@ func GatherReport() ([]CVEReport, error) {
setReport(report, &cveReport)
}
reports = append(reports, cveReport)

break
}

return reports, nil
Expand Down
2 changes: 1 addition & 1 deletion cmd/lib/trivy.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func Scan(sh *shell.Session, img string) (*trivy.SingleReport, error) {
args := []any{
"image",
img,
"--security-checks", "vuln",
"--scanners", "vuln",
"--format", "json",
"--ignore-unfixed",
// "--quiet",
Expand Down
Loading

0 comments on commit 53d9cce

Please sign in to comment.