Skip to content

Delta analysis engine for auditing dependency version bumps #106

@rushi-k12

Description

@rushi-k12

Description

Upgrading a third-party package blindly can introduce malicious code or hidden security regressions into an application. To mitigate this risk, PatchPilot needs a Delta Analysis Engine. When a user bumps a dependency version, this module will intercept the modification and analyze exactly what code changed between the old version and the newly requested release.

Proposed Changes

  • Version Manifest Diffing: Implement a tracker that reads dependency file updates (e.g., detecting changes in package-lock.json or requirements.txt from a Git history or file upload state).
  • Upstream Registry Fetching: Build a utility to pull source code or release manifests directly from public ecosystems (like PyPI or npm registries) for both the baseline version and the target version.
  • Code Changes Audit: Run lightweight static analysis over the differences between the two packages to highlight added files, modified functions, or newly introduced network outgoing calls.

Expected Output Payload Structure

{
  "supply_chain_diff": {
    "dependency": "requests",
    "upgrade_path": "2.28.1 -> 2.31.0",
    "risk_assessment": {
      "added_files": ["requests/auth_addon.py"],
      "suspicious_patterns_detected": ["eval() usage in auth_addon.py:5"],
      "overall_risk_score": "elevated"
    }
  }
}

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