
Research
PyPI Package Disguised as Instagram Growth Tool Harvests User Credentials
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
This library provides the ability of converting django logs to JSON.
Using standard Json library:
pip install django-json-logger
To use Orjson:
pip install django-json-logger[orjson]
and add to Django settings LOGGING_SERIALIZER="orjson"
To use Ujson:
pip install django-json-logger[ujson]
and add to Django settings LOGGING_SERIALIZER="ujson"
Note: If you're using zsh you need to escape square brackets: pip install ... [ujson]
# setting.py
LOGGING_APP_NAME = 'your_app_name' # required
LOGGING_FIELDS = ('levelname', 'name', 'module', 'process', 'thread', 'pathname', 'asctime')
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'json': {
'()': 'django_json_logging.formatters.JSONFormatter',
},
},
'handlers': {
'console': {
'class': 'logging.StreamHandler',
'formatter': 'json',
},
},
'loggers': {
'': {
'handlers': ['console'],
'level': 'WARNING',
},
'django': {
'handlers': ['console'],
'level': 'WARNING',
'propagate': False,
},
},
}
Somewhere in the code
import logging
your_json_logger = logging.getLogger('json_logger')
your_json_logger.warning('Something happened here', extra={'event_code': 'xxx'})
FAQs
A Django app to logging in json format.
We found that django-json-logger 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
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.