Skip to content

Commit

Permalink
feat: support config scanning (aquasecurity#931)
Browse files Browse the repository at this point in the history
  • Loading branch information
knqyf263 authored Jul 9, 2021
1 parent 712f9eb commit a0e5c3a
Show file tree
Hide file tree
Showing 122 changed files with 4,385 additions and 1,112 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ jobs:
scan-type: 'fs'
exit-code: '1'
severity: 'CRITICAL'
skip-dirs: integration

- name: Run Trivy vulnerability scanner to scan for Medium and High Vulnerabilities
uses: aquasecurity/trivy-action@master
with:
scan-type: 'fs'
exit-code: '0'
severity: 'HIGH,MEDIUM'
severity: 'HIGH,MEDIUM'
skip-dirs: integration
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ thumbs.db

# test fixtures
coverage.txt
integration/testdata/fixtures/
integration/testdata/fixtures/images

# SBOMs generated during CI
/bom.json
9 changes: 3 additions & 6 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ linters-settings:
check-shadowing: false
gofmt:
simplify: false
golint:
min-confidence: 0
revive:
ignore-generated-header: true
gocyclo:
min-complexity: 10
maligned:
suggest-new: true
dupl:
threshold: 100
goconst:
Expand All @@ -32,14 +30,13 @@ linters:
- errcheck
- varcheck
- deadcode
- golint
- revive
- gosec
- unconvert
- goconst
- gocyclo
- gofmt
- goimports
- maligned
- misspell

run:
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ $(GOBIN)/golangci-lint:
test:
go test -v -short -coverprofile=coverage.txt -covermode=atomic ./...

integration/testdata/fixtures/*.tar.gz:
git clone https://github.com/aquasecurity/trivy-test-images.git integration/testdata/fixtures
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/*.tar.gz
test-integration: integration/testdata/fixtures/images/*.tar.gz
go test -v -tags=integration ./integration/...

.PHONY: lint
Expand All @@ -62,7 +62,7 @@ install:

.PHONY: clean
clean:
rm -rf integration/testdata/fixtures/
rm -rf integration/testdata/fixtures/images

$(GOBIN)/labeler:
go install github.com/knqyf263/labeler@latest
Expand Down
Loading

0 comments on commit a0e5c3a

Please sign in to comment.