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.
Python bindings to Rust jrsonnet crates (Rust implementation of Jsonnet language).
pip install rjsonnet
This module provides two functions:
def evaluate_file(filename: str) -> str: ...
def evaluate_snippet(filename: str, src: str) -> str: ...
In the latter case, the parameter filename
is used in stack traces,
because all errors are given with the "filename" containing the code.
Keyword arguments to these functions are used to control the virtual machine. They are:
max_stack
(number)gc_min_objects
(number, ignored)gc_growth_trigger
(number, ignored)ext_vars
(dict, string to string)ext_codes
(dict, string to string)tla_vars
(dict, string to string)tla_codes
(dict, string to string)max_trace
(number)import_callback
(see example in tests/)native_callbacks
(see example in tests/)preserve_order
(bool, preserve object field order during manifestification)The argument import_callback
can be used to pass a callable, to trap the Jsonnet import
and importstr
constructs.
This allows, e.g., reading files out of archives or implementing library search paths.
The argument native_callbacks
is used to allow execution of arbitrary Python code via std.native(...)
.
This is useful so Jsonnet code can access pure functions in the Python ecosystem, such as compression, encryption, encoding, etc.
If an error is raised during the evaluation of the Jsonnet code, it is formed into a stack trace and thrown as a python RuntimeError
.
import rjsonnet
# evaluate a jsonnet file
rjsonnet.evaluate_file("filename.jsonnet")
# evalute a jsonnet code snippet
rjsonnet.evaluate_snippet('filename', 'jsonnet code snippet')
This work is released under the MIT license. A copy of the license is provided in the LICENSE file.
FAQs
Python bindings to Rust jrsonnet crate
We found that rjsonnet 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.