trailofbits / trailofbits/graphtage

Consider additional dependencies for performance, security

Open
#29 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.5k
Forks
61
Avg merge
6h 45m
Merged PRs (30d)
45

Description

Thanks again for graphtage!

While I haven't used XML diffing in anger yet, it would be interesting to explore some (optional) dependencies to increase the robustness and performance of that component:

  • lxml has the same API, but better performance, than stdlib
  • defusedxml helps prevent well-known malicious XML attacks that works with stdlib or lxml

Similarly, a number of far-higher performance JSON parsers are available, with different ease-of-installation/speed/memory tradeoffs for which it might be hard to anticipate user preference:

If there is interest, I could probably take a stab at a PR for this:

  • change the json API to accept an optional parser
    • add extras with a sensible bottom version pins
  • change the xml API to accept an optional parser
    • add defusedxml in install_requires
    • add lxml in an extras section
      • or install_requires, as "complexity of installation" is no longer really a concern once scipy enters the picture...
  • test against different combinations with tox in CI

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the JSON and XML APIs and the tox configuration. Compare the proposed optional parser choices, dependency placement, supported version pins, and CI combinations; done means the project has a decided parser interface, declared dependencies, and coverage for the supported combinations.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
performance, security, testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.