config

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 26, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FlagSet flag.FlagSet

FlagSet should be used by analyzers to reuse -config flag.

Functions

This section is empty.

Types

type Config

type Config struct {
	Sources                 []sourceMatcher
	Sinks                   []NameMatcher
	Sanitizers              []NameMatcher
	FieldPropagators        []fieldPropagatorMatcher
	TransformingPropagators []transformingPropagatorMatcher
	PropagatorArgs          argumentPropagatorMatcher
	Whitelist               []packageMatcher
	AnalysisScope           []packageMatcher
}

config contains matchers and analysis scope information

func ReadConfig

func ReadConfig() (*Config, error)

func (Config) IsPropagator

func (c Config) IsPropagator(call *ssa.Call) bool

func (Config) IsSanitizer

func (c Config) IsSanitizer(call *ssa.Call) bool

func (Config) IsSink

func (c Config) IsSink(call *ssa.Call) bool

func (Config) IsSource

func (c Config) IsSource(t types.Type) bool

func (Config) IsSourceField

func (c Config) IsSourceField(typ types.Type, fld *types.Var) bool

func (Config) IsSourceFieldAddr

func (c Config) IsSourceFieldAddr(fa *ssa.FieldAddr) bool

type NameMatcher

type NameMatcher struct {
	PackageRE regexp.Regexp
	TypeRE    regexp.Regexp
	MethodRE  regexp.Regexp
}

func (NameMatcher) MatchMethodName

func (r NameMatcher) MatchMethodName(c *ssa.Call) bool

Directories

Path Synopsis
Package regexp contains functionality for unmarshalling regular expressions from a config.
Package regexp contains functionality for unmarshalling regular expressions from a config.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL