diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..664d1888 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,52 @@ +CHANGELOG +========= + +1.1.2 +----- +- Added version option +- Introduced changelog + +1.1.1 +----- +- Fixed commit patch order +- Updated Readme + +1.1.0 +----- +- Fixed Twitter typo +- Fixed sample docker command +- Default clone option to "in-memory" +- Added clone option for "disk" +- Updated Makefile + +1.0.0 +----- +- Rewrite, see Readme.md: https://github.com/zricethezav/gitleaks/releases/tag/v1.0.0 + +0.4.0 +----- +- Added support for external regexes + +0.3.0 +----- +- Added local scan +- Meaningful exit codes +- Timestamped logs +- Refactored for some maintainability + +0.2.0 +----- +- Additionally regex checking +- $HOME/.gitleaks/ directory for clones and reports +- Pagination for Org/User list... no more partial repo lists +- Persistent repos for Orgs and Users (no more re-cloning) +- Updated README +- Multi-staged Docker build +- Travis CI + +0.1.0 +----- +- full git history search +- regex/entropy checks +- report generation + diff --git a/Makefile b/Makefile index 6e512a61..8d0d55f2 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: test build-all release +.PHONY: test build-all deploy test: go get github.com/golang/lint/golint @@ -12,6 +12,7 @@ deploy: docker push $(REPO) build-all: + rm -rf build mkdir build env GOOS="windows" GOARCH="amd64" go build -o "build/gitleaks-windows-amd64.exe" env GOOS="windows" GOARCH="386" go build -o "build/gitleaks-windows-386.exe" diff --git a/main.go b/main.go index 73a3788f..87c3303e 100644 --- a/main.go +++ b/main.go @@ -92,6 +92,7 @@ type Options struct { Verbose bool `short:"v" long:"verbose" description:"Show verbose output from gitleaks audit"` Report string `long:"report" description:"path to write report file"` Redact bool `long:"redact" description:"redact secrets from log messages and report"` + Version bool `long:"version" description:"version number"` } // Config struct for regexes matching and whitelisting @@ -108,6 +109,7 @@ type Config struct { } } +const version = "1.1.2" const defaultConfig = ` title = "gitleaks config" # add regexes to the regex table @@ -178,6 +180,10 @@ func main() { repos []Repo ) _, err := flags.Parse(&opts) + if opts.Version { + fmt.Println(version) + os.Exit(0) + } if err != nil { os.Exit(1) }