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.
django-sanitized-dump
Advanced tools
Sanitize sensitive information from your database dumps 💩
Supports:
pip install django-sanitized-dump
or pip install django-sanitized-dump[MySQL]
if you use MySQLsanitized_dump
to INSTALLED_APPS
./manage.py init_sanitizer
.sanitizerconfig
file and modify the sanitation strategy to fit your requirements../manage.py check_sanitizerconfig
to verify that your .sanitizerconfig
includes all models and fields./manage.py create_sanitized_dump > dump.sql
Heavy lifting of the DB sanitation is done by: https://github.com/andersinno/python-database-sanitizer
Configuration file is used to define a strategy on how to sanitize your data. Strategy defines a sanitation function for each model field.
config:
addons:
- "ai-sanitizers"
- "some-other-lib"
strategy:
user:
first_name: "name.first_name"
last_name: "name.last_name"
education:
created: null
modified: null
id: null
field: "education.field"
school: "education.school"
started: "datetime.datetime"
credits: null
information: "string.loremipsum_preserved"
file_file: null
# /sanitizers/name.py
def sanitize_first_name(value):
return faker.first_name()
def sanitize_last_name(value):
return faker.last_name()
# /sanitizers/education.py
def sanitize_field(value):
return "Some field"
def sanitize_schoo(value):
return "My school"
Note: This should not be done in the initial implementation of the sanitizer but is up to the sanitizer functions. This is just a nice to have but not of a high priority.
Check that the returned value is of the same type as the argument value passed to the sanitizer. For instance, if a MySQL DATETIME value is passed to the sanitizer, a MySQL DATETIME value shoud be returned as well.
config.addons
)./manage.py create_sanitized_dump > dump.sql
mysqldump
/pgdump
)./manage.py check_sanitizerconfig
Check can be used in CI environments for detecting changes in models, that are not present in sanitizer configuration.
./manage.py init_sanitizer
FAQs
Sanitized sensitive information from your database dumps
We found that django-sanitized-dump demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 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.