Skip to content

Commit 2207c95

Browse files
authored
Merge pull request diffblue#476 from diffblue/fixed_ginco_rules
SEC-517: Fixed rules file for Ginco.
2 parents 55ff129 + 8930b1c commit 2207c95

File tree

1 file changed

+54
-2
lines changed

1 file changed

+54
-2
lines changed

benchmarks/GENUINE/GincoRules.json

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,19 @@
6363
"taint": "Tainted Set"
6464
}
6565
},
66+
{
67+
"comment": "Obtained tainted Set from tainted Map",
68+
"class": "java.util.HashMap",
69+
"method": "keySet:()Ljava/util/Set;",
70+
"input": {
71+
"location": "this",
72+
"taint": "Tainted Map"
73+
},
74+
"result": {
75+
"location": "returns",
76+
"taint": "Tainted Set"
77+
}
78+
},
6679
{
6780
"comment": "Obtained tainted Iterator from tainted Set",
6881
"class": "java.util.Set",
@@ -76,10 +89,36 @@
7689
"taint": "Tainted Iterator"
7790
}
7891
},
92+
{
93+
"comment": "Obtained tainted Iterator from tainted Set",
94+
"class": "java.util.HashMap$KeySet",
95+
"method": "iterator:()Ljava/util/Iterator;",
96+
"input": {
97+
"location": "this",
98+
"taint": "Tainted Set"
99+
},
100+
"result": {
101+
"location": "returns",
102+
"taint": "Tainted Iterator"
103+
}
104+
},
105+
{
106+
"comment": "Obtained tainted Object from tainted Iterator",
107+
"class": "java.util.HashMap$KeyIterator",
108+
"method": "next:()Ljava/lang/Object;",
109+
"input": {
110+
"location": "this",
111+
"taint": "Tainted Iterator"
112+
},
113+
"result": {
114+
"location": "returns",
115+
"taint": "Tainted Thesaurus"
116+
}
117+
},
79118
{
80119
"comment": "Obtained tainted Object from tainted Iterator",
81120
"class": "java.util.Iterator",
82-
"method": "next:()Ljava/util/Object;",
121+
"method": "next:()Ljava/lang/Object;",
83122
"input": {
84123
"location": "this",
85124
"taint": "Tainted Iterator"
@@ -92,7 +131,7 @@
92131
{
93132
"comment": "Obtained tainted String from tainted Thesaurus",
94133
"class": "fr.mcc.ginco.beans.Thesaurus",
95-
"method": "getTitle:()Ljava/lang/String;()",
134+
"method": "getTitle:()Ljava/lang/String;",
96135
"input": {
97136
"location": "this",
98137
"taint": "Tainted Thesaurus"
@@ -141,6 +180,19 @@
141180
"taint": "Tainted String"
142181
}
143182
},
183+
{
184+
"comment": "HACK[stub for missing apache libs]:By unescaping tainted String we get a tainted string again.",
185+
"class": "org.apache.commons.lang3.StringEscapeUtils",
186+
"method": "unescapeHtml4:(Ljava/lang/String;)Ljava/lang/String;",
187+
"input": {
188+
"location": "arg0",
189+
"taint": "Tainted String"
190+
},
191+
"result": {
192+
"location": "returns",
193+
"taint": "Tainted String"
194+
}
195+
},
144196
{
145197
"comment": "ARTIFICIAL sink to capture servlet returning tainted String.",
146198
"class": "Main",

0 commit comments

Comments
 (0)