Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
The HybridContentManager
was originally created by Quantopian as part of pgcontents; however, the usage of HybridContentsManager
was restricted to the compatibility requirements of pgcontents. These restrictions included postgres
dependencies and no support for the latest notebook version (>6).
At Viaduct we used pgcontents exclusively for the HybridContentsManager
and wanted to extend its functionality, so we created this fork hybridcontents.
See related pgcontents issues:
Prerequisites:
Installation:
pip install hybridcontents
conda install -c viaduct hybridcontents
See instructions here
For a detailed example see, hybrid_manager_example.py
The following code snippet creates a HybridContentsManager with two directories with different content managers.
c = get_config()
c.NotebookApp.contents_manager_class = HybridContentsManager
c.HybridContentsManager.manager_classes = {
# NOTE: LargFileManager only exists in notebook > 5
# If using notebook < 5, use FileContentManager instead
"": LargeFileManager,
"shared": S3ContentsManager
}
# Each item will be passed to the constructor of the appropriate content manager.
c.HybridContentsManager.manager_kwargs = {
# Args for root LargeFileManager
"": {
"root_dir": read_only_dir
},
# Args for the shared S3ContentsManager directory
"shared": {
"access_key_id": ...,
"secret_access_key": ...,
"endpoint_url": ...,
"bucket": ...,
"prefix": ...
},
}
def only_allow_notebooks(path):
return path.endswith('.ipynb')
# Only allow notebook files to be stored in S3
c.HybridContentsManager.path_validators = {
"shared": only_allow_notebooks
}
To run unit tests,
tox
This will run all unit tests for python versions 2.7, 3.6, 3.7 and jupyter notebook versions 4, 5, and 6.
setup.py
meta.yaml
FAQs
Hybrid Content Manager
We found that hybridcontents 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 malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.