Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The variable 't' is not recognized as a taint. #5

Open
waderwu opened this issue Jun 13, 2024 · 0 comments
Open

The variable 't' is not recognized as a taint. #5

waderwu opened this issue Jun 13, 2024 · 0 comments

Comments

@waderwu
Copy link

waderwu commented Jun 13, 2024

I constructed a testcase named 'Field6' and then executed the following test code, only to discover that the variable 't' was not identified as a tainted variable.

    @Test
    public void Field6() {
        JimpleIFDSSolver<?, ? extends InterproceduralCFG<Unit, SootMethod>> analysis = executeStaticAnalysis(target.taint.Filed6.class.getName());
        Set<String> defaultIDEResult = getResult(analysis);
        Set<String> expected = new HashSet<>();
        expected.add("a");
        expected.add("f.x");
        expected.add("t");
        checkResults(defaultIDEResult, expected);
    }
package target.taint;

import target.taint.internal.SourceClass;


public class Filed6 {
    private String x;
    private String y;

    public static void main(String[] args) {
        Filed6 f = new Filed6();
        SourceClass sc = new SourceClass();
        String a = sc.anInstanceSource();
        f.setX(a);
        String t = f.getOther();
    }

    public void setX(String x) {
        this.x = x;
    }

    public String getX() {
        return x;
    }

    public void setY(String y) {
        this.y = y;
    }

    public String getY() {
        return y;
    }

    public String getOther(){
        return this.x;
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant