add security scan

This commit is contained in:
Ruidy 2022-03-31 11:29:26 -04:00
parent 7cdbf7717f
commit a8a485a537
4 changed files with 11 additions and 2 deletions

View file

@ -5,3 +5,4 @@
.idea/ .idea/
.golangci.yml .golangci.yml
coverage.out coverage.out
.trivycache/

1
.gitignore vendored
View file

@ -58,3 +58,4 @@ Network Trash Folder
Temporary Items Temporary Items
.apdisk .apdisk
docs/public docs/public
.trivycache/

View file

@ -1,4 +1,5 @@
TEST = "go test ./... -coverpkg=./... -coverprofile coverage.out -covermode=count; go tool cover -func coverage.out; rm coverage.out" TEST = "go test ./... -coverpkg=./... -coverprofile coverage.out -covermode=count; go tool cover -func coverage.out; rm coverage.out"
IMAGE=underscore
build: build:
docker build -t underscore:latest . docker build -t underscore:latest .
@ -6,6 +7,12 @@ build:
test: build test: build
docker run --name underscore --rm -i -t underscore sh -c $(TEST) docker run --name underscore --rm -i -t underscore sh -c $(TEST)
scan:
trivy --cache-dir .trivycache/ image --exit-code 0 --no-progress --severity CRITICAL $(IMAGE)
scan-config:
trivy config .
docs: docs:
cd docs && hugo server -D cd docs && hugo server -D

View file

@ -1,5 +1,5 @@
--- ---
title: underscore title: _Underscore
--- ---
![License](https://img.shields.io/github/license/rjNemo/underscore?style=for-the-badge) ![License](https://img.shields.io/github/license/rjNemo/underscore?style=for-the-badge)