Documentation
¶
Overview ¶
Package git provides repository-aware helpers for dotenv-doctor.
The leak scan walks every commit reachable from HEAD and looks for blobs at .env-style paths. We rely on go-git so users do not need a system git binary, and so the tool stays a single static binary.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsTracked ¶
IsTracked reports whether absPath is currently tracked at HEAD in the repo rooted at repoDir. Used by the dashboard for fast committed-.env detection without walking history.
func ParseGitHubOriginURL ¶
ParseGitHubOriginURL extracts (owner, repo) from common GitHub remote URL formats: https://github.com/owner/repo(.git), git@github.com:owner/repo(.git), ssh://git@github.com/owner/repo(.git).
func RemediationHint ¶
RemediationHint returns copy-pastable advice for a leak.
Types ¶
type Leak ¶
type Leak struct {
Repo string // git repo root
Path string // path inside the repo of the offending file
Commit string // full SHA
ShortSHA string // 7-char SHA for display
Author string // name <email>
When string // RFC3339 timestamp
Subject string // first line of commit message
Findings []classify.Finding // pattern matches
StillExists bool // file is still committed at HEAD
}
Leak describes a secret found in git history.