Skip to content

Commit

Permalink
Renamed repo from repocrawl to repocrawler
Browse files Browse the repository at this point in the history
  • Loading branch information
mariolima committed Oct 16, 2019
1 parent 35eb4bb commit a3b8b57
Show file tree
Hide file tree
Showing 18 changed files with 66 additions and 67 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RepoCrawl
# RepoCrawler
Crawl GitHub/Bitbucket/Gitlab/Git repositories in search for unsafely stored secrets. Completely written in Go

## Overview
Expand Down Expand Up @@ -42,19 +42,19 @@ This tool crawls repositories on various Git services using a variety of methods
## Instalation
### From source
```sht
go get github.com/mariolima/repocrawl
cd ~/go/src/github.com/mariolima/repocrawl/cmd/crawler-cli
go get github.com/mariolima/repocrawler
cd ~/go/src/github.com/mariolima/repocrawler/cmd/crawler-cli
go build .
export LOG_LEVEL=info
export GITHUB_ACCESS_TOKEN=TOKEN
./crawler-cli -h
```
### Using Docker
```sh
git clone github.com/mariolima/repocrawl
cd repocrawl
docker build . -t repocrawl
docker run -it -e 'GITHUB_ACCESS_TOKEN=TOKEN' -e 'SLACK_WEBHOOK=YOURWEBHOOK' repocrawl -h
git clone github.com/mariolima/repocrawler
cd repocrawler
docker build . -t repocrawler
docker run -it -e 'GITHUB_ACCESS_TOKEN=TOKEN' -e 'SLACK_WEBHOOK=YOURWEBHOOK' repocrawler -h
```


Expand Down
6 changes: 3 additions & 3 deletions cmd/crawler-cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"fmt"
"strings"

"github.com/mariolima/repocrawl/cmd/utils" // used to Highlight matches with colors
"github.com/mariolima/repocrawl/cmd/utils/webserver"
"github.com/mariolima/repocrawl/pkg/crawler"
"github.com/mariolima/repocrawler/cmd/utils" // used to Highlight matches with colors
"github.com/mariolima/repocrawler/cmd/utils/webserver"
"github.com/mariolima/repocrawler/pkg/crawler"
)

var (
Expand Down
6 changes: 3 additions & 3 deletions cmd/crawler-cli/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (

"fmt"

"github.com/mariolima/repocrawl/cmd/utils" // used to Highlight matches with colors
"github.com/mariolima/repocrawl/cmd/utils/webserver"
"github.com/mariolima/repocrawl/pkg/crawler"
"github.com/mariolima/repocrawler/cmd/utils" // used to Highlight matches with colors
"github.com/mariolima/repocrawler/cmd/utils/webserver"
"github.com/mariolima/repocrawler/pkg/crawler"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/utils/webserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net/http"
"time"

"github.com/mariolima/repocrawl/pkg/crawler"
"github.com/mariolima/repocrawler/pkg/crawler"
log "github.com/sirupsen/logrus"
)

Expand Down
35 changes: 18 additions & 17 deletions configs/certs/server.crt
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
-----BEGIN CERTIFICATE-----
MIID7DCCAtSgAwIBAgIUew++RBcC6T80HgJdLLmjxmG8Ky0wDQYJKoZIhvcNAQEL
MIID+jCCAuKgAwIBAgIUew++RBcC6T80HgJdLLmjxmG8Ky4wDQYJKoZIhvcNAQEL
BQAwVDELMAkGA1UEBhMCVVMxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM
GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDENMAsGA1UEAwwEZ29iaDAeFw0xOTA3
MDgxMDQxNTVaFw0yMDExMTkxMDQxNTVaMIG9MQswCQYDVQQGEwJVUzERMA8GA1UE
GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDENMAsGA1UEAwwEZ29iaDAeFw0xOTEw
MTYxMDAzMDZaFw0yMTAyMjcxMDAzMDZaMIHEMQswCQYDVQQGEwJVUzERMA8GA1UE
CAwITmV3IFlvcmsxEjAQBgNVBAcMCVJvY2hlc3RlcjESMBAGA1UECgwJRW5kIFBv
aW50MRcwFQYDVQQLDA5UZXN0aW5nIERvbWFpbjFLMEkGCSqGSIb3DQ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AMTosdtEoVQrzDj4+hwUcLT++tkkbO/zFQ11dI3b9JCU
M2DEv4LVCYRmDnzNrHmyGhD8R9oqQfFDRut++spI4lMtgDJslpqVIyugCpsv/8ey
NAUEFDdJ+CMXCoHuB1GiCpyNtVC/i4Bv/QcbSmeZJe5qcHepRa4VhBZPLZVxlhYC
Evfq2JY+NARKY6r0GsfNgP7RIq4M0lrauLU/8+TOuc5ghXnslPqm9NuvaEpY5oba
vxcdk14Sny5lB1Y/9QBgbH2l8kACYVQDwavNUhAY/mCJW/ivAoChntdDcdkHecrW
uy6TPCSD+I+TfjWmySYbSDvirU0k1t8R9D9fSdTLKIUCAwEAAaNTMFEwHwYDVR0j
BBgwFoAU5/jrKWPbR2LqTE0GAOzjA4bA5f0wCQYDVR0TBAIwADALBgNVHQ8EBAMC
BPAwFgYDVR0RBA8wDYILcmVwb2NyYXdsZXIwDQYJKoZIhvcNAQELBQADggEBABJ0
WUuV5Vl9FFOHjNjtgQ7fq3xMEibORxAZXh4lXSwXTFeU/VaYmHQS0ibLAkS+9w6D
+OQh/YN4gA+Xb/T4DOejXIw0Ulu4wfzw3QHrqij27WVyWjXr8HGZD1NbkpVJWHt0
xbkICZ5o6X/yv8J3KqmX8IkN+tVZRY7p3jBPAXXih8HdCsZdXaUeMi62uFOrgOmM
WjUb+dOLd3Q5dxmWnuVM2U9p1t/Xt79AlVqY6JY8cF6x1zzZCR/yWwD8EhcaYu07
9jnyd5CKmsb+01ZSBR/ZDzxiFuOuSEPrdnZ34YHk613LFiH6YXZfSt9dRheMxC3O
c//qmzE3Ttje2Q8j5S8=
-----END CERTIFICATE-----
30 changes: 15 additions & 15 deletions configs/certs/server.csr
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
-----BEGIN CERTIFICATE REQUEST-----
MIIDAzCCAesCAQAwgb0xCzAJBgNVBAYTAlVTMREwDwYDVQQIDAhOZXcgWW9yazES
MIIDCjCCAfICAQAwgcQxCzAJBgNVBAYTAlVTMREwDwYDVQQID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NVBAMMC3JlcG9jcmF3bGVyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
AQEAxOix20ShVCvMOPj6HBRwtP762SRs7/MVDXV0jdv0kJQzYMS/gtUJhGYOfM2s
ebIaEPxH2ipB8UNG6376ykjiUy2AMmyWmpUjK6AKmy//x7I0BQQUN0n4IxcKge4H
UaIKnI21UL+LgG/9BxtKZ5kl7mpwd6lFrhWEFk8tlXGWFgIS9+rYlj40BEpjqvQa
x82A/tEirgzSWtq4tT/z5M65zmCFeeyU+qb0269oSljmhtq/Fx2TXhKfLmUHVj/1
AGBsfaXyQAJhVAPBq81SEBj+YIlb+K8CgKGe10Nx2Qd5yta7LpM8JIP4j5N+NabJ
JhtIO+KtTSTW3xH0P19J1MsohQIDAQABoAAwDQYJKoZIhvcNAQELBQADggEBADbj
6iFVjeTN61BIVUlW8ZzKLMI5+1Jm2sU91Gq8nkfVjq1JmE4I8bRKHyr5bpwke95l
ZEsl9m4MazM45VzW6n6aBbESXbrGaxzHVoR9U9dHAAjc/my34ErsHAHLHPdtis/c
M9QEJbQ/84AfXIF3xAOvT/Bt0R/AMJyQiTlPCcYyCw03avVyqjNfl7MEOXXP+Hd2
m6XhkvNc2mYqtWl4/dRyFl9qe/9lwKB7sTW2/Mn9zSf6NUoJKsnUnBZ+h97LaE4k
OAXxYo5XBInowbDnJG5EyQrBPBF9b+jXJVtGL4PnC0Yd7IasEOV/jQPTf3o4RkII
2d3meMHkO1eiZYv08L8=
-----END CERTIFICATE REQUEST-----
2 changes: 1 addition & 1 deletion configs/certs/server.csr.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ L=Rochester
O=End Point
OU=Testing Domain
emailAddress=your-administrative-address@your-awesome-existing-domain.com
CN = gobh
CN = repocrawler
2 changes: 1 addition & 1 deletion configs/certs/v3.ext
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment
subjectAltName = @alt_names

[alt_names]
DNS.1 = gobh
DNS.1 = repocrawler
6 changes: 3 additions & 3 deletions docker.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
docker image rm -f repocrawl
docker build . -t repocrawl
docker run -it -e 'GITHUB_ACCESS_TOKEN=TOKEN' repocrawl -h
docker image rm -f repocrawler
docker build . -t repocrawler
docker run -it -e 'GITHUB_ACCESS_TOKEN=TOKEN' repocrawler -h
7 changes: 2 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
module github.com/mariolima/repocrawl
module github.com/mariolima/repocrawler

go 1.12
go 1.13

require (
github.com/bndr/gopencils v0.0.0-20161113114152-22e283ad7611
github.com/gammazero/workerpool v0.0.0-20190608213748-0ed5e40ec55e
github.com/google/go-github v17.0.0+incompatible
github.com/google/go-querystring v1.0.0 // indirect
github.com/gorilla/websocket v1.4.1
github.com/logrusorgru/aurora v0.0.0-20190803045625-94edacc10f9b
github.com/onsi/ginkgo v1.10.1
github.com/onsi/gomega v1.7.0
github.com/pkg/profile v1.3.0
github.com/satori/go.uuid v1.2.0
github.com/sirupsen/logrus v1.4.2
Expand Down
2 changes: 1 addition & 1 deletion pkg/bitbucket/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package bitbucket
import (
log "github.com/sirupsen/logrus"

"github.com/mariolima/repocrawl/internal/entities" //structs common in GitHub/GitLab/BitBucket - RepoData/UserData etc
"github.com/mariolima/repocrawler/internal/entities" //structs common in GitHub/GitLab/BitBucket - RepoData/UserData etc

"github.com/bndr/gopencils"

Expand Down
8 changes: 4 additions & 4 deletions pkg/crawler/crawler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package crawler
import (
"sync"

"github.com/mariolima/repocrawl/internal/entities"
"github.com/mariolima/repocrawl/pkg/bitbucket"
"github.com/mariolima/repocrawl/pkg/github"
_ "github.com/mariolima/repocrawl/pkg/gitlab" //TODO
"github.com/mariolima/repocrawler/internal/entities"
"github.com/mariolima/repocrawler/pkg/bitbucket"
"github.com/mariolima/repocrawler/pkg/github"
_ "github.com/mariolima/repocrawler/pkg/gitlab" //TODO

"bufio"
"regexp"
Expand Down
2 changes: 1 addition & 1 deletion pkg/crawler/deepcrawl.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"sync"
"time"

"github.com/mariolima/repocrawl/internal/entities"
"github.com/mariolima/repocrawler/internal/entities"
_ "gopkg.in/src-d/go-billy.v4/memfs" //???????????????????
"gopkg.in/src-d/go-git.v4" //It's def heavy but gets the job done - any alternatives for commit crawling?
"gopkg.in/src-d/go-git.v4/plumbing/object"
Expand Down
2 changes: 1 addition & 1 deletion pkg/crawler/graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"sync"

"github.com/mariolima/repocrawl/internal/entities"
"github.com/mariolima/repocrawler/internal/entities"
_ "github.com/twmb/algoimpl/go/graph" // Graph library /w most of Algos and Structs
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/crawler/match.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package crawler

import (
"github.com/mariolima/repocrawl/internal/entities"
"github.com/mariolima/repocrawler/internal/entities"
)

// Match Secret found while crawling a repository
Expand Down
3 changes: 2 additions & 1 deletion pkg/crawler/notification.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package crawler

import (
"fmt"
"github.com/mariolima/repocrawl/cmd/utils"

"github.com/mariolima/repocrawler/cmd/utils"
// log "github.com/sirupsen/logrus"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/crawler/task.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package crawler

import (
"github.com/mariolima/repocrawl/internal/entities"
"github.com/mariolima/repocrawler/internal/entities"
log "github.com/sirupsen/logrus"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/github/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

log "github.com/sirupsen/logrus"

"github.com/mariolima/repocrawl/internal/entities" //structs common in GitHub/GitLab/BitBucket - RepoData/UserData etc
"github.com/mariolima/repocrawler/internal/entities" //structs common in GitHub/GitLab/BitBucket - RepoData/UserData etc
)

// GitHubCrawler Contains API_KEY and Client for API calls
Expand Down

0 comments on commit a3b8b57

Please sign in to comment.