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.
canonicaljson-rs ################
Python package leveraging our Canonical JSON implementation in Rust.
In order to validate content signatures of our data, Canonical JSON gives us a predictable JSON serialization. And Rust allows us to reuse the same implementation between our server in Python (this package) and our diverse clients (Rust, Android/iOS, JavaScript).
.. code-block ::
pip install canonicaljson-rs
.. code-block :: python
>>> import canonicaljson
>>>
>>> canonicaljson.dumps({"héo": 42})
'{"h\\u00e9o":42}'
canonicaljson.dumps(obj: Any) -> str
canonicaljson.dump(obj: Any, stream: IO) -> str
We rely on a specific Python builder that automates everything around Rust bindings.
.. code-block ::
pip install maturin
In order to install the package in the current environment:
.. code-block ::
maturin develop
Run tests:
.. code-block ::
pytest
vX.Y.Z
(This tag will be created from the target when you publish this release.)serde_json::Value
from a pyo3::PyObject
was greatly inspired by Matthias Endler's hyperjson <https://github.com/mre/hyperjson/>
_Other specs:
FAQs
Python bindings for canonical_json
We found that canonicaljson-rs 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.