mirror of
https://github.com/github/codeql.git
synced 2026-05-01 11:45:14 +02:00
Restrict fluent api models to same type access
This commit is contained in:
@@ -22,7 +22,7 @@ string captureFlow(Callable api) {
|
||||
string captureQualifierFlow(Callable api) {
|
||||
exists(ReturnStmt rtn |
|
||||
rtn.getEnclosingCallable() = api and
|
||||
rtn.getResult() instanceof ThisAccess
|
||||
rtn.getResult().(ThisAccess).isOwnInstanceAccess()
|
||||
) and
|
||||
result = asValueModel(api, "Argument[-1]", "ReturnValue")
|
||||
}
|
||||
|
||||
@@ -6,4 +6,10 @@ public final class FluentAPI {
|
||||
return this;
|
||||
}
|
||||
|
||||
public class Inner {
|
||||
public FluentAPI notThis(String input) {
|
||||
return FluentAPI.this;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user