Skip to content

Commit

Permalink
Add secret scanning custom rules (#101)
Browse files Browse the repository at this point in the history
* added trivy custom secret scanning rules

* check error

* use writeFile

* add tests

* yaml validate

* yamllint fix

* fix lint
  • Loading branch information
VaismanLior authored May 11, 2022
1 parent 3f908cb commit 12e4207
Show file tree
Hide file tree
Showing 6 changed files with 590 additions and 49 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ on:
pull_request:

jobs:
validate-secrets-yaml:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Validate YAML file
run: yamllint -d relaxed pkg/scanner/trivy-secret.yaml

build:
name: testing PR build
runs-on: ubuntu-latest
Expand Down
26 changes: 13 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module github.com/aquasecurity/trivy-plugin-aqua
go 1.18

require (
github.com/aquasecurity/fanal v0.0.0-20220426115253-1d75fc0c7219
github.com/aquasecurity/go-dep-parser v0.0.0-20220422134844-880747206031
github.com/aquasecurity/fanal v0.0.0-20220503163617-7b81bb08565f
github.com/aquasecurity/go-dep-parser v0.0.0-20220503151658-d316f5cc2cff
github.com/aquasecurity/trivy v0.27.1-0.20220426130527-b6baa65ff20b
github.com/aquasecurity/trivy-db v0.0.0-20220327074450-74195d9604b2
github.com/mitchellh/mapstructure v1.5.0
Expand All @@ -24,7 +24,7 @@ require (
cloud.google.com/go/storage v1.14.0 // indirect
github.com/Azure/azure-sdk-for-go v63.0.0+incompatible // indirect
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
github.com/Azure/go-autorest/autorest v0.11.25 // indirect
github.com/Azure/go-autorest/autorest v0.11.27 // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.18 // indirect
github.com/Azure/go-autorest/autorest/azure/auth v0.5.11 // indirect
github.com/Azure/go-autorest/autorest/azure/cli v0.4.5 // indirect
Expand All @@ -39,29 +39,29 @@ require (
github.com/Masterminds/semver/v3 v3.1.1 // indirect
github.com/Masterminds/sprig/v3 v3.2.2 // indirect
github.com/Microsoft/go-winio v0.5.1 // indirect
github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46 // indirect
github.com/NYTimes/gziphandler v1.1.1 // indirect
github.com/OneOfOne/xxhash v1.2.8 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 // indirect
github.com/VividCortex/ewma v1.1.1 // indirect
github.com/acomagu/bufpipe v1.0.3 // indirect
github.com/agext/levenshtein v1.2.3 // indirect
github.com/apparentlymart/go-cidr v1.1.0 // indirect
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
github.com/aquasecurity/defsec v0.28.5-0.20220416075528-0f0c8fdf63b8 // indirect
github.com/aquasecurity/defsec v0.28.5-0.20220426090908-0df04f1fa28b // indirect
github.com/aquasecurity/go-gem-version v0.0.0-20201115065557-8eed6fe000ce // indirect
github.com/aquasecurity/go-npm-version v0.0.0-20201110091526-0b796d180798 // indirect
github.com/aquasecurity/go-pep440-version v0.0.0-20210121094942-22b2f8951d46 // indirect
github.com/aquasecurity/go-version v0.0.0-20210121072130-637058cfe492 // indirect
github.com/aquasecurity/tfsec v1.8.0 // indirect
github.com/aws/aws-sdk-go v1.43.31 // indirect
github.com/aws/aws-sdk-go v1.44.5 // indirect
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
github.com/bmatcuk/doublestar v1.3.4 // indirect
github.com/briandowns/spinner v1.12.0 // indirect
github.com/caarlos0/env/v6 v6.9.1 // indirect
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/cheggaaa/pb/v3 v3.0.8 // indirect
github.com/containerd/containerd v1.5.9 // indirect
github.com/containerd/containerd v1.6.2 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.10.1 // indirect
github.com/containerd/typeurl v1.0.2 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect
Expand Down Expand Up @@ -125,7 +125,7 @@ require (
github.com/mitchellh/reflectwalk v1.0.0 // indirect
github.com/moby/buildkit v0.9.3 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/open-policy-agent/opa v0.39.0 // indirect
github.com/open-policy-agent/opa v0.40.0 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.2 // indirect
github.com/owenrumney/go-sarif/v2 v2.1.1 // indirect
Expand All @@ -136,7 +136,7 @@ require (
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/samber/lo v1.15.0 // indirect
github.com/samber/lo v1.19.0 // indirect
github.com/saracen/walker v0.0.0-20191201085201-324a081bae7e // indirect
github.com/sergi/go-diff v1.1.0 // indirect
github.com/shopspring/decimal v1.2.0 // indirect
Expand All @@ -156,23 +156,23 @@ require (
go.opencensus.io v0.23.0 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
golang.org/x/crypto v0.0.0-20220208233918-bba287dce954 // indirect
golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd // indirect
golang.org/x/exp v0.0.0-20220407100705-7b9b53b0aca4 // indirect
golang.org/x/mod v0.6.0-dev.0.20211013180041-c96bc1413d57 // indirect
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sys v0.0.0-20220204135822-1c1b9b1eba6a // indirect
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect
golang.org/x/tools v0.1.8 // indirect
google.golang.org/api v0.62.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20220204002441-d6cc3cc0770e // indirect
google.golang.org/grpc v1.45.0 // indirect
google.golang.org/grpc v1.46.0 // indirect
gopkg.in/cheggaaa/pb.v1 v1.0.28 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
k8s.io/utils v0.0.0-20201110183641-67b214c5f920 // indirect
k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b // indirect
lukechampine.com/uint128 v1.1.1 // indirect
modernc.org/cc/v3 v3.35.22 // indirect
modernc.org/ccgo/v3 v3.15.1 // indirect
Expand Down
Loading

0 comments on commit 12e4207

Please sign in to comment.