Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
This is a thin wrapper around difflib.unified_diff
that Does The Right Thing
for "No newline at eof". The args are also simplified compared to difflib
:
moreorless.unified_diff(
astr: str,
bstr: str,
filename: str,
n: int = 3,
) -> str:
...
# raises moreorless.patch.PatchException
moreorless.patch.apply_single_file(
contents: str,
patch: str,
allow_offsets: bool = True,
) -> str:
...
# uses click to write to stdout with colors
moreorless.click.echo_color_unified_diff(
astr: str,
bstr: str,
filename: str,
n: int = 3
) -> None:
...
# if you want to use unified_diff yourself first (e.g. in another process)
moreorless.click.echo_color_precomputed_diff(
diff: str,
) -> None:
...
morelorless is copyright Tim Hatch, and licensed under
the MIT license. I am providing code in this repository to you under an open
source license. This is my personal repository; the license you receive to
my code is from me and not from my employer. See the LICENSE
file for details.
FAQs
Python diff wrapper
We found that moreorless 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.