Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/akwick/gotcha
/ functions
Functions
454 in github.com/akwick/gotcha
⨍
Functions
454
◇
Types & classes
53
↓ 62 callers
Method
Error
()
lattice/taint/flowFunc.go:61
↓ 50 callers
Method
TransferFunction
TransferFunction returns a PlainFF which describes the change of a lattice.Valuer caused by node
transferFunction/semanticer.go:15
↓ 40 callers
Method
Node
Node returns the node of the transition
worklist/transition.go:56
↓ 40 callers
Method
String
()
worklist/valueContext.go:139
↓ 38 callers
Method
Equal
Equal returns true if the function and the entry lattice of two value contextes are equal
worklist/valueContext.go:40
↓ 36 callers
Method
String
String returns a readable string of the value
lattice/lattice.go:76
↓ 32 callers
Method
GetIn
GetIn returns the entry lattice of a value context
worklist/valueContext.go:32
↓ 30 callers
Method
Equal
Equal returns true if lv1 == lv2
lattice/lattice.go:68
↓ 26 callers
Method
Context
Context returns the context of the caller
worklist/transition.go:61
↓ 26 callers
Function
getLatticeMock1
Building Lattices with the Mocks L1: {t1 -> Empty, t2 -> Tainted, t3 -> Untainted, t5 -> Both}
lattice/taint/ssaValMock.go:54
↓ 25 callers
Method
LeastUpperBound
LeastUpperBound returns the the lub of lv1 and lv2
lattice/lattice.go:62
↓ 24 callers
Method
GetOut
()
worklist/valueContext.go:255
↓ 23 callers
Method
Error
Error returns a string of all flows beeing in e.
worklist/wlHelper.go:32
↓ 22 callers
Method
GetVal
GetVal returns the abstract value of key of the lattice
lattice/lattice.go:36
↓ 18 callers
Method
Name
()
lattice/taint/ssaValMock.go:16
↓ 17 callers
Method
DeepCopy
DeepCopy returns a deep copy of the lattice
lattice/lattice.go:32
↓ 14 callers
Method
SetVal
SetVal sets key to val in the lattice
lattice/lattice.go:38
↓ 14 callers
Function
check
For all testdata checks a) returned value is of Type errInFlow (we are expecting flows) b) the number of reported flows is equal to the expected numbe
tests/helper.go:13
↓ 13 callers
Function
getLatticeMock2
L2: {t1 -> Tainted, t2 -> Untainted, t3 -> Empty, t4 -> Untainted}
lattice/taint/ssaValMock.go:65
↓ 12 callers
Method
Context
Context returns the valueContext of c
worklist/contextCallSite.go:63
↓ 12 callers
Method
Node
Node returns the ssa.Instruction of c
worklist/contextCallSite.go:58
↓ 10 callers
Method
EntryValue
EntryValue returns the entryValue lattice of a valueContext
worklist/valueContext.go:317
↓ 9 callers
Method
Type
()
lattice/taint/ssaValMock.go:28
↓ 9 callers
Function
initContext
(ssaFun *ssa.Function)
worklist/wlinit.go:88
↓ 9 callers
Function
initSSAandPTA
Initializations
worklist/wlinit.go:25
↓ 8 callers
Method
GetVal
GetVal returns the value of key from the lattice. Empty will be returned if the key is not in the lattice. In such a case we set manually the value of
lattice/taint/taintLattice.go:360
↓ 8 callers
Method
GreatestLowerBound
GreatestLowerBound returns the the glb of lv1 and lv2
lattice/lattice.go:64
↓ 8 callers
Method
getFirstCCS
GetFirstCCS returns the first contextCallsite.
worklist/wlMap.go:35
↓ 8 callers
Function
getLatticeMock3
L3: {t2 -> Empty, t3 -> Empty, t5 -> Tainted}
lattice/taint/ssaValMock.go:76
↓ 7 callers
Method
ExitValue
ExitValue returns the exitValue lattice of a valueContext
worklist/valueContext.go:322
↓ 7 callers
Method
GetPtrs
()
lattice/taint/taintLatticePointer.go:138
↓ 7 callers
Method
Parent
()
lattice/taint/ssaValMock.go:22
↓ 7 callers
Function
checkNoChange
(t *testing.T, l Lattice, lTest Lattice)
lattice/taint/taintLattice_test.go:439
↓ 7 callers
Function
getTaintLattice
getTaintLattice returns the Lattice instance of an Latticer instance Support Lattice and LatticePointer For other instances of Latticer, the function
lattice/taint/taintLattice.go:34
↓ 6 callers
Method
AddData
AddData adds a new element to the end of l.
tests/exampleCode/h/linkedList.go:33
↓ 6 callers
Method
GetData
GetData returns the string in position i or an empty string if i does not exist
tests/exampleCode/h/linkedList.go:19
↓ 6 callers
Method
GetLat
()
lattice/taint/taintLatticePointer.go:129
↓ 6 callers
Method
IsInterface
IsInterface returns true if t contains the signature of an interface and not of an concrete type
lattice/taint/parser.go:24
↓ 6 callers
Method
SetIn
SetIn updates the entry lattice of a value context with l
worklist/valueContext.go:34
↓ 6 callers
Function
returnLUP
(lupVal lattice.Valuer)
lattice/taint/flowFunc.go:32
↓ 5 callers
Method
GetFunction
GetFunction returns the function of a value context
worklist/valueContext.go:36
↓ 5 callers
Method
GetLat
GetLat returns an instance of Latticer
lattice/lattice.go:50
↓ 5 callers
Method
Len
Len returns the lenogth of the worklist
worklist/wlMap.go:95
↓ 5 callers
Method
Method
Method returns the ssa.Function of a valueContext
worklist/valueContext.go:312
↓ 5 callers
Function
checkNoChangeL1
checkNoChangeL1 checks whether l is equal to getLatticeMock1() L1: {t1 -> Empty, t2 -> Tainted, t3 -> Untainted, t5 -> Both}
lattice/taint/taintLattice_test.go:429
↓ 5 callers
Function
handleError
(e error, msg string)
worklist/wlinit.go:81
↓ 4 callers
Method
Add
Add adds a new contextCallsite to the list Does not update the position of a contextcallsite which is already in the list,
worklist/wlMap.go:81
↓ 4 callers
Method
GetOut
GetOut returns the out lattice of context c
worklist/contextCallSite.go:92
↓ 4 callers
Method
SetOut
SetOut sets l to the output lattice for c. new_out = LUP(old_out, l) TODO: handle the error.
worklist/contextCallSite.go:87
↓ 4 callers
Function
benchmarkDoAnalysis
(file []string, b *testing.B)
tests/bench_test.go:9
↓ 4 callers
Function
getLatticeMock4
L4: {t2 -> Tainted, t3 -> Untainted, t5 -> Both}
lattice/taint/ssaValMock.go:86
↓ 4 callers
Function
initM
()
lattice/taint/ssaValMock.go:44
↓ 4 callers
Function
sink
(s string)
tests/exampleCode/structTestV4.go:32
↓ 4 callers
Function
updateEntryContext
updateEntryContext updates the in lattice of n with the idoms of n.node
worklist/wlHelper.go:129
↓ 4 callers
Function
wlInit
(path string, sourcefiles []string, sourceAndSinkFile string, allpackages bool, pkgs string, ptranalysis bool)
worklist/wlinit.go:223
↓ 3 callers
Function
GetValueContext
GetValueContext returns a new value context, if the context is not known already. If the context is already known, the function returns the known cont
worklist/valueContext.go:82
↓ 3 callers
Method
Greater
Greater returns true if lv1 > lv2
lattice/lattice.go:72
↓ 3 callers
Method
Less
Less returns true if lv1 < lv2
lattice/lattice.go:66
↓ 3 callers
Function
NewContextCallSite
NewContextCallSite creates a new contextcallsite. context is the wanted value context node is the ssa.Instruction for the contextcallsite The in and o
worklist/contextCallSite.go:29
↓ 3 callers
Method
NumberOfFlows
NumberOfFlows returns the number of taint.ErrLeaks in ErrInFlows
worklist/wlHelper.go:42
↓ 3 callers
Method
SameID
SameID compares the id of v against the id of v2 and return true if v1.id == v2.id
worklist/valueContext.go:295
↓ 3 callers
Method
String
()
lattice/taint/taintLatticePointer.go:109
↓ 3 callers
Function
flow
flow handles the flow of a node Distinguishes between a normal call and a method call which enforces a change of the context.
worklist/worklist.go:115
↓ 3 callers
Function
iterateWl
(should []td, t *testing.T)
worklist/convey_test.go:112
↓ 3 callers
Method
len
()
worklist/valueContext.go:137
↓ 3 callers
Function
sink
(s string)
tests/exampleCode/structTestV3Ref.go:33
↓ 3 callers
Function
sink
(s string)
tests/exampleCode/sinkSourceV3.go:15
↓ 3 callers
Function
sink
(s string)
tests/exampleCode/multipleChan.go:41
↓ 2 callers
Method
AddData
AddData adds a new element to the end of l.
tests/exampleCode/simpleLinkedList0.go:48
↓ 2 callers
Method
CheckAndHandleChange
CheckAndHandleChange checks whether a value context has changed. In the case the value context has changed, it will add the successory of n's node to
worklist/contextCallSite.go:104
↓ 2 callers
Method
DeepCopy
DeepCopy copies l1 and returns a new lattice.
lattice/taint/taintLattice.go:331
↓ 2 callers
Method
Equal
Equal compares l1 against l2 on equality. Throws an error if l2 is not of type taint.Lattice.
lattice/taint/taintLattice.go:206
↓ 2 callers
Method
GetData
GetData returns the string in position i or an empty string if i does not exist
tests/exampleCode/simpleLinkedList0.go:34
↓ 2 callers
Method
GetIn
()
worklist/valueContext.go:251
↓ 2 callers
Method
GetPtr
GetPtr returns the pointer.Pointer for the key
lattice/lattice.go:46
↓ 2 callers
Method
GetPtr
(key ssa.Value)
lattice/taint/taintLatticePointer.go:121
↓ 2 callers
Method
GetPtrs
GetPTrs returns a map of all variables and the corresponding pointer
lattice/lattice.go:52
↓ 2 callers
Method
Greater
Greater returns tlv > lv. Returns an error if lv is not type taint.Value.
lattice/taint/taintLattice.go:467
↓ 2 callers
Method
GreaterEqual
GreaterEqual returns true if lv1 >= lv2
lattice/lattice.go:74
↓ 2 callers
Function
IsPointerVal
IsPointerVal checks whether the value is a pointer value and in the positive case it returns the ssa.Value For some instructions like a *ssa.Call it i
lattice/taint/flow_helper.go:17
↓ 2 callers
Method
Less
Less returns tlv < lv. Returns an error (ErrOnlyTaintValueAcc) if lv is not a taint.Value.
lattice/taint/taintLattice.go:432
↓ 2 callers
Method
LessEqual
LessEqual returns true if lv1 <= lv2
lattice/lattice.go:70
↓ 2 callers
Method
RemoveFirst
RemoveFirst returns the first contextcallsite of the worklit and removes it from the list.
worklist/wlMap.go:70
↓ 2 callers
Function
a
Test a pointer as parameter
tests/exampleCode/structTestV3Ref.go:28
↓ 2 callers
Function
a
(t T)
tests/exampleCode/structTestV3Val.go:24
↓ 2 callers
Function
build
(t *testing.T)
tests/cmd_test.go:36
↓ 2 callers
Function
checkAndHandleReturn
checks whether the node of c is a return. If the node is a return statement: - update the exit lattice of the context - if the exit lattice has change
worklist/wlHelper.go:451
↓ 2 callers
Function
checkAndHandleSourcesAndsinks
(c ssa.Instruction, l lattice.Latticer, ptr bool)
lattice/taint/flow_helper.go:164
↓ 2 callers
Function
checkNoChangeL2
(t *testing.T, l Lattice)
lattice/taint/taintLattice_test.go:434
↓ 2 callers
Function
f
(ch chan string)
tests/exampleCode/chanPaper.go:15
↓ 2 callers
Function
f
(ch chan string)
tests/exampleCode/multipleChan.go:19
↓ 2 callers
Function
f
(s string)
tests/exampleCode/contextsenPtr.go:12
↓ 2 callers
Function
getSignature
(c ssa.CallCommon)
lattice/taint/flowFunc.go:246
↓ 2 callers
Function
getTaintData
(s []string)
lattice/taint/parser.go:108
↓ 2 callers
Function
logging
()
worklist/wlHelper.go:477
↓ 2 callers
Function
sink
Sink is a sink
tests/exampleCode/simpleLinkedList0.go:80
↓ 2 callers
Function
sink
(s string)
tests/exampleCode/chanPaper3.go:17
↓ 2 callers
Function
sink
(s string)
tests/exampleCode/chanPaper.go:21
↓ 2 callers
Function
sink
(s string)
tests/exampleCode/chanPaper1.go:19
↓ 2 callers
Function
sink
(s string)
tests/exampleCode/sinkSourceV2NewVariable.go:12
next →
1–100 of 454, ranked by callers