corvus-ch/horcrux

View on GitHub

Showing 25 of 43 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

func TestCreateCommand_Parts(t *testing.T) {
tests := []struct {
name string
args []string
parts int
Severity: Major
Found in internal/create_test.go and 1 other location - About 2 hrs to fix
internal/create_test.go on lines 42..59

Similar blocks of code found in 2 locations. Consider refactoring.
Open

func TestCreateCommand_Threshold(t *testing.T) {
tests := []struct {
name string
args []string
threshold int
Severity: Major
Found in internal/create_test.go and 1 other location - About 2 hrs to fix
internal/create_test.go on lines 61..78

Similar blocks of code found in 2 locations. Consider refactoring.
Open

for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
assertRestoreAction(t, test.args, func(cfg restore.Config, _ restore.PasswordProvider, _ logr.Logger) error {
assert.Equal(t, test.names, cfg.FileNames())
return nil
Severity: Minor
Found in internal/restore_test.go and 1 other location - About 55 mins to fix
internal/restore_test.go on lines 47..54

Similar blocks of code found in 2 locations. Consider refactoring.
Open

for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
assertRestoreAction(t, test.args, func(cfg restore.Config, _ restore.PasswordProvider, _ logr.Logger) error {
assert.Equal(t, test.encrypted, cfg.Decrypt())
return nil
Severity: Minor
Found in internal/restore_test.go and 1 other location - About 55 mins to fix
internal/restore_test.go on lines 68..75

Line length
Open

IMPORTANT: This produces an incomplete result, should your secret does not fit in one single QR code.
Severity: Info
Found in README.md by markdownlint

Code block style
Open

curl -s https://packagecloud.io/install/repositories/corvus-ch/tools/script.rpm.sh | sudo bash
Severity: Info
Found in README.md by markdownlint

Line length
Open

curl -s https://packagecloud.io/install/repositories/corvus-ch/tools/script.deb.sh | sudo bash
Severity: Info
Found in README.md by markdownlint

Line length
Open

the data directly. A tool like `zbarimg` from the [zbar libary][zbar] can be used to
Severity: Info
Found in README.md by markdownlint

exported type Config should have comment or be unexported
Open

type Config interface {
Severity: Minor
Found in create/config.go by golint

Code block style
Open

horcrux restore -o paperkey.bin *.txt.* # For this example only two of the three files are required.
Severity: Info
Found in README.md by markdownlint

Code block style
Open

horcrux create --encrypt -f text -f qr "/path/to/secret"
Severity: Info
Found in README.md by markdownlint

exported function RegisterCreateCommand should have comment or be unexported
Open

func RegisterCreateCommand(app *kingpin.Application, log logr.Logger, action createAction) *createCommand {
Severity: Minor
Found in internal/create.go by golint

exported func RegisterCreateCommand returns unexported type *internal.createCommand, which can be annoying to use
Open

func RegisterCreateCommand(app *kingpin.Application, log logr.Logger, action createAction) *createCommand {
Severity: Minor
Found in internal/create.go by golint

exported function RegisterRestoreCommand should have comment or be unexported
Open

func RegisterRestoreCommand(app *kingpin.Application, log logr.Logger, action restoreAction) *restoreCommand {
Severity: Minor
Found in internal/restore.go by golint

Trailing spaces
Open

can recreate the secret they were created from.
Severity: Info
Found in README.md by markdownlint

2: cannot find package "github.com/bketelsen/logr" in any of:
Open

"github.com/bketelsen/logr"
Severity: Minor
Found in create/action.go by govet

Code block style
Open

brew install corvus-ch/tools/horcrux
Severity: Info
Found in README.md by markdownlint

Line length
Open

horcrux restore -o paperkey.bin *.txt.* # For this example only two of the three files are required.
Severity: Info
Found in README.md by markdownlint

Code block style
Open

KEY_ID=… # Declare variable holding the ID of the GPG key you want to backup.
Severity: Info
Found in README.md by markdownlint

exported function App should have comment or be unexported
Open

func App(log logr.Logger) *kingpin.Application {
Severity: Minor
Found in internal/app.go by golint
Severity
Category
Status
Source
Language