Преглед на файлове

fixing module name, updating gitignore and travis

zach rice преди 6 години
родител
ревизия
e5f5e64cdb
променени са 19 файла, в които са добавени 40 реда и са изтрити 44 реда
  1. 2 2
      .gitignore
  2. 1 1
      .travis.yml
  3. 5 4
      Dockerfile
  4. 3 3
      Makefile
  5. 1 1
      audit/audit.go
  6. 2 2
      audit/repo.go
  7. 2 2
      audit/util.go
  8. 1 1
      config/config.go
  9. 1 1
      config/config_test.go
  10. 1 2
      go.mod
  11. 0 4
      go.sum
  12. 3 3
      hosts/github.go
  13. 3 3
      hosts/gitlab.go
  14. 1 1
      hosts/host.go
  15. 3 3
      hosts/hosts_test.go
  16. 6 6
      main.go
  17. 2 2
      manager/manager.go
  18. 2 2
      manager/manager_test.go
  19. 1 1
      options/options.go

+ 2 - 2
.gitignore

@@ -6,7 +6,7 @@
 *.dylib
 *.DS_STORE
 *.idea
-*gitleaks-ng
+gitleaks
 
 # Test binary
-*.out
+*.out

+ 1 - 1
.travis.yml

@@ -1,7 +1,7 @@
 sudo: required
 language: go
 go:
-- 1.11
+- 1.13
 services:
 - docker
 script:

+ 5 - 4
Dockerfile

@@ -1,12 +1,12 @@
 FROM golang:1.13.0 AS build
-WORKDIR /go/src/github.com/zricethezav/gitleaks-ng
+WORKDIR /go/src/github.com/zricethezav/gitleaks
 COPY . .
-RUN GO111MODULE=on CGO_ENABLED=0 go build -o bin/gitleaks-ng *.go
+RUN GO111MODULE=on CGO_ENABLED=0 go build -o bin/gitleaks *.go
 
 FROM alpine:3.7
 RUN apk add --no-cache bash git openssh
-COPY --from=build /go/src/github.com/zricethezav/gitleaks-ng/bin/* /usr/bin/
-ENTRYPOINT ["gitleaks-ng"]
+COPY --from=build /go/src/github.com/zricethezav/gitleaks/bin/* /usr/bin/
+ENTRYPOINT ["gitleaks"]
 
 # How to use me :
 
@@ -14,3 +14,4 @@ ENTRYPOINT ["gitleaks-ng"]
 # docker run --rm --name=gitleaks gitleaks --repo=https://github.com/zricethezav/gitleaks
 
 # This will check for secrets in https://github.com/zricethezav/gitleaks
+

+ 3 - 3
Makefile

@@ -1,8 +1,8 @@
 .PHONY: test test-cover build release-builds
 
 VERSION := `git fetch --tags && git tag | sort -V | tail -1`
-PKG=github.com/zricethezav/gitleaks-ng
-LDFLAGS=-ldflags "-X=github.com/zricethezav/gitleaks-ng/version.Version=$(VERSION)"
+PKG=github.com/zricethezav/gitleaks
+LDFLAGS=-ldflags "-X=github.com/zricethezav/gitleaks/version.Version=$(VERSION)"
 COVER=--cover --coverprofile=cover.out
 
 test-cover:
@@ -16,7 +16,7 @@ test:
 	go test ./... --race $(PKG) -v
 
 test-integration:
-	go test github.com/zricethezav/gitleaks-ng/hosts -v -integration
+	go test github.com/zricethezav/gitleaks/hosts -v -integration
 
 build:
 	go mod tidy

+ 1 - 1
audit/audit.go

@@ -2,7 +2,7 @@ package audit
 
 import (
 	"fmt"
-	"github.com/zricethezav/gitleaks-ng/manager"
+	"github.com/zricethezav/gitleaks/manager"
 	"io/ioutil"
 	"path"
 )

+ 2 - 2
audit/repo.go

@@ -7,8 +7,8 @@ import (
 	"github.com/BurntSushi/toml"
 	"github.com/sergi/go-diff/diffmatchpatch"
 	log "github.com/sirupsen/logrus"
-	"github.com/zricethezav/gitleaks-ng/config"
-	"github.com/zricethezav/gitleaks-ng/manager"
+	"github.com/zricethezav/gitleaks/config"
+	"github.com/zricethezav/gitleaks/manager"
 	"gopkg.in/src-d/go-billy.v4"
 	"gopkg.in/src-d/go-git.v4"
 	"gopkg.in/src-d/go-git.v4/plumbing"

+ 2 - 2
audit/util.go

@@ -3,8 +3,8 @@ package audit
 import (
 	"fmt"
 	log "github.com/sirupsen/logrus"
-	"github.com/zricethezav/gitleaks-ng/config"
-	"github.com/zricethezav/gitleaks-ng/manager"
+	"github.com/zricethezav/gitleaks/config"
+	"github.com/zricethezav/gitleaks/manager"
 	"gopkg.in/src-d/go-git.v4"
 	"gopkg.in/src-d/go-git.v4/plumbing"
 	fdiff "gopkg.in/src-d/go-git.v4/plumbing/format/diff"

+ 1 - 1
config/config.go

@@ -3,7 +3,7 @@ package config
 import (
 	"fmt"
 	"github.com/BurntSushi/toml"
-	"github.com/zricethezav/gitleaks-ng/options"
+	"github.com/zricethezav/gitleaks/options"
 	"regexp"
 	"strconv"
 	"strings"

+ 1 - 1
config/config_test.go

@@ -2,7 +2,7 @@ package config
 
 import (
 	"fmt"
-	"github.com/zricethezav/gitleaks-ng/options"
+	"github.com/zricethezav/gitleaks/options"
 	"regexp"
 	"testing"
 )

+ 1 - 2
go.mod

@@ -1,4 +1,4 @@
-module github.com/zricethezav/gitleaks-ng
+module github.com/zricethezav/gitleaks
 
 go 1.12
 
@@ -11,7 +11,6 @@ require (
 	github.com/sergi/go-diff v1.0.0
 	github.com/sirupsen/logrus v1.4.2
 	github.com/xanzy/go-gitlab v0.21.0
-	golang.org/x/lint v0.0.0-20190930215403-16217165b5de // indirect
 	golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
 	gopkg.in/src-d/go-billy.v4 v4.3.2
 	gopkg.in/src-d/go-git.v4 v4.13.1

+ 0 - 4
go.sum

@@ -74,12 +74,9 @@ golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnf
 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
 golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 h1:HuIa8hRrWRSrqYzx1qI49NNxhdi2PrY7gxVSq1JjLDc=
 golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/lint v0.0.0-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs=
-golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
 golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20181108082009-03003ca0c849/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
 golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
 golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
 golang.org/x/net v0.0.0-20190724013045-ca1201d0de80 h1:Ao/3l156eZf2AW5wK8a7/smtodRU+gha3+BeqJ69lRk=
@@ -102,7 +99,6 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
 golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
 golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
 golang.org/x/tools v0.0.0-20190729092621-ff9f1409240a h1:mEQZbbaBjWyLNy0tmZmgEuQAR8XOQ3hL8GYi3J/NG64=
 golang.org/x/tools v0.0.0-20190729092621-ff9f1409240a/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI=
 google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=

+ 3 - 3
hosts/github.go

@@ -5,9 +5,9 @@ import (
 	"fmt"
 	"github.com/google/go-github/github"
 	log "github.com/sirupsen/logrus"
-	"github.com/zricethezav/gitleaks-ng/audit"
-	"github.com/zricethezav/gitleaks-ng/manager"
-	"github.com/zricethezav/gitleaks-ng/options"
+	"github.com/zricethezav/gitleaks/audit"
+	"github.com/zricethezav/gitleaks/manager"
+	"github.com/zricethezav/gitleaks/options"
 	"golang.org/x/oauth2"
 	"gopkg.in/src-d/go-git.v4"
 	"gopkg.in/src-d/go-git.v4/plumbing"

+ 3 - 3
hosts/gitlab.go

@@ -5,9 +5,9 @@ import (
 	"fmt"
 	log "github.com/sirupsen/logrus"
 	"github.com/xanzy/go-gitlab"
-	"github.com/zricethezav/gitleaks-ng/audit"
-	"github.com/zricethezav/gitleaks-ng/manager"
-	"github.com/zricethezav/gitleaks-ng/options"
+	"github.com/zricethezav/gitleaks/audit"
+	"github.com/zricethezav/gitleaks/manager"
+	"github.com/zricethezav/gitleaks/options"
 	"sync"
 )
 

+ 1 - 1
hosts/host.go

@@ -1,7 +1,7 @@
 package hosts
 
 import (
-	"github.com/zricethezav/gitleaks-ng/manager"
+	"github.com/zricethezav/gitleaks/manager"
 	"strings"
 )
 

+ 3 - 3
hosts/hosts_test.go

@@ -3,9 +3,9 @@ package hosts
 import (
 	"flag"
 	"fmt"
-	"github.com/zricethezav/gitleaks-ng/config"
-	"github.com/zricethezav/gitleaks-ng/manager"
-	"github.com/zricethezav/gitleaks-ng/options"
+	"github.com/zricethezav/gitleaks/config"
+	"github.com/zricethezav/gitleaks/manager"
+	"github.com/zricethezav/gitleaks/options"
 	"os"
 	"testing"
 )

+ 6 - 6
main.go

@@ -3,18 +3,18 @@ package main
 import (
 	"github.com/hako/durafmt"
 	log "github.com/sirupsen/logrus"
-	"github.com/zricethezav/gitleaks-ng/audit"
-	"github.com/zricethezav/gitleaks-ng/config"
-	"github.com/zricethezav/gitleaks-ng/hosts"
-	"github.com/zricethezav/gitleaks-ng/manager"
-	"github.com/zricethezav/gitleaks-ng/options"
+	"github.com/zricethezav/gitleaks/audit"
+	"github.com/zricethezav/gitleaks/config"
+	"github.com/zricethezav/gitleaks/hosts"
+	"github.com/zricethezav/gitleaks/manager"
+	"github.com/zricethezav/gitleaks/options"
 	"io/ioutil"
 	"os"
 	"time"
 )
 
 // TODO documentation for
-// 1. ./gitleaks-ng --repo=https://github.com/gitleakstest/gronit -v | jq -R 'fromjson?'
+// 1. ./gitleaks --repo=https://github.com/gitleakstest/gronit -v | jq -R 'fromjson?'
 // 2. Dockerfile
 // 3. need to add tests for --repo-config
 // 4. look over comments and code

+ 2 - 2
manager/manager.go

@@ -6,8 +6,8 @@ import (
 	"github.com/hako/durafmt"
 	"github.com/mattn/go-colorable"
 	log "github.com/sirupsen/logrus"
-	"github.com/zricethezav/gitleaks-ng/config"
-	"github.com/zricethezav/gitleaks-ng/options"
+	"github.com/zricethezav/gitleaks/config"
+	"github.com/zricethezav/gitleaks/options"
 	"gopkg.in/src-d/go-git.v4"
 	"os"
 	"os/signal"

+ 2 - 2
manager/manager_test.go

@@ -1,8 +1,8 @@
 package manager
 
 import (
-	"github.com/zricethezav/gitleaks-ng/config"
-	"github.com/zricethezav/gitleaks-ng/options"
+	"github.com/zricethezav/gitleaks/config"
+	"github.com/zricethezav/gitleaks/options"
 	"testing"
 )
 

+ 1 - 1
options/options.go

@@ -4,7 +4,7 @@ import (
 	"fmt"
 	"github.com/jessevdk/go-flags"
 	log "github.com/sirupsen/logrus"
-	"github.com/zricethezav/gitleaks-ng/version"
+	"github.com/zricethezav/gitleaks/version"
 	"gopkg.in/src-d/go-git.v4"
 	"gopkg.in/src-d/go-git.v4/plumbing/transport/http"
 	"gopkg.in/src-d/go-git.v4/plumbing/transport/ssh"