Skip to content

Java: Consider some support for backwards flow through writer wrappers #6402

Open
@aschackmull

Description

@aschackmull

Consider supporting source to sink flow in the following snippet:

void f(Appendable sink, String source) {
  JSONWriter w = new JSONWriter(sink);
  w.write(source);

Through the model row "org.json;JSONWriter;true;JSONWriter;;;Argument[-1];Argument[0];taint".
Context: #6325 (comment)

Go already has some support for this in https://github.com/github/codeql-go/blob/main/ql/src/semmle/go/dataflow/FunctionInputsAndOutputs.qll#L124.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions