Versions in this module Expand all Collapse all v0 v0.5.0 May 3, 2026 v0.4.55-fp-fix Feb 27, 2026 v0.1.3 May 27, 2026 Changes in this version + const LabelCLI + const LabelDatabase + const LabelEnvironment + const LabelFile + const LabelHTTPBody + const LabelHTTPCookie + const LabelHTTPGet + const LabelHTTPHeader + const LabelHTTPPost + const LabelNetwork + const LabelUserInput + const SourceCLIArg + const SourceDatabase + const SourceEnvVar + const SourceFile + const SourceHTTPBody + const SourceHTTPCookie + const SourceHTTPFile + const SourceHTTPGet + const SourceHTTPHeader + const SourceHTTPJSON + const SourceHTTPPath + const SourceHTTPPost + const SourceHTTPRequest + const SourceNetwork + const SourceSession + const SourceStdin + const SourceUnknown + const SourceUserInput + var AllSourceTypes = core.AllSourceTypes + var CArgvPattern = regexp.MustCompile(`argv\s*\[\s*(\d+|\w+)\s*\]`) + var CEnvPattern = regexp.MustCompile(`(?:getenv\s*\(|envp\s*\[|environ\s*\[)`) + var CStdinPattern = regexp.MustCompile(`(?:scanf|gets|fgets|getchar|getc|getline)\s*\(`) + var ContextDependentMethodPattern = regexp.MustCompile(`(?i)->(?:get_?)?(?:val|text|int|bool|array|raw_?val|check)\s*\(`) + var ExcludeMethodPattern = regexp.MustCompile(`(?i)->(?:getData|getBody|getContent|fetch|find|load|read)\s*\(`) + var GoEchoPattern = regexp.MustCompile(`c\.(?:QueryParam|Param|FormValue|Request)`) + var GoGinPattern = regexp.MustCompile(`c\.(?:Query|Param|PostForm|GetHeader|Cookie|ShouldBind)`) + var GoRequestPattern = regexp.MustCompile(`(?:r|req|request)\.(?:URL\.Query|FormValue|Header|Cookie|Body|Form|PostForm)`) + var InputMethodPattern = regexp.MustCompile(...) + var InputObjectPattern = regexp.MustCompile(...) + var InputPropertyPattern = regexp.MustCompile(...) + var JSPropertyAccessPattern = regexp.MustCompile(`\b(\w+)\.(\w+)(?:\.(\w+))?`) + var JSRequestPattern = regexp.MustCompile(`(?:req|request|ctx)\.(?:body|query|params|cookies|headers|files?)`) + var JavaServletPattern = regexp.MustCompile(...) + var JavaSpringAnnotationPattern = regexp.MustCompile(...) + var LanguageKeywords = map[string][]string + var MethodCallPattern = regexp.MustCompile(`\$(\w+)->(\w+)\s*\(`) + var MethodCallWithArgsPattern = regexp.MustCompile(`\$(\w+)->(\w+)\s*\(\s*['"]([^'"]*)['"]\s*(?:,\s*[^)]+)?\s*\)`) + var PHPInputPatterns = []InputPattern + var PropertyArrayPattern = regexp.MustCompile(`\$(\w+)->(\w+)\[['"]?([\w\-]+)['"]?\]`) + var PythonArgparsePattern = regexp.MustCompile(`args\.(\w+)`) + var PythonDjangoPattern = regexp.MustCompile(`request\.(?:GET|POST|COOKIES|META|FILES|body|data)`) + var PythonFlaskPattern = regexp.MustCompile(`request\.(?:form|args|json|data|values|files|cookies|headers)`) + var SimplePropertyPattern = regexp.MustCompile(`\$(\w+)->(\w+)(?:[^\[\(]|$)`) + var SuperglobalForeachPattern = regexp.MustCompile(`foreach\s*\(\s*(\$_\w+)\s+as\s+\$(\w+)\s*=>\s*\$(\w+)\s*\)`) + var SuperglobalPattern = regexp.MustCompile(`\$_(GET|POST|COOKIE|REQUEST|SERVER|FILES|SESSION|ENV)\[['"]?([\w\-]+)['"]?\]`) + var SuperglobalSimplePattern = regexp.MustCompile(`\$_(GET|POST|COOKIE|REQUEST|SERVER|FILES|SESSION|ENV)`) + var UniversalKeywords = map[string]bool + func GetAllFrameworkDetectors() map[string]*FrameworkDetector + func GetOrCompileRegex(pattern string) (*regexp.Regexp, error) + func IsKeyword(word string) bool + func IsKeywordForLanguage(word, lang string) bool + func IsValidSourceType(s string) bool + func RegisterFrameworkDetector(detector *FrameworkDetector) + type BaseMatcher struct + func NewBaseMatcher(language string, sources []Definition) *BaseMatcher + func (m *BaseMatcher) FindSources(root *sitter.Node, src []byte) []Match + func (m *BaseMatcher) Language() string + type Definition struct + Description string + ExcludeParentTypes []string + ExcludePattern string + KeyExtractor string + Labels []InputLabel + Language string + Name string + NodeTypes []string + Pattern string + type FrameworkDetector struct + Framework string + Indicators []string + func GetFrameworkDetector(framework string) *FrameworkDetector + type FrameworkPattern struct + AccessPattern string + CarrierClass string + CarrierProperty string + ClassPattern string + Description string + Framework string + ID string + Language string + MethodPattern string + Name string + PopulatedBy string + PopulatedFrom []string + PropertyPattern string + SourceKey string + SourceType SourceType + Tags []string + type FrameworkPatternRegistry struct + func NewFrameworkPatternRegistry(language string) *FrameworkPatternRegistry + func (r *FrameworkPatternRegistry) Count() int + func (r *FrameworkPatternRegistry) GetAll() []*FrameworkPattern + func (r *FrameworkPatternRegistry) GetByFramework(framework string) []*FrameworkPattern + func (r *FrameworkPatternRegistry) GetByID(id string) *FrameworkPattern + func (r *FrameworkPatternRegistry) GetFrameworks() []string + func (r *FrameworkPatternRegistry) Register(pattern *FrameworkPattern) + func (r *FrameworkPatternRegistry) RegisterAll(patterns []*FrameworkPattern) + type InputLabel = core.InputLabel + type InputPattern struct + Name string + Regex *regexp.Regexp + type Match struct + Column int + EndColumn int + EndLine int + Key string + Labels []InputLabel + Line int + Snippet string + SourceType string + Variable string + type Matcher interface + FindSources func(root *sitter.Node, src []byte) []Match + Language func() string + type SourceType = core.SourceType