Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractEndpoints ¶
ExtractEndpoints pulls candidate paths and urls out of a script body, dedupes them, drops obvious noise, and resolves relatives against baseURL so callers get absolute targets where possible. a baseURL that won't parse just leaves relatives as-is rather than failing the whole scan.
Types ¶
type JavascriptScanResult ¶
type JavascriptScanResult struct {
SupabaseResults []supabaseScanResult `json:"supabase_results"`
FoundEnvironmentVars map[string]string `json:"environment_variables"`
SecretMatches []SecretMatch `json:"secret_matches"`
Endpoints []string `json:"endpoints"`
}
func JavascriptScan ¶
func (*JavascriptScanResult) ResultType ¶
func (r *JavascriptScanResult) ResultType() string
ResultType implements the ScanResult interface.
func (*JavascriptScanResult) SupabaseFindings ¶
func (r *JavascriptScanResult) SupabaseFindings() []SupabaseFinding
SupabaseFindings projects the package-private supabase results into a stable exported shape for the finding normalizer; role is what makes one interesting (a non-anon key is the real bug).
type SecretMatch ¶
type SecretMatch struct {
Rule string `json:"rule"`
Match string `json:"match"`
Source string `json:"source"`
}
SecretMatch is one credential the scanner pulled out of a script.
func ScanSecrets ¶
func ScanSecrets(content, srcURL string) []SecretMatch
ScanSecrets runs the regex bank over a script body and returns every gated match, deduped within this one source. srcURL is recorded on each find.
type SupabaseFinding ¶
SupabaseFinding is the exported view of one discovered supabase project. the raw supabaseScanResult stays package-private (it carries scan internals), so downstream normalizers consume this projection instead.