diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 41c412a70..1f0131b8c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,8 +11,6 @@ on: jobs: build: runs-on: ubuntu-latest - env: - GO111MODULE: on steps: - uses: actions/checkout@v2 @@ -26,8 +24,6 @@ jobs: test: runs-on: ubuntu-latest - env: - GO111MODULE: on steps: - uses: actions/checkout@v2 diff --git a/Dockerfile b/Dockerfile index 300a2bb9d..be8104011 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM golang:1.17 AS build WORKDIR /go/src/github.com/zricethezav/gitleaks COPY . . RUN VERSION=$(git describe --tags --abbrev=0) && \ -GO111MODULE=on CGO_ENABLED=0 go build -o bin/gitleaks -ldflags "-X="github.com/zricethezav/gitleaks/v8/cmd.Version=${VERSION} +CGO_ENABLED=0 go build -o bin/gitleaks -ldflags "-X="github.com/zricethezav/gitleaks/v8/cmd.Version=${VERSION} FROM alpine:3.14.2 RUN adduser -D gitleaks && \ diff --git a/go.mod b/go.mod index 3d6743a88..72f6f30d9 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/zricethezav/gitleaks/v8 -go 1.16 +go 1.17 require ( github.com/gitleaks/go-gitdiff v0.7.4 @@ -9,7 +9,26 @@ require ( github.com/spf13/viper v1.8.1 github.com/stretchr/testify v1.7.0 golang.org/x/sync v0.0.0-20210220032951-036812b2e83c +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/fsnotify/fsnotify v1.4.9 // indirect + github.com/hashicorp/hcl v1.0.0 // indirect + github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/magiconair/properties v1.8.5 // indirect + github.com/mitchellh/mapstructure v1.4.1 // indirect + github.com/pelletier/go-toml v1.9.3 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/spf13/afero v1.6.0 // indirect + github.com/spf13/cast v1.3.1 // indirect + github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/subosito/gotenv v1.2.0 // indirect golang.org/x/sys v0.0.0-20211110154304-99a53858aa08 // indirect - golang.org/x/tools v0.1.5 + golang.org/x/text v0.3.5 // indirect gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect + gopkg.in/ini.v1 v1.62.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect ) diff --git a/go.sum b/go.sum index 86265aa40..b50fd90b5 100644 --- a/go.sum +++ b/go.sum @@ -467,7 +467,6 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.5 h1:ouewzE6p+/VEB31YYnTbEJdi8pFqKp4P4n85vwo3DHA= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/report/constants.go b/report/constants.go index da78739d9..7772950c0 100644 --- a/report/constants.go +++ b/report/constants.go @@ -2,4 +2,3 @@ package report const version = "v8.0.0" const driver = "gitleaks" -const driverURL = "https://github.com/zricethezav/gitleaks" diff --git a/report/sarif.go b/report/sarif.go index 8abcd1a37..986b3b2a6 100644 --- a/report/sarif.go +++ b/report/sarif.go @@ -207,14 +207,3 @@ type Runs struct { Tool Tool `json:"tool"` Results []Results `json:"results"` } - -func configToRules(cfg config.Config) []Rules { - var rules []Rules - for _, rule := range cfg.Rules { - rules = append(rules, Rules{ - ID: rule.RuleID, - Name: rule.Description, - }) - } - return rules -} diff --git a/testdata/repos/small/dotGit/index b/testdata/repos/small/dotGit/index index 936b24116..2766ed3c4 100644 Binary files a/testdata/repos/small/dotGit/index and b/testdata/repos/small/dotGit/index differ