diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8097370..c8996e8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,4 +25,4 @@ jobs: with: go-version: '^1.18' - name: Build - run: go build CIHunter + run: go build CIAnalyser diff --git a/README.md b/README.md index 7a411da..48104ea 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# :robot: CIHunter +# :robot: CIAnalyser -[![Build](https://github.com/ZJU-SEC/CIHunter/actions/workflows/build.yml/badge.svg)](https://github.com/ZJU-SEC/CIHunter/actions/workflows/build.yml) +[![Build](https://github.com/ZJU-SEC/CIAnalyser/actions/workflows/build.yml/badge.svg)](https://github.com/ZJU-SEC/CIAnalyser/actions/workflows/build.yml) ## :gear: Prerequisite @@ -22,7 +22,7 @@ $ docker run \ --restart unless-stopped \ -e POSTGRES_USER=ZJU-SEC \ -e POSTGRES_PASSWORD= \ - -e POSTGRES_DB=CIHunter \ + -e POSTGRES_DB=CIAnalyser \ -p 5432:5432 postgres ``` @@ -30,12 +30,12 @@ $ docker run \ ## :hammer_and_wrench: Build ```bash -$ go build CIHunter +$ go build CIAnalyser ``` ## :rocket: Run ```bash -$ ./CIHunter +$ ./CIAnalyser ``` diff --git a/config.ini.tmpl b/config.ini.tmpl index 94e72bd..46fada4 100644 --- a/config.ini.tmpl +++ b/config.ini.tmpl @@ -23,5 +23,5 @@ MAX_SINCE = 461660000 HOST = localhost USER = root PASSWORD = -DBNAME = CIHunter +DBNAME = CIAnalyser PORT = 5432 diff --git a/go.mod b/go.mod index de8c87c..d8d8270 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module CIHunter +module CIAnalyser go 1.18 diff --git a/main.go b/main.go index 060d477..9565149 100644 --- a/main.go +++ b/main.go @@ -1,14 +1,14 @@ package main import ( - "CIHunter/config" - "CIHunter/pkg/analyzer" - "CIHunter/pkg/contributor" - "CIHunter/pkg/credential" - "CIHunter/pkg/model" - "CIHunter/pkg/repo" - "CIHunter/pkg/script" - "CIHunter/pkg/verified" + "CIAnalyser/config" + "CIAnalyser/pkg/analyzer" + "CIAnalyser/pkg/contributor" + "CIAnalyser/pkg/credential" + "CIAnalyser/pkg/model" + "CIAnalyser/pkg/repo" + "CIAnalyser/pkg/script" + "CIAnalyser/pkg/verified" "fmt" "os" ) diff --git a/pkg/analyzer/analyze.go b/pkg/analyzer/analyze.go index 2c6afba..89a4469 100644 --- a/pkg/analyzer/analyze.go +++ b/pkg/analyzer/analyze.go @@ -1,11 +1,11 @@ package analyzer import ( - "CIHunter/config" - "CIHunter/pkg/credential" - "CIHunter/pkg/model" - "CIHunter/pkg/script" - "CIHunter/pkg/verified" + "CIAnalyser/config" + "CIAnalyser/pkg/credential" + "CIAnalyser/pkg/model" + "CIAnalyser/pkg/script" + "CIAnalyser/pkg/verified" "fmt" "github.com/go-git/go-git/v5" "github.com/xuri/excelize/v2" diff --git a/pkg/contributor/crawler.go b/pkg/contributor/crawler.go index e8504c5..0ea2626 100644 --- a/pkg/contributor/crawler.go +++ b/pkg/contributor/crawler.go @@ -1,10 +1,10 @@ package contributor import ( - "CIHunter/config" - "CIHunter/pkg/model" - "CIHunter/pkg/script" - "CIHunter/utils" + "CIAnalyser/config" + "CIAnalyser/pkg/model" + "CIAnalyser/pkg/script" + "CIAnalyser/utils" "encoding/json" "fmt" "github.com/gocolly/colly" @@ -66,26 +66,3 @@ func crawl(s *script.Script) { c.Visit(fmt.Sprintf("https://api.github.com/repos/%s/contributors", s.SrcRef())) } - -//import ( -// "CIHunter/pkg/model" -// "CIHunter/utils" -// "fmt" -// "github.com/gocolly/colly" -// "strconv" -// "strings" -// "time" -//) -// -//package maintainers -// -//import ( -//"CIHunter/pkg/model" -//"CIHunter/utils" -//"fmt" -//"github.com/gocolly/colly" -//"strconv" -//"strings" -//"time" -//) -// diff --git a/pkg/contributor/model.go b/pkg/contributor/model.go index ef16535..c42ec57 100644 --- a/pkg/contributor/model.go +++ b/pkg/contributor/model.go @@ -1,8 +1,8 @@ package contributor import ( - "CIHunter/pkg/model" - "CIHunter/pkg/script" + "CIAnalyser/pkg/model" + "CIAnalyser/pkg/script" "fmt" "gorm.io/gorm/clause" "sync" diff --git a/pkg/credential/extract.go b/pkg/credential/extract.go index 35c0e40..d94779a 100644 --- a/pkg/credential/extract.go +++ b/pkg/credential/extract.go @@ -1,9 +1,9 @@ package credential import ( - "CIHunter/config" - "CIHunter/pkg/model" - "CIHunter/utils" + "CIAnalyser/config" + "CIAnalyser/pkg/model" + "CIAnalyser/utils" "github.com/shomali11/parallelizer" "io/ioutil" "strings" diff --git a/pkg/credential/model.go b/pkg/credential/model.go index 02792df..2731fe1 100644 --- a/pkg/credential/model.go +++ b/pkg/credential/model.go @@ -1,7 +1,7 @@ package credential import ( - "CIHunter/pkg/model" + "CIAnalyser/pkg/model" "fmt" "sync" ) diff --git a/pkg/model/models.go b/pkg/model/models.go index 3abc7fc..0fad4d2 100644 --- a/pkg/model/models.go +++ b/pkg/model/models.go @@ -1,7 +1,7 @@ package model import ( - "CIHunter/config" + "CIAnalyser/config" "fmt" "gorm.io/driver/postgres" "gorm.io/gorm" diff --git a/pkg/repo/clone.go b/pkg/repo/clone.go index eb3cdf8..f676369 100644 --- a/pkg/repo/clone.go +++ b/pkg/repo/clone.go @@ -1,9 +1,9 @@ package repo import ( - "CIHunter/config" - "CIHunter/pkg/model" - "CIHunter/utils" + "CIAnalyser/config" + "CIAnalyser/pkg/model" + "CIAnalyser/utils" "fmt" "github.com/go-git/go-git/v5" "github.com/go-git/go-git/v5/plumbing/transport" diff --git a/pkg/repo/index.go b/pkg/repo/index.go index ee60271..7862b56 100644 --- a/pkg/repo/index.go +++ b/pkg/repo/index.go @@ -1,9 +1,9 @@ package repo import ( - "CIHunter/config" - "CIHunter/pkg/model" - "CIHunter/utils" + "CIAnalyser/config" + "CIAnalyser/pkg/model" + "CIAnalyser/utils" "encoding/json" "fmt" "github.com/gocolly/colly" diff --git a/pkg/repo/model.go b/pkg/repo/model.go index f50cec5..8a3cfe5 100644 --- a/pkg/repo/model.go +++ b/pkg/repo/model.go @@ -1,8 +1,8 @@ package repo import ( - "CIHunter/config" - "CIHunter/pkg/model" + "CIAnalyser/config" + "CIAnalyser/pkg/model" "fmt" "gorm.io/gorm" "path" diff --git a/pkg/script/categorize.go b/pkg/script/categorize.go index 2e3fdff..fa06138 100644 --- a/pkg/script/categorize.go +++ b/pkg/script/categorize.go @@ -1,9 +1,9 @@ package script import ( - "CIHunter/config" - "CIHunter/pkg/model" - "CIHunter/utils" + "CIAnalyser/config" + "CIAnalyser/pkg/model" + "CIAnalyser/utils" "github.com/gocolly/colly" "github.com/shomali11/parallelizer" "golang.org/x/exp/slices" diff --git a/pkg/script/clone.go b/pkg/script/clone.go index 267c012..fde5554 100644 --- a/pkg/script/clone.go +++ b/pkg/script/clone.go @@ -1,8 +1,8 @@ package script import ( - "CIHunter/config" - "CIHunter/pkg/model" + "CIAnalyser/config" + "CIAnalyser/pkg/model" "fmt" "github.com/go-git/go-git/v5" "github.com/shomali11/parallelizer" diff --git a/pkg/script/extract.go b/pkg/script/extract.go index 2ea56dc..e711a9b 100644 --- a/pkg/script/extract.go +++ b/pkg/script/extract.go @@ -1,10 +1,10 @@ package script import ( - "CIHunter/config" - "CIHunter/pkg/model" - "CIHunter/pkg/verified" - "CIHunter/utils" + "CIAnalyser/config" + "CIAnalyser/pkg/model" + "CIAnalyser/pkg/verified" + "CIAnalyser/utils" "github.com/shomali11/parallelizer" "io/ioutil" "strings" diff --git a/pkg/script/lag.go b/pkg/script/lag.go index f9de567..c83e86d 100644 --- a/pkg/script/lag.go +++ b/pkg/script/lag.go @@ -1,7 +1,7 @@ package script import ( - "CIHunter/pkg/model" + "CIAnalyser/pkg/model" "fmt" "github.com/go-git/go-git/v5" "github.com/go-git/go-git/v5/plumbing" diff --git a/pkg/script/model.go b/pkg/script/model.go index 9f40040..d7924f3 100644 --- a/pkg/script/model.go +++ b/pkg/script/model.go @@ -1,8 +1,8 @@ package script import ( - "CIHunter/config" - "CIHunter/pkg/model" + "CIAnalyser/config" + "CIAnalyser/pkg/model" "fmt" "gorm.io/gorm/clause" "path" diff --git a/pkg/script/using.go b/pkg/script/using.go index dcd3b85..dadd8b3 100644 --- a/pkg/script/using.go +++ b/pkg/script/using.go @@ -1,8 +1,8 @@ package script import ( - "CIHunter/config" - "CIHunter/pkg/model" + "CIAnalyser/config" + "CIAnalyser/pkg/model" "fmt" "gopkg.in/yaml.v3" "os" diff --git a/pkg/script/version.go b/pkg/script/version.go index 937edd2..4d63cc8 100644 --- a/pkg/script/version.go +++ b/pkg/script/version.go @@ -1,7 +1,7 @@ package script import ( - "CIHunter/pkg/model" + "CIAnalyser/pkg/model" "fmt" "github.com/go-git/go-git/v5" "github.com/go-git/go-git/v5/plumbing" diff --git a/pkg/verified/crawler.go b/pkg/verified/crawler.go index eb40fb0..bddd317 100644 --- a/pkg/verified/crawler.go +++ b/pkg/verified/crawler.go @@ -1,8 +1,8 @@ package verified import ( - "CIHunter/pkg/model" - "CIHunter/utils" + "CIAnalyser/pkg/model" + "CIAnalyser/utils" "fmt" "github.com/gocolly/colly" "strconv" diff --git a/pkg/verified/model.go b/pkg/verified/model.go index 53fde58..f0bf02a 100644 --- a/pkg/verified/model.go +++ b/pkg/verified/model.go @@ -1,7 +1,7 @@ package verified import ( - "CIHunter/pkg/model" + "CIAnalyser/pkg/model" "golang.org/x/exp/slices" "gorm.io/gorm/clause" "sync" diff --git a/utils/traverse.go b/utils/traverse.go index e5889fe..c2947c3 100644 --- a/utils/traverse.go +++ b/utils/traverse.go @@ -1,8 +1,8 @@ package utils import ( - "CIHunter/config" - "CIHunter/pkg/model" + "CIAnalyser/config" + "CIAnalyser/pkg/model" "github.com/shomali11/parallelizer" "gopkg.in/yaml.v3" "io/fs" diff --git a/utils/utils.go b/utils/utils.go index 6304706..82c57c3 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -1,7 +1,7 @@ package utils import ( - "CIHunter/config" + "CIAnalyser/config" "fmt" "github.com/gocolly/colly" "math/rand"