source

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package source contains the logic related to the concept of the source which may be tainted.

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name:       "source",
	Doc:        "This analyzer identifies ssa.Values as dataflow sources.",
	Flags:      config.FlagSet,
	Run:        run,
	Requires:   []*analysis.Analyzer{buildssa.Analyzer},
	ResultType: reflect.TypeOf(new(ResultType)).Elem(),
}

Functions

This section is empty.

Types

type ResultType

type ResultType = map[*ssa.Function][]*Source

type Source

type Source struct {
	// contains filtered or unexported fields
}

Source represents a Source in an SSA call tree. It is based on ssa.Node, with the added functionality of computing the recursive graph of its referrers. Source.sanitized notes sanitizer calls that sanitize this Source

func New

func New(in ssa.Node, config classifier) *Source

New constructs a Source

func (*Source) HasPathTo

func (a *Source) HasPathTo(n ssa.Node) bool

HasPathTo returns true when a Node is part of declaration-use graph.

func (*Source) IsSanitizedAt

func (a *Source) IsSanitizedAt(call ssa.Instruction) bool

IsSanitizedAt returns true when the Source is sanitized by the supplied instruction.

func (*Source) Node

func (a *Source) Node() ssa.Node

Node returns the underlying ssa.Node of the Source.

func (*Source) RefersTo added in v0.1.2

func (a *Source) RefersTo(n ssa.Node) bool

func (*Source) String

func (a *Source) String() string

String implements Stringer interface.

Jump to

Keyboard shortcuts

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