Skip to content

Commit 4bfb1ef

Browse files
authored
Merge pull request diffblue#394 from diffblue/add_alfresco_rules
Added rules file for Alfresco.
2 parents 1aad902 + 86effa9 commit 4bfb1ef

File tree

1 file changed

+106
-0
lines changed

1 file changed

+106
-0
lines changed

benchmarks/GENUINE/AlfrescoRules.json

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
{
2+
"namespace": "com.diffblue.security",
3+
"rules":
4+
[
5+
{
6+
"comment": "Global FacesContext is potentially tainted",
7+
"class": "javax.faces.context.FacesContext",
8+
"method": "getCurrentInstance:()Ljavax/faces/context/FacesContext;",
9+
"result": {
10+
"location": "returns",
11+
"taint": "Tainted FacesContext"
12+
}
13+
},
14+
{
15+
"comment": "Tainted FacesContext gives a tainted ResponseWriter",
16+
"class": "javax.faces.context.FacesContext",
17+
"method": "getResponseWriter:()Ljavax/faces/context/ResponseWriter;",
18+
"input": {
19+
"location": "this",
20+
"taint": "Tainted FacesContext"
21+
},
22+
"result": {
23+
"location": "returns",
24+
"taint": "Tainted ResponseWriter"
25+
}
26+
},
27+
{
28+
"comment": "A JSONWriter created from a tainted ResponseWriter is tainted",
29+
"class": "org.springframework.extensions.webscripts.json.JSONWriter",
30+
"method": "<init>:(Ljava/io/Writer;)V",
31+
"input": {
32+
"location": "arg1",
33+
"taint": "Tainted ResponseWriter"
34+
},
35+
"result": {
36+
"location": "this",
37+
"taint": "Tainted JSONWriter"
38+
}
39+
},
40+
{
41+
"comment": "Tainted FacesContext gives a tainted ExternalContext",
42+
"class": "javax.faces.context.FacesContext",
43+
"method": "getExternalContext:()Ljavax/faces/context/ExternalContext;",
44+
"input": {
45+
"location": "this",
46+
"taint": "Tainted FacesContext"
47+
},
48+
"result": {
49+
"location": "returns",
50+
"taint": "Tainted ExternalContext"
51+
}
52+
},
53+
{
54+
"comment": "Tainted ExternalContext gives a tainted parameter map",
55+
"class": "javax.faces.context.ExternalContext",
56+
"method": "getRequestParameterMap:()Ljava/util/Map;",
57+
"input": {
58+
"location": "this",
59+
"taint": "Tainted ExternalContext"
60+
},
61+
"result": {
62+
"location": "returns",
63+
"taint": "Tainted Parameter Map"
64+
}
65+
},
66+
{
67+
"comment": "Get on a tainted map returns a tainted object",
68+
"class": "java.util.Map",
69+
"method": "get:(Ljava/lang/Object;)Ljava/lang/Object;",
70+
"input": {
71+
"location": "this",
72+
"taint": "Tainted Parameter Map"
73+
},
74+
"result": {
75+
"location": "returns",
76+
"taint": "Tainted String"
77+
}
78+
},
79+
{
80+
"comment": "Writing a tainted string to a vulnerable JSONWriter is a sink",
81+
"class": "org.springframework.extensions.webscripts.json.JSONWriter",
82+
"method": "writeValue:(Ljava/lang/String;Ljava/lang/String;)Lorg/springframework/extensions/webscripts/json/JSONWriter;",
83+
"input": {
84+
"location": "arg1",
85+
"taint": "Tainted String"
86+
},
87+
"sinkTarget": {
88+
"location": "this",
89+
"vulnerability": "Tainted JSONWriter"
90+
}
91+
},
92+
{
93+
"comment": "Writing a tainted string to a vulnerable JSONWriter is a sink",
94+
"class": "org.springframework.extensions.webscripts.json.JSONWriter",
95+
"method": "writeValue:(Ljava/lang/String;Ljava/lang/String;)Lorg/springframework/extensions/webscripts/json/JSONWriter;",
96+
"input": {
97+
"location": "arg2",
98+
"taint": "Tainted String"
99+
},
100+
"sinkTarget": {
101+
"location": "this",
102+
"vulnerability": "Tainted JSONWriter"
103+
}
104+
}
105+
]
106+
}

0 commit comments

Comments
 (0)