Versions in this module Expand all Collapse all v0 v0.0.2 Jun 25, 2026 v0.0.1 Jun 25, 2026 Changes in this version + var ExpressionPlaceholder = "EXPR" + func DecodeString(in string) string + func MaybeURL(in string) bool + func PrintTree(source []byte) string + type Analyzer struct + func NewAnalyzer(source []byte) *Analyzer + func (a *Analyzer) AddSecretMatcher(s SecretMatcher) + func (a *Analyzer) AddSecretMatchers(ss []SecretMatcher) + func (a *Analyzer) AddURLMatcher(u URLMatcher) + func (a *Analyzer) Close() + func (a *Analyzer) DisableDefaultURLMatchers() + func (a *Analyzer) GetSecrets() []*Secret + func (a *Analyzer) GetURLs() []*URL + func (a *Analyzer) Query(q string, fn func(*Node)) + func (a *Analyzer) QueryMulti(q string, fn func(QueryResult)) + func (a *Analyzer) RootNode() *Node + type Node struct + func NewNode(n *sitter.Node, source []byte) *Node + func (n *Node) AsArray() []any + func (n *Node) AsGoType() any + func (n *Node) AsMap() map[string]any + func (n *Node) AsNumber() any + func (n *Node) AsObject() Object + func (n *Node) CaptureName() string + func (n *Node) Child(index int) *Node + func (n *Node) ChildByFieldName(name string) *Node + func (n *Node) ChildCount() int + func (n *Node) Children() []*Node + func (n *Node) CollapsedString() string + func (n *Node) Content() string + func (n *Node) DecodedString() string + func (n *Node) ForEachChild(fn func(*Node)) + func (n *Node) ForEachNamedChild(fn func(*Node)) + func (n *Node) Format() (string, error) + func (n *Node) IsNamed() bool + func (n *Node) IsStringy() bool + func (n *Node) IsValid() bool + func (n *Node) NamedChild(index int) *Node + func (n *Node) NamedChildCount() int + func (n *Node) NamedChildren() []*Node + func (n *Node) NextNamedSibling() *Node + func (n *Node) NextSibling() *Node + func (n *Node) Parent() *Node + func (n *Node) PrevNamedSibling() *Node + func (n *Node) PrevSibling() *Node + func (n *Node) Query(query string, fn func(*Node)) + func (n *Node) QueryMulti(query string, fn func(QueryResult)) + func (n *Node) RawString() string + func (n *Node) Type() string + type Object struct + func NewObject(n *Node, source []byte) Object + func (o Object) AsMap() map[string]string + func (o Object) GetKeys() []string + func (o Object) GetNode(key string) *Node + func (o Object) GetNodeFunc(fn func(key string) bool) *Node + func (o Object) GetNodeI(key string) *Node + func (o Object) GetObject(key string) Object + func (o Object) GetString(key, defaultVal string) string + func (o Object) GetStringI(key, defaultVal string) string + func (o Object) HasValidNode() bool + type QueryResult map[string]*Node + func NewQueryResult(nodes ...*Node) QueryResult + func (qr QueryResult) Add(n *Node) + func (qr QueryResult) Get(captureName string) *Node + func (qr QueryResult) Has(captureName string) bool + type Secret struct + Context any + Data any + Filename string + Kind string + Severity Severity + type SecretMatcher struct + Fn func(*Node) *Secret + Query string + func AllSecretMatchers() []SecretMatcher + type Severity string + const SeverityHigh + const SeverityInfo + const SeverityLow + const SeverityMedium + type URL struct + BodyParams []string + ContentType string + Filename string + Headers map[string]string + Method string + QueryParams []string + Source string + Type string + URL string + type URLMatcher struct + Fn func(*Node) *URL + Type string + func AllURLMatchers() []URLMatcher + type UserPattern struct + Key string + Name string + Object []*UserPattern + Severity Severity + Value string + func (u *UserPattern) MatchKey(in string) bool + func (u *UserPattern) MatchValue(in string) bool + func (u *UserPattern) ParseRegex() error + func (u *UserPattern) SecretMatcher() SecretMatcher + type UserPatterns []*UserPattern + func ParseUserPatterns(r io.Reader) (UserPatterns, error) + func (u UserPatterns) SecretMatchers() []SecretMatcher