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.
A pure-Python, no-dependency implementation of RFC 8785, a.k.a. JSON Canonicalization Scheme or JCS.
This implementation should be behaviorally comparable to Andrew Rundgren's reference implementation, with the following added constraints:
str
dictionary keys into
strings. Users must explicitly perform this conversion.bytes
objects or bytes
I/O.python -m pip install rfc8785
See the full API documentation here.
import rfc8785
foo = {
"key": "value",
"another-key": 2,
"a-third": [1, 2, 3, [4], (5, 6, "this works too")],
"more": [None, True, False],
}
rfc8785.dumps(foo)
yields:
b'{"a-third":[1,2,3,[4],[5,6,"this works too"]],"another-key":2,"key":"value","more":[null,true,false]}'
For direct serialization to an I/O sink, use rfc8785.dump
instead:
import rfc8785
with open("/some/file", mode="wb") as io:
rfc8785.dump([1, 2, 3, 4], io)
All APIs raise rfc8785.CanonicalizationError
or a subclass on serialization failures.
Apache License, Version 2.0.
Where noted, parts of this implementation are adapted from Andrew Rundgren's reference implementation, which is also licensed under the Apache License, Version 2.0.
FAQs
A pure-Python implementation of RFC 8785 (JSON Canonicalization Scheme)
We found that rfc8785 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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.