mirror of
https://github.com/gopasspw/gopass.git
synced 2025-12-08 19:24:54 +00:00
* Start new auditor Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org> * Add new files Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org> * Rewrite gopass audit Fixes #2504 RELEASE_NOTES=[ENHANCEMENT] Rewrite gopass audit. Add HTML and CSV exports. Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org> * Fix tests Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org> * Add template flag Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org> Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
18 lines
377 B
Go
18 lines
377 B
Go
package audit
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
|
|
"github.com/gopasspw/gopass/internal/out"
|
|
"github.com/muesli/crunchy"
|
|
)
|
|
|
|
// Single runs a password strength audit on a single password.
|
|
func Single(ctx context.Context, password string) {
|
|
validator := crunchy.NewValidator()
|
|
if err := validator.Check(password); err != nil {
|
|
out.Printf(ctx, fmt.Sprintf("Warning: %s", err))
|
|
}
|
|
}
|