Documentation
¶
Index ¶
- func BuildQuery(t DorkTemplate, org, domain string) string
- func Classify(fragments []string) string
- func NewCapability(deps core.Deps) (core.Capability, error)
- func SearchURL(base, query string, page, perPage int) string
- type Client
- type Credibility
- type DorkTemplate
- type Kit
- type SearchItem
- type SearchResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildQuery ¶
func BuildQuery(t DorkTemplate, org, domain string) string
BuildQuery substitutes {org} and {domain} placeholders.
func NewCapability ¶
func NewCapability(deps core.Deps) (core.Capability, error)
Types ¶
type Client ¶
type Client struct {
Fetcher core.Fetcher
Settings core.Settings
Limiter core.Limiter
BaseURL string
ProxyURL string
}
Client runs GitHub Code Search through the external Fetcher port.
type Credibility ¶
type Credibility struct {
Score int `json:"score"`
Level string `json:"level"` // high | medium | low
}
Credibility is a lightweight static score for a code-search hit. It only produces a hint; the host/agent must validate before reporting.
func ScoreCredibility ¶
func ScoreCredibility(repo string, stars int, fork bool, path string) Credibility
type DorkTemplate ¶
type DorkTemplate struct {
ID string `json:"id"`
Category string `json:"category"`
Title string `json:"title"`
Query string `json:"query"`
Note string `json:"note,omitempty"`
}
DorkTemplate is one reusable GitHub code-search query.
func TemplateByID ¶
func TemplateByID(id string) (DorkTemplate, bool)
TemplateByID returns one template by ID.
func Templates ¶
func Templates() []DorkTemplate
Templates returns a copy of the built-in dork library.
type Kit ¶
type Kit struct {
// contains filtered or unexported fields
}
Kit exposes GitHub Code Search for leaked secrets. It uses the external Fetcher port (not target-scoped HTTP) and the host's GitHub token setting.
func (*Kit) Call ¶
Call is the envelope shell: every return path from dispatch is normalized so Status/OK/Meta and a clamped Summary hold on success and failure alike.
func (*Kit) SetProxyURL ¶
SetProxyURL sets the egress proxy for GitHub API requests.
type SearchItem ¶
type SearchItem struct {
Repo string `json:"repo"`
RepoURL string `json:"repo_url"`
Path string `json:"path"`
FileURL string `json:"file_url"`
Stars int `json:"stars"`
Fork bool `json:"fork"`
OwnerLogin string `json:"owner_login,omitempty"`
PushedAt string `json:"pushed_at,omitempty"`
Fragments []string `json:"fragments,omitempty"`
SecretType string `json:"secret_type"`
Credibility Credibility `json:"credibility"`
}