-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Javascript Taint Tracking #18765
Comments
Hi @DSimsek000, To do this you could add a |
Please correct me if the below is not what you suggested, but what I attempted was: predicate isAdditionalFlowStep(DataFlow::Node pred, DataFlow::Node succ) {
exists(DataFlow::InvokeNode call |
call.getAnArgument() = pred and
call = succ
)
} which didnt solve the issue. I also encountered an issue when changing the definition of var __importDefault =
(this && this.__importDefault) ||
function (mod) {
return mod && mod.__esModule
? mod
: {
default: mod,
}
} |
predicate isAdditionalFlowStep(DataFlow::Node pred, DataFlow::Node succ) {
exists(DataFlow::InvokeNode call |
call.getAnArgument() = pred and
call = succ
)
} Did you look at the AST and confirm that |
Hi @jketema, Yes, take a look at the attached image. Wouldn't this only cause the taint to flow to |
Hi @DSimsek000, predicate isAdditionalFlowStep(DataFlow::Node pred, DataFlow::Node succ) {
exists(DataFlow::InvokeNode call |
call.getAnArgument() = pred and
call = succ
)
} If I quick evaluate this predicate on a test database build from your original example, I see a step from |
I have the following code:
source.js:
sink.js:
I am using the following query to get all calls to
sink
from the source function:The above query doesnt find the flow through
sinkMod3(s)
. Is there a way to get codeQL to treat theunknown(..)
function as an identity function?The text was updated successfully, but these errors were encountered: