
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
|Build Status| |Coverage Status| |Codacy Badge| |BCH compliance| |Pypi|
Django app to obfuscate text data.
Table of contents:
Compatibility
_;How to install
_;Example usage
_;Settings reference
_;License
_.Tested with python 2.7, 3.4, 3.5, 3.6 and Django 1.9, 1.10, 1.11: Travis CI <https://travis-ci.org/dipcode-software/django-obfuscate>
_
To install the app run:
.. code:: shell
$ pip install django-obfuscate
or add it to the list of requirements of your project.
Then add ‘obfuscator’ to your INSTALLED_APPS.
.. code:: python
INSTALLED_APPS = [
...
'obfuscator',
]
On you django project settings, configure the model names and field names to be obfuscated:
.. code:: python
OBFUSCATOR = {
'FIELDS': {
'app_label.ModelClass1': ['field1', 'field2', 'field3'],
'app_label.ModelClass2': ['field1'],
// ...
}
}
Run the management command to start obfuscation:
.. code:: shell
$ python manage.py obfuscate
You can run the management command passing as arguments: a model class
path and a list of fields to obfuscate (thus will ignore FIELDS
setting):
.. code:: shell
$ python manage.py obfuscate --model=app_label.ModelClass1 --fields=field1, field2, field3
OBFUSCATOR_CLASS
Default: ``obfuscator.utils.ObfuscatorUtils``
Path to class where obfuscator methods are defined. By default, the
class define tow obfuscator methods: \* ``text`` - Obfuscate simple text
data, respecting ``max-length`` field parameter; \* ``email`` -
Obfuscate email data. Only text before ``@`` is obfuscated, respecting
``max-length`` field parameter.
This class also define an ``obfuscate`` method. This method use fields
mapping (see ``FIELDS_MAPPING`` setting) to route the field type with
the obfuscate method.
You can redefine this class by subclassing the default class and
changing this setting to point to your class.
FIELDS\_MAPPING
~~~~~~~~~~~~~~~
Default:
.. code:: python
{
models.CharField: 'text',
models.TextField: 'text',
models.EmailField: 'email'
}
Map django model field types with obfuscator methods.
FIELDS
~~~~~~
Default: ``{}``
Fields to be obfuscated and respective model class path. Must be a
``dict`` with keys as python dot notation to path where the models are
declared and the values must be declared as lists of model fields.
If no value defined, the management command will do nothing.
Example:
.. code:: python
{
'contenttypes.ContentType': ['model', 'label'],
// ...
}
License
-------
MIT license, see the LICENSE file. You can use obfuscator in open source
projects and commercial products.
.. _Compatibility: #compatibility
.. _How to install: #how-to-install
.. _Example usage: #example-usage
.. _Settings reference: #settings-reference
.. _License: #license
.. |Build Status| image:: https://travis-ci.org/dipcode-software/django-obfuscate.svg
:target: https://travis-ci.org/dipcode-software/django-obfuscate
.. |Coverage Status| image:: https://coveralls.io/repos/github/dipcode-software/django-obfuscate/badge.svg
:target: https://coveralls.io/github/dipcode-software/django-obfuscate
.. |Codacy Badge| image:: https://api.codacy.com/project/badge/Grade/f5a70162349142b9a714edae4e4ae413
:target: https://www.codacy.com/app/srtabs/django-obfuscate?utm_source=github.com&utm_medium=referral&utm_content=dipcode-software/django-obfuscate&utm_campaign=Badge_Grade
.. |BCH compliance| image:: https://bettercodehub.com/edge/badge/dipcode-software/django-obfuscate?branch=master
:target: https://bettercodehub.com/
.. |Pypi| image:: https://img.shields.io/pypi/v/django-obfuscate.svg?style=flat
:target: https://pypi.python.org/pypi/django-obfuscate
FAQs
Django app to obfuscate text data.
We found that django-obfuscate 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 flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.