Documentation ¶
Index ¶
- Variables
- func SetBytes(b []byte)
- type Config
- func (c Config) IsExcluded(path, recv, name string) bool
- func (c Config) IsSanitizer(path, recv, name string) bool
- func (c Config) IsSink(path, recv, name string) bool
- func (c Config) IsSourceField(path, typeName, fieldName string) bool
- func (c Config) IsSourceFieldTag(tag string) bool
- func (c Config) IsSourceType(path, name string) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // FlagSet should be used by analyzers to reuse -config flag. FlagSet flag.FlagSet )
Functions ¶
Types ¶
type Config ¶
type Config struct { ReportMessage string Sources []sourceMatcher Sinks []funcMatcher Sanitizers []funcMatcher FieldTags []fieldTagMatcher Exclude []funcMatcher AllowPanicOnTaintedValues bool // Whether to use EAR pointer analysis as the taint propagation engine. UseEAR bool // Control the span of the call chain from a source to a sink when analyzing EAR references. // This can reduce false positives and enhance the performance. EARTaintCallSpan uint }
Config contains matchers and analysis scope information.
func ReadConfig ¶
ReadConfig reads configuration from the config cache. The cache reads, parses, and validates the config file if necessary. If the config bytes were set using SetConfigBytes, they are used instead.
func (Config) IsExcluded ¶ added in v0.1.4
IsExcluded determines if a function matches one of the exclusion patterns.
func (Config) IsSanitizer ¶
IsSanitizer determines whether a function is a sanitizer.
func (Config) IsSourceField ¶
IsSourceField determines whether a field is a source.
func (Config) IsSourceFieldTag ¶ added in v0.1.4
IsSourceFieldTag determines whether a field tag made up of a key and value is a Source.
func (Config) IsSourceType ¶ added in v0.1.5
IsSourceType determines whether a type is a source.
Click to show internal directories.
Click to hide internal directories.