Closed chengxinwei closed 1 year ago
BTW, I'm confirmed the LambdaAnalysis plugin and InvokeDynamicAnalysis plugin have been added during the analysis.
issue 1: the call graph of static void sink(SourceSink s) is missing.
The lambda function of list.stream().forEach(e -> {sink(sourceSink);})
will be invoked within the JDK, and it is not part of the APP
. So you need to change only-app:true;
to only-app:false;
issue 2: the call-graph.dot looks like has some syntax error
Yes, I will fix it later.
Before this, if you need it urgently, you can make the following modifications in your cloned Tai-e:
.setEdgeLabeler(e -> IRPrinter.toString(
- ((MethodEdge<Invoke, JMethod>) e).callSite()))
+ ((MethodEdge<Invoke, JMethod>) e).callSite())
+ .replace("\"", "\\\""))
i've changed the running arguments to
-pp -m InterTaintTransfer -cp src/test/resources/pta/taint/ -a pta=cs:2-type;dump-ci:true;dump:true;only-app:false;implicit-entries:false;handle-invokedynamic:true -a cg=dump:true
the analysis program is running for 15mins, still running......
may I ask how long it will take?
is there anyway to support lamda while using only-app:true ?
i've changed the running arguments to
-pp -m InterTaintTransfer -cp src/test/resources/pta/taint/ -a pta=cs:2-type;dump-ci:true;dump:true;only-app:false;implicit-entries:false;handle-invokedynamic:true -a cg=dump:true
the analysis program is running for 15mins, still running......
may I ask how long it will take?
I run with -pp -m InterTaintTransfer -cp src/test/resources/pta/taint/ -a pta=cs:2-type;only-app:false;implicit-entries:false;handle-invokedynamic:true -a cg=dump:true
, and it took less than 5 mins on my machine.
is there anyway to support lamda while using only-app:true ?
Sure, but note that the analysis results may not sound.
to make collection-related (CollectionMethods can be useful) and lambda-related (maybe you can use check if the class name starts with java.util.function
, java.util.stream
and so on) methods non-ignored.
got it, it's working, thank you!
Describe the bug
Hi
I'm trying to use Tai-e framework to analysis my java program, I may found a issue which Tai-e can't analysis lamda foreach statement.
the code be analysised
the arguments I start Tai-e
-pp -m InterTaintTransfer -cp src/test/resources/pta/taint/ -a pta=cs:2-type;dump-ci:true;dump:true;only-app:true;implicit-entries:false;taint-config:src/test/resources/pta/taint/taint-config.yml;handle-invokedynamic:true -a cg=dump:true
the call-graph.dot result
issue 1: the call graph of
static void sink(SourceSink s)
is missing.issue 2: the call-graph.dot looks like has some syntax error, it throw exception when I use dotviz to convert .dot to .pdf. the command I executed
dot -Tpdf call-graph.dot -o cg_result.pdf
and the result and exception I got.
Error: call-graph.dot: syntax error in line 14 near '"'
Tai-e arguments
-pp -m InterTaintTransfer -cp src/test/resources/pta/taint/ -a pta=cs:2-type;dump-ci:true;dump:true;only-app:true;implicit-entries:false;taint-config:src/test/resources/pta/taint/taint-config.yml;handle-invokedynamic:true -a cg=dump:true
Runtime environment infomation
No response