Skip to content

Conversation

@shivasurya
Copy link
Owner

@shivasurya shivasurya commented Nov 9, 2025

Summary

Adds dataflow analysis capabilities to Python DSL with Phase 1 propagation primitives.

Changes

  • Implemented flows() matcher for taint analysis
  • Added propagation primitives: assignment, function_args, function_returns
  • Renamed package to codepathfinder

Testing

  • 99 tests, 99% coverage
  • All linters pass

Stacked On

PR #353

@codecov
Copy link

codecov bot commented Nov 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.75%. Comparing base (13d9b9c) to head (6e21f96).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #354   +/-   ##
=======================================
  Coverage   80.75%   80.75%           
=======================================
  Files          59       59           
  Lines        6237     6237           
=======================================
  Hits         5037     5037           
  Misses        992      992           
  Partials      208      208           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@shivasurya shivasurya self-assigned this Nov 9, 2025
@shivasurya shivasurya added enhancement New feature or request python labels Nov 9, 2025
@shivasurya shivasurya marked this pull request as ready for review November 9, 2025 16:37
@safedep
Copy link

safedep bot commented Nov 9, 2025

SafeDep Report Summary

Green Malicious Packages Badge Green Vulnerable Packages Badge Green Risky License Badge

No dependency changes detected. Nothing to scan.

This report is generated by SafeDep Github App

Copy link
Owner Author

shivasurya commented Nov 10, 2025

Merge activity

  • Nov 10, 4:23 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Nov 10, 4:26 AM UTC: Graphite rebased this pull request as part of a merge.
  • Nov 10, 4:27 AM UTC: @shivasurya merged this pull request with Graphite.

@shivasurya shivasurya changed the base branch from pr-02-python-dsl-core-matchers to graphite-base/354 November 10, 2025 04:24
@shivasurya shivasurya changed the base branch from graphite-base/354 to main November 10, 2025 04:25
## Summary
- Renamed package from `pathfinder` to `codepathfinder`
- Implemented `flows()` function for taint analysis (OWASP Top 10)
- Added Phase 1 propagation primitives (assignment, function_args, function_returns)
- Updated README with dataflow examples

## New Components
**codepathfinder/propagation.py:**
- PropagationType enum (Phase 1-6 types defined)
- PropagationPrimitive base class
- propagates namespace with 3 Phase 1 methods
- create_propagation_list() helper

**codepathfinder/dataflow.py:**
- DataflowMatcher class for taint analysis
- flows() public API function
- Supports sources, sinks, sanitizers, propagation, scope

**codepathfinder/ir.py:**
- Added DATAFLOW enum type
- Added dataflow IR validation

## Testing
✅ 99 tests pass (63 new tests for propagation/dataflow)
✅ 99% coverage (exceeds 95% requirement)
✅ Black, ruff, mypy: all clean

## Package Rename
- pathfinder/ → codepathfinder/
- Updated all imports across codebase
- Updated pyproject.toml, setup.py, build.gradle
- Updated README examples

🤖 Generated with Claude Code

Co-Authored-By: Claude <[email protected]>
@shivasurya shivasurya force-pushed the pr-03-python-dsl-dataflow-phase1 branch from 2cb3dbf to 6e21f96 Compare November 10, 2025 04:26
@shivasurya shivasurya merged commit 9f8c0ff into main Nov 10, 2025
3 checks passed
@shivasurya shivasurya deleted the pr-03-python-dsl-dataflow-phase1 branch November 10, 2025 04:27
shivasurya added a commit that referenced this pull request Nov 10, 2025
## Summary
Adds Phase 2 propagation primitives (string operations) and preset bundles for common use cases.

## Changes
- Implemented string_concat and string_format propagation
- Added PropagationPresets (minimal, standard, comprehensive, exhaustive)
- Added global configuration for default propagation/scope

## Testing
- 137 tests, 99% coverage
- All linters pass

## Stacked On
PR #354
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants