File tree 2 files changed +11
-5
lines changed
regression/end_to_end/tainted-user-class 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 5
5
"comment" : " Taint source" ,
6
6
"id" : " basic1_source" ,
7
7
"class" : " subclass" ,
8
- "method" : " source:()[ Lsubclass;" ,
8
+ "method" : " source:()Lsubclass;" ,
9
9
"result" : {
10
10
"location" : " return_value" ,
11
11
"taint" : " XXX"
Original file line number Diff line number Diff line change 3
3
import run_security_analyser_pipeline
4
4
5
5
import os .path
6
+ import pytest
6
7
7
8
def test_user_class ():
8
9
traces = run_security_analyser_pipeline (
@@ -12,12 +13,17 @@ def test_user_class():
12
13
assert traces .count_traces () > 0
13
14
assert traces .trace_exists ("java::test.main:(I)V" , 16 )
14
15
16
+ @pytest .mark .xfail (strict = True )
15
17
def test_user_subclass ():
16
- # The current behaviour may not be what we want, but this verifies if
17
- # it has changed: taint assigned to a subtype and taint cleared / read
18
- # from a supertype are currently *always distinct*.
18
+ """
19
+ The issue is the instrumentation; Although the taint var is here
20
+ struct subclass { struct test @test; _Bool @__CPROVER_XXX; }
21
+ However, the sink test looks like this
22
+ IF !((struct test *)anonlocal::3a)->@__CPROVER_XXX THEN GOTO 5
23
+ """
19
24
traces = run_security_analyser_pipeline (
20
25
"subclass.class" ,
21
26
"subclass_rules.json" ,
22
27
os .path .realpath (os .path .dirname (__file__ )))
23
- assert traces .count_traces () == 0
28
+ assert traces .count_traces () == 1
29
+ assert traces .trace_exists ("java::subclass.main:(I)V" , 14 )
You can’t perform that action at this time.
0 commit comments