Skip to content

Commit 2bf606e

Browse files
authored
Curry0624 all (#137)
* sast-go/js/python2/python3 case update &config.json update * sast-go/js/python2/python3 case update &config.json update * sast-go/js/python2/python3 case update &config.json update * sast-go/js/python2/python3 case update &config.json update& java run * py2/3 caseupdate argument_passing_various_types
1 parent 1371c9d commit 2bf606e

File tree

17 files changed

+356
-10
lines changed

17 files changed

+356
-10
lines changed

sast-java/src/main/java/com/sast/astbenchmark/case_language_maturity/accuracy/object_field_sensitive/field_sensitive_one_collection/numeric_index_state_solver/package-info.java

Lines changed: 0 additions & 4 deletions
This file was deleted.

sast-python2/case/completeness/single_app_tracing/function_call/argument_passing/argument_passing_various_types_001_T.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212

1313
def argument_passing_various_types_001_T(taint_src):
1414
def process(a, b=2, *args, **kwargs):
15-
if 'd' in kwargs: d = kwargs['d']; del kwargs['d']
16-
else: d = 3
17-
c = kwargs['c']; del kwargs['c']
1815
taint_sink(b)
1916

2017
# 调用过程,展示各种参数的使用方式

sast-python2/case/completeness/single_app_tracing/function_call/argument_passing/argument_passing_various_types_002_F.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212

1313
def argument_passing_various_types_002_F(taint_src):
1414
def process(a, b=2, *args, **kwargs):
15-
if 'd' in kwargs: d = kwargs['d']; del kwargs['d']
16-
else: d = 3
17-
c = kwargs['c']; del kwargs['c']
15+
c = kwargs['c'];
1816
taint_sink(c)
1917

2018
# 调用过程,展示各种参数的使用方式
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# -*- coding: utf-8 -*-
2+
# evaluation information start
3+
# real case = true
4+
# evaluation item = 完整度->单应用跟踪完整度->函数和方法调用->参数传递
5+
# scene introduction = 参数列表1
6+
# level = 2
7+
# bind_url = completeness/single_app_tracing/function_call/argument_passing/argument_passing_various_types_003_T
8+
# evaluation information end
9+
10+
import os
11+
12+
13+
def argument_passing_various_types_003_T(taint_src):
14+
def process(a, b=2, *args, **kwargs):
15+
taint_sink(b)
16+
17+
# 调用过程,展示各种参数的使用方式
18+
process(b=taint_src, a=1, c=u"critical", data=taint_src)
19+
20+
21+
def taint_sink(o):
22+
os.system(o)
23+
24+
25+
if __name__ == u"__main__":
26+
taint_src = u"taint_src_value"
27+
argument_passing_various_types_003_T(taint_src)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# -*- coding: utf-8 -*-
2+
# evaluation information start
3+
# real case = false
4+
# evaluation item = 完整度->单应用跟踪完整度->函数和方法调用->参数传递
5+
# scene introduction = 参数列表1
6+
# level = 2
7+
# bind_url = completeness/single_app_tracing/function_call/argument_passing/argument_passing_various_types_004_F
8+
# evaluation information end
9+
10+
import os
11+
12+
13+
def argument_passing_various_types_004_F(taint_src):
14+
def process(a, b=2, *args, **kwargs):
15+
taint_sink(a)
16+
17+
# 调用过程,展示各种参数的使用方式
18+
process(b=taint_src,a=u"no", c=u"critical", data=taint_src)
19+
20+
21+
def taint_sink(o):
22+
os.system(o)
23+
24+
25+
if __name__ == u"__main__":
26+
taint_src = u"taint_src_value"
27+
argument_passing_various_types_004_F(taint_src)
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# -*- coding: utf-8 -*-
2+
# evaluation information start
3+
# real case = true
4+
# evaluation item = 完整度->单应用跟踪完整度->函数和方法调用->参数传递
5+
# scene introduction = 参数列表2
6+
# level = 2
7+
# bind_url = completeness/single_app_tracing/function_call/argument_passing/argument_passing_various_types_005_T
8+
# evaluation information end
9+
10+
import os
11+
12+
13+
def argument_passing_various_types_005_T(taint_src):
14+
def process(a, b=2, *args, **kwargs):
15+
if 'd' in kwargs: d = kwargs['d']; del kwargs['d']
16+
else: d = 3
17+
c = kwargs['c']; del kwargs['c']
18+
taint_sink(kwargs['data'])
19+
20+
# 调用过程,展示各种参数的使用方式
21+
process(1, taint_src, 4, c=u"critical", data=taint_src)
22+
23+
24+
def taint_sink(o):
25+
os.system(o)
26+
27+
28+
if __name__ == u"__main__":
29+
taint_src = u"taint_src_value"
30+
argument_passing_various_types_005_T(taint_src)
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# -*- coding: utf-8 -*-
2+
# evaluation information start
3+
# real case = false
4+
# evaluation item = 完整度->单应用跟踪完整度->函数和方法调用->参数传递
5+
# scene introduction = 参数列表2
6+
# level = 2
7+
# bind_url = completeness/single_app_tracing/function_call/argument_passing/argument_passing_various_types_006_F
8+
# evaluation information end
9+
10+
import os
11+
12+
13+
def argument_passing_various_types_006_F(taint_src):
14+
def process(a, b=2, *args, **kwargs):
15+
if 'd' in kwargs: d = kwargs['d']; del kwargs['d']
16+
else: d = 3
17+
c = kwargs['c']; del kwargs['c']
18+
taint_sink(c)
19+
20+
# 调用过程,展示各种参数的使用方式
21+
process(1, taint_src, 4, c=u"critical", data=taint_src)
22+
23+
24+
def taint_sink(o):
25+
os.system(o)
26+
27+
28+
if __name__ == u"__main__":
29+
taint_src = u"taint_src_value"
30+
argument_passing_various_types_006_F(taint_src)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# -*- coding: utf-8 -*-
2+
# evaluation information start
3+
# real case = true
4+
# evaluation item = 完整度->单应用跟踪完整度->函数和方法调用->参数传递
5+
# scene introduction = 参数列表3
6+
# level = 2
7+
# bind_url = completeness/single_app_tracing/function_call/argument_passing/argument_passing_various_types_007_T
8+
# evaluation information end
9+
10+
import os
11+
12+
13+
def argument_passing_various_types_007_T(taint_src):
14+
def process(a, b=2, *args, **kwargs):
15+
taint_sink(args[0])
16+
17+
# 调用过程,展示各种参数的使用方式
18+
process(1, taint_src, c=u"critical", data=taint_src, *(taint_src,"nono"))
19+
20+
21+
def taint_sink(o):
22+
os.system(o)
23+
24+
25+
if __name__ == u"__main__":
26+
taint_src = u"taint_src_value"
27+
argument_passing_various_types_007_T(taint_src)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# -*- coding: utf-8 -*-
2+
# evaluation information start
3+
# real case = false
4+
# evaluation item = 完整度->单应用跟踪完整度->函数和方法调用->参数传递
5+
# scene introduction = 参数列表3
6+
# level = 2
7+
# bind_url = completeness/single_app_tracing/function_call/argument_passing/argument_passing_various_types_008_F
8+
# evaluation information end
9+
10+
import os
11+
12+
13+
def argument_passing_various_types_008_F(taint_src):
14+
def process(a, b=2, *args, **kwargs):
15+
taint_sink(args[1])
16+
17+
# 调用过程,展示各种参数的使用方式
18+
process(1, taint_src, c=u"critical", data=taint_src, *(taint_src,"nono"))
19+
20+
21+
def taint_sink(o):
22+
os.system(o)
23+
24+
25+
if __name__ == u"__main__":
26+
taint_src = u"taint_src_value"
27+
argument_passing_various_types_008_F(taint_src)

sast-python2/case/completeness/single_app_tracing/function_call/argument_passing/config.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,18 @@
2929
{
3030
"compose": "argument_passing_various_types_001_T.py && !argument_passing_various_types_002_F.py",
3131
"scene": "参数列表"
32+
},
33+
{
34+
"compose": "argument_passing_various_types_003_T.py && !argument_passing_various_types_004_F.py",
35+
"scene": "参数列表1"
36+
},
37+
{
38+
"compose": "argument_passing_various_types_005_T.py && !argument_passing_various_types_006_F.py",
39+
"scene": "参数列表2"
40+
},
41+
{
42+
"compose": "argument_passing_various_types_007_T.py && !argument_passing_various_types_008_F.py",
43+
"scene": "参数列表3"
3244
}
3345
]
3446
}

0 commit comments

Comments
 (0)