Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
decorators-cryptography
Advanced tools
decorators-cryptography is a Python library that provides decorators for encrypting and decrypting passed arguments using the cryptography package.
For Linux, macOS, Windows (WSL):
curl -sSL https://install.python-poetry.org | python3 -
For Windows (Powershell):
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py -
On macOS and Windows, the installation script will prompt you to add the Poetry executable folder to the PATH variable. Do this by running the following command (don't forget to change {USERNAME} to your username):
macOS
export PATH="/Users/{USERNAME}/.local/bin:$PATH"
Windows
$Env:Path += ";C:\Users\{USERNAME}\AppData\Roaming\Python\Scripts"; setx PATH "$Env:Path"
Check installation:
poetry --version
Installing bash completions (optional):
poetry completions bash >> ~/.bash_completion
🔖 Setting up the Poetry environment for PyCharm
Creating a virtual environment:
poetry env use python3.10
Installing dependencies:
poetry install
Launching the shell and activating the virtual environment (from the project folder):
poetry shell
Checking virtual environment activation:
poetry env list
In order for pre-commit checks to be performed with each commit, you must:
The pre-commit module has already been added to the requirements and should be installed automatically with the virtual environment.
You can check the presence of pre-commit with the command (with the virtual environment activated):
pre-commit --version
# >> pre-commit 2.21.0
If this does not happen, then you need to install pre-commit according to the official instructions:
brew install pre-commit
poetry add pre-commit
pip install pre-commit
Installing hooks:
pre-commit install --all
In the future, when executing the git commit
command, the checks listed in the .pre-commit-config.yaml
file will be performed.
If it is not clear which error is preventing the commit from being executed, you can run the hooks manually with the command:
pre-commit run --all-files
To use the decorators provided by decorators-cryptography, follow the examples below.
from decorators_cryptography import encrypt, decrypt
@encrypt(key="encryption_key")
def sensitive_function(arg1, arg2):
# Your function implementation
pass
@decrypt(key="decryption_key")
def sensitive_function(arg1, arg2):
# Your function implementation
pass
FAQs
Decorators for encrypting/decrypting passed arguments
We found that decorators-cryptography 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
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.