Skip to content

refactor(taint): deduplicate taint engine across JS/PY/Go #276

@Darkroom4364

Description

@Darkroom4364

~8,500 lines of near-identical taint analysis spread across three files:

  • `javascript_taint.rs`
  • `python_taint.rs`
  • `go_taint.rs`

`javascript_taint.rs` already notes it was "ported from python_taint.rs" and that "a future refactor is cheap."

Approach

  • Extract shared traversal, propagation, and source/sink matching into a generic taint engine
  • Language-specific files provide source/sink definitions and AST adapters
  • Also addresses the 56 `.clone()` calls in `javascript_taint.rs` — many exist because ownership isn't structured for the shared traversal pattern

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions