Skip to content

Commit bc9c498

Browse files
committed
Updates requested in the review.
1 parent b174246 commit bc9c498

File tree

1 file changed

+10
-126
lines changed

1 file changed

+10
-126
lines changed

benchmarks/GENUINE/DSpace_rules.json

Lines changed: 10 additions & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"method": "getAttribute:(Ljava/lang/String;)Ljava/lang/Object;",
99
"result": {
1010
"location": "returns",
11-
"taint": "Tainted servlet attribute"
11+
"taint": "Tainted request attribute"
1212
}
1313
},
1414
{
@@ -25,12 +25,12 @@
2525

2626

2727
{
28-
"comment": "Obtained stream from the tainted servlet attribute.",
28+
"comment": "Obtained stream from the tainted request attribute.",
2929
"class": "org.apache.commons.fileupload.FileItem",
3030
"method": "getInputStream:()Ljava/io/InputStream;",
3131
"input": {
3232
"location": "this",
33-
"taint": "Tainted servlet attribute"
33+
"taint": "Tainted request attribute"
3434
},
3535
"result": {
3636
"location": "returns",
@@ -59,93 +59,6 @@
5959
"vulnerability": "Tainted input stream"
6060
}
6161
},
62-
{
63-
"comment": "Marking path to the file where is written the content of a tainted stream as tainted.",
64-
"class": "java.nio.file.Files",
65-
"method": "copy:(Ljava/io/InputStream;Ljava/nio/file/Path;[Ljava/nio/file/CopyOption;)J",
66-
"input": {
67-
"location": "arg0",
68-
"taint": "Tainted input stream"
69-
},
70-
"result": {
71-
"location": "arg1",
72-
"taint": "Tainted pathname"
73-
}
74-
},
75-
{
76-
"comment": "Writing a tainted string to a file makes the file tainted.",
77-
"class": "org.apache.commons.io.FileUtils",
78-
"method": "writeStringToFile:(Ljava/io/File;Ljava/lang/String;)V",
79-
"result": {
80-
"location": "this",
81-
"taint": "Tainted file"
82-
}
83-
},
84-
{
85-
"comment": "Obtained ZIP file from potentially tainted file.",
86-
"class": "java.util.zip.ZipFile",
87-
"method": "<init>:(Ljava/io/File;Ljava/nio/charset/Charset;)V",
88-
"input": {
89-
"location": "arg1",
90-
"taint": "Tainted file"
91-
},
92-
"result": {
93-
"location": "this",
94-
"taint": "Tainted zip file"
95-
}
96-
},
97-
{
98-
"comment": "Collection of entries from tainted ZIP file are tainted.",
99-
"class": "java.util.zip.ZipFile",
100-
"method": "entries:()Ljava/util/Enumeration;",
101-
"input": {
102-
"location": "this",
103-
"taint": "Tainted zip file"
104-
},
105-
"result": {
106-
"location": "returns",
107-
"taint": "Tainted zip entries"
108-
}
109-
},
110-
{
111-
"comment": "Any entry from tainted collection of ZIP entries is tainted.",
112-
"class": "java.util.Enumeration",
113-
"method": "nextElement:()Ljava/lang/Object;",
114-
"input": {
115-
"location": "this",
116-
"taint": "Tainted zip entries"
117-
},
118-
"result": {
119-
"location": "returns",
120-
"taint": "Tainted zip entry"
121-
}
122-
},
123-
{
124-
"comment": "Input stream returned from tainted ZIP file is tainted.",
125-
"class": "java.util.zip.ZipFile",
126-
"method": "getInputStream:(Ljava/util/zip/ZipEntry;)Ljava/io/InputStream;",
127-
"input": {
128-
"location": "this",
129-
"taint": "Tainted zip file"
130-
},
131-
"result": {
132-
"location": "returns",
133-
"taint": "Tainted input stream"
134-
}
135-
},
136-
{
137-
"comment": "Input stream returned from a ZIP file for tainted ZIP entry is tainted.",
138-
"class": "java.util.zip.ZipFile",
139-
"method": "getInputStream:(Ljava/util/zip/ZipEntry;)Ljava/io/InputStream;",
140-
"input": {
141-
"location": "arg1",
142-
"taint": "Tainted zip entry"
143-
},
144-
"result": {
145-
"location": "returns",
146-
"taint": "Tainted input stream"
147-
}
148-
},
14962

15063
{
15164
"comment": "Streams returned by getInputStream on ServletRequest are tainted",
@@ -157,7 +70,7 @@
15770
}
15871
},
15972
{
160-
"comment": "Read from tainted stream gives tainted array of bytes",
73+
"comment": "Read up to exact number of bytes from tainted stream gives tainted array of bytes",
16174
"class": "java.io.InputStream",
16275
"method": "read:([BII)I",
16376
"input": {
@@ -170,7 +83,7 @@
17083
}
17184
},
17285
{
173-
"comment": "Read from tainted stream gives tainted array of bytes",
86+
"comment": "Read some number of bytes from tainted stream gives tainted array of bytes",
17487
"class": "java.io.InputStream",
17588
"method": "read:([B)I",
17689
"input": {
@@ -192,7 +105,7 @@
192105
}
193106
},
194107
{
195-
"comment": "Read from file channel gives tainted buffer of bytes",
108+
"comment": "Read from file channel gives tainted buffer of bytes.",
196109
"class": "java.nio.channels.FileChannel",
197110
"method": "read:(Ljava/nio/ByteBuffer;)I",
198111
"result": {
@@ -201,7 +114,7 @@
201114
}
202115
},
203116
{
204-
"comment": "Read from file channel gives tainted buffer of bytes",
117+
"comment": "Read from tainted buffer of bytes gives a tainted string.",
205118
"class": "java.nio.ByteBuffer",
206119
"method": "toString:()Ljava/lang/String;",
207120
"input": {
@@ -280,35 +193,6 @@
280193
},
281194

282195

283-
{
284-
"comment": "Put a tainted object to a map makes the map tainted.",
285-
"class": "java.util.Map",
286-
"method": "put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;",
287-
"input": {
288-
"location": "arg2",
289-
"taint": "Tainted object"
290-
},
291-
"result": {
292-
"location": "returns",
293-
"taint": "Tainted map"
294-
}
295-
},
296-
{
297-
"comment": "Gut an object from a tainted map is a tainted object.",
298-
"class": "java.util.Map",
299-
"method": "get:(Ljava/lang/Object;)Ljava/lang/Object;",
300-
"input": {
301-
"location": "this",
302-
"taint": "Tainted map"
303-
},
304-
"result": {
305-
"location": "returns",
306-
"taint": "Tainted object"
307-
}
308-
},
309-
310-
311-
312196
{
313197
"comment": "Get an iterator to characters of a tainted string is a tainted iterator.",
314198
"class": "com.ibm.icu.text.RuleBasedCollator",
@@ -336,7 +220,7 @@
336220
}
337221
},
338222
{
339-
"comment": "Converting integer (character code) from tainted character sequence to a tainted string.",
223+
"comment": "Converting tainted integer to a tainted string.",
340224
"class": "java.lang.Integer",
341225
"method": "toString:(II)Ljava/lang/String;",
342226
"input": {
@@ -370,7 +254,7 @@
370254
"taint": "Tainted list"
371255
},
372256
"result": {
373-
"location": "this",
257+
"location": "returns",
374258
"taint": "Tainted array"
375259
}
376260
},
@@ -409,7 +293,7 @@
409293
"taint": "Tainted object"
410294
},
411295
"result": {
412-
"location": "returns",
296+
"location": "this",
413297
"taint": "Tainted SQL query statement"
414298
}
415299
},

0 commit comments

Comments
 (0)