Skip to content

feat(taint): register source/sink models for more languages (currently JS/TS only) #2204

@magyargergo

Description

@magyargergo

Summary

The taint layer runs for every --pdg language but only JS/TS have registered source/sink models. Add per-language taint source/sink specs so cross-language security flows light up.

Background

Cross-language PDG validation (PR #2197): the taint solver ran on all 12 languages, but TAINTED findings were emitted only where a model exists —

  • express (JS): 34 TAINTED findings
  • every other language (python, java, go, c#, php, ruby, rust, swift, kotlin, dart, c/c++): 0 findings, taint=0ms — no model registered.

The engine (per-function summaries, interprocedural fixpoint, TAINTED/TAINT_PATH emit, explain) is implemented and language-agnostic — it just needs per-language source/sink/sanitizer specs (see getSourceSinkConfig / registerBuiltinTaintModels).

Proposed work

  • Register taint models for additional ecosystems: HTTP request params (sources), SQL / command-exec / file-path / template sinks, and per-ecosystem sanitizers. Start with python + java (highest-value security surfaces).

Acceptance

  • python + java models registered with unit fixtures showing real source→sink flows.
  • Non-zero TAINTED findings on representative real repos (e.g. a Flask app, a Spring app) in the validation harness.

Surfaced by #2195 cross-language validation. Refs #2195.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions