-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: restructure pillager for improved modularity and feature expans…
…ion [TASK-10] [TASK-11] [TASK-13] (#118) * feat: work in progress restructure of pillager project * feat: restructured pillager for modularity and expansion * fix: chill out golangci lint * fix: linting issues and unused pkg --------- Co-authored-by: brittonhayes <[email protected]>
- Loading branch information
1 parent
6d6740d
commit 107e596
Showing
44 changed files
with
1,266 additions
and
1,422 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
linters: | ||
enable: | ||
- gofumpt | ||
- gofmt | ||
- gosimple | ||
- godot | ||
- godox | ||
- dupl | ||
- funlen | ||
- gocritic | ||
- goprintffuncname | ||
- ifshort | ||
presets: | ||
- unused |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM golang:1.17-alpine | ||
FROM golang:1.21-alpine | ||
|
||
WORKDIR /src/ | ||
COPY . /src/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"runtime" | ||
|
||
"github.com/brittonhayes/pillager" | ||
"github.com/brittonhayes/pillager/pkg/scanner" | ||
) | ||
|
||
func main() { | ||
// Set scanner options | ||
opts := pillager.Options{ | ||
Path: ".", | ||
Workers: runtime.NumCPU(), | ||
Reporter: "json", | ||
Redact: true, | ||
} | ||
|
||
// Create a new gitleaks scanner | ||
s, _ := scanner.NewGitleaksScanner(opts) | ||
|
||
// Scan the current directory | ||
results, _ := s.Scan(opts.Path) | ||
|
||
// Report results | ||
fmt.Println(results) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,19 @@ | ||
// Package pillager is the entrypoint to the Pillager CLI | ||
package main | ||
|
||
import ( | ||
pillager "github.com/brittonhayes/pillager/internal/commands" | ||
"os" | ||
|
||
"github.com/brittonhayes/pillager/internal/commands" | ||
"github.com/rs/zerolog" | ||
"github.com/rs/zerolog/log" | ||
) | ||
|
||
func init() { | ||
// Setup default logging | ||
log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr}) | ||
zerolog.SetGlobalLevel(zerolog.InfoLevel) | ||
} | ||
|
||
func main() { | ||
pillager.Execute() | ||
commands.Execute() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.