
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Parse git diff data or .diff file. Access a list of properties including filenames, filepath, source-hash, target-hash and more for every file changed.
diff-parser is a Python package for parsing and representing diff files.
Parse a git diff
data or .diff
file. Access a list of properties including filenames, filepath, source-hash, target-hash and more for every file changed.
You can install diff-parser
using pip:
pip install diff-parser
To use diff-parser, simply import the required modules and classes:
from diff_parser import Diff
# Example usage:
diff = Diff("path/to/diff/file.diff")
for block in diff:
print(block.new_filename) # main.py
print(block.new_filepath) # /path/to/main.py
print(block.old_filename) # main.py
print(block.old_filepath) # /path/to/main.py
print(block.source_hash) # abcdef
print(block.target_hash) # uvwxyz
print(block.type) # modified
print(block.content) # None (to be implemented)
Contributions are welcome! If you find any bugs or have suggestions for improvements, please open an issue on the GitHub repository.
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
Parse git diff data or .diff file. Access a list of properties including filenames, filepath, source-hash, target-hash and more for every file changed.
We found that diff-parser demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.