mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Do not track taint for keys in sync.Map
There is no way to get the value of a key out of a `sync.Map`.
This commit is contained in:
@@ -6,10 +6,10 @@ extensions:
|
||||
- ["sync", "Map", True, "CompareAndSwap", "", "", "Argument[2]", "Argument[receiver]", "taint", "manual"]
|
||||
- ["sync", "Map", True, "Load", "", "", "Argument[receiver]", "ReturnValue[0]", "taint", "manual"]
|
||||
- ["sync", "Map", True, "LoadOrStore", "", "", "Argument[receiver]", "ReturnValue[0]", "taint", "manual"]
|
||||
- ["sync", "Map", True, "LoadOrStore", "", "", "Argument[0..1]", "Argument[receiver]", "taint", "manual"]
|
||||
- ["sync", "Map", True, "LoadOrStore", "", "", "Argument[0..1]", "ReturnValue[0]", "taint", "manual"]
|
||||
- ["sync", "Map", True, "Store", "", "", "Argument[0..1]", "Argument[receiver]", "taint", "manual"]
|
||||
- ["sync", "Map", True, "LoadOrStore", "", "", "Argument[1]", "Argument[receiver]", "taint", "manual"]
|
||||
- ["sync", "Map", True, "LoadOrStore", "", "", "Argument[1]", "ReturnValue[0]", "taint", "manual"]
|
||||
- ["sync", "Map", True, "Store", "", "", "Argument[1]", "Argument[receiver]", "taint", "manual"]
|
||||
- ["sync", "Map", True, "Swap", "", "", "Argument[receiver]", "ReturnValue[0]", "taint", "manual"]
|
||||
- ["sync", "Map", True, "Swap", "", "", "Argument[0..1]", "Argument[receiver]", "taint", "manual"]
|
||||
- ["sync", "Map", True, "Swap", "", "", "Argument[1]", "Argument[receiver]", "taint", "manual"]
|
||||
- ["sync", "Pool", True, "Get", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"]
|
||||
- ["sync", "Pool", True, "Put", "", "", "Argument[0]", "Argument[receiver]", "taint", "manual"]
|
||||
|
||||
@@ -16,20 +16,6 @@ func TaintStepTest_SyncMapLoadOrStore_B0I0O0(sourceCQL interface{}) interface{}
|
||||
return intoInterface650
|
||||
}
|
||||
|
||||
func TaintStepTest_SyncMapLoadOrStore_B1I0O0(sourceCQL interface{}) interface{} {
|
||||
fromInterface784 := sourceCQL.(interface{})
|
||||
var intoMap957 sync.Map
|
||||
intoMap957.LoadOrStore(fromInterface784, nil)
|
||||
return intoMap957
|
||||
}
|
||||
|
||||
func TaintStepTest_SyncMapLoadOrStore_B1I0O1(sourceCQL interface{}) interface{} {
|
||||
fromInterface520 := sourceCQL.(interface{})
|
||||
var mediumObjCQL sync.Map
|
||||
intoInterface443, _ := mediumObjCQL.LoadOrStore(fromInterface520, nil)
|
||||
return intoInterface443
|
||||
}
|
||||
|
||||
func TaintStepTest_SyncMapLoadOrStore_B1I1O0(sourceCQL interface{}) interface{} {
|
||||
fromInterface127 := sourceCQL.(interface{})
|
||||
var intoMap483 sync.Map
|
||||
@@ -44,13 +30,6 @@ func TaintStepTest_SyncMapLoadOrStore_B1I1O1(sourceCQL interface{}) interface{}
|
||||
return intoInterface982
|
||||
}
|
||||
|
||||
func TaintStepTest_SyncMapStore_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromInterface417 := sourceCQL.(interface{})
|
||||
var intoMap584 sync.Map
|
||||
intoMap584.Store(fromInterface417, nil)
|
||||
return intoMap584
|
||||
}
|
||||
|
||||
func TaintStepTest_SyncMapStore_B0I1O0(sourceCQL interface{}) interface{} {
|
||||
fromInterface991 := sourceCQL.(interface{})
|
||||
var intoMap881 sync.Map
|
||||
@@ -58,12 +37,6 @@ func TaintStepTest_SyncMapStore_B0I1O0(sourceCQL interface{}) interface{} {
|
||||
return intoMap881
|
||||
}
|
||||
|
||||
func TaintStepTest_SyncMapSwapinkey(sourceCQL interface{}) interface{} {
|
||||
var m sync.Map
|
||||
m.Swap(sourceCQL, "value")
|
||||
return m
|
||||
}
|
||||
|
||||
func TaintStepTest_SyncMapSwapinvalue(sourceCQL interface{}) interface{} {
|
||||
var m sync.Map
|
||||
m.Swap("key", sourceCQL)
|
||||
@@ -106,16 +79,6 @@ func RunAllTaints_Sync() {
|
||||
out := TaintStepTest_SyncMapLoadOrStore_B0I0O0(source)
|
||||
sink(1, out)
|
||||
}
|
||||
{
|
||||
source := newSource(2)
|
||||
out := TaintStepTest_SyncMapLoadOrStore_B1I0O0(source)
|
||||
sink(2, out)
|
||||
}
|
||||
{
|
||||
source := newSource(3)
|
||||
out := TaintStepTest_SyncMapLoadOrStore_B1I0O1(source)
|
||||
sink(3, out)
|
||||
}
|
||||
{
|
||||
source := newSource(4)
|
||||
out := TaintStepTest_SyncMapLoadOrStore_B1I1O0(source)
|
||||
@@ -126,11 +89,6 @@ func RunAllTaints_Sync() {
|
||||
out := TaintStepTest_SyncMapLoadOrStore_B1I1O1(source)
|
||||
sink(5, out)
|
||||
}
|
||||
{
|
||||
source := newSource(6)
|
||||
out := TaintStepTest_SyncMapStore_B0I0O0(source)
|
||||
sink(6, out)
|
||||
}
|
||||
{
|
||||
source := newSource(7)
|
||||
out := TaintStepTest_SyncMapStore_B0I1O0(source)
|
||||
@@ -146,11 +104,6 @@ func RunAllTaints_Sync() {
|
||||
out := TaintStepTest_SyncPoolPut_B0I0O0(source)
|
||||
sink(9, out)
|
||||
}
|
||||
{
|
||||
source := newSource(10)
|
||||
out := TaintStepTest_SyncMapSwapinkey(source)
|
||||
sink(10, out)
|
||||
}
|
||||
{
|
||||
source := newSource(11)
|
||||
out := TaintStepTest_SyncMapSwapinvalue(source)
|
||||
|
||||
Reference in New Issue
Block a user