Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
The missing debug tool for django.
DjangoSonar is a comprehensive debugging and introspection tool for Django applications, inspired by Laravel Telescope.
Having spent years developing with Laravel before switching to Django, the first thing I missed from this change was the amazing Laravel Telescope. So, I decided to create it myself.
DjangoSonar is built using:
If you use this project, please consider giving it a ⭐.
pip install django-sonar
INSTALLED_APPS = [
...
'django_sonar',
...
]
urlpatterns = [
...
path('sonar/', include('django_sonar.urls')),
...
]
DJANGO_SONAR = {
'excludes': [
STATIC_URL,
MEDIA_URL,
'/sonar/',
'/admin/',
'/__reload__/',
],
}
In this example I'm excluding all the http requests to static files, uploads, the sonar dashboard itself, the django admin panels and the browser reload library. Update this setting accordingly, YMMW.
python manage.py migrate
MIDDLEWARE = [
...
'django_sonar.middlewares.requests.RequestsMiddleware',
...
]
To access the dashboard you will point your browser to the /sonar/ url (but you can change it as described before). The interface is very simple and self explanatory.
You could use DjangoSonar in production too, since it gives you an historical overview of all the requests, but be sure to clear the data and disable it when you have debugged the problem.
🔔 If you forget to disable/clear DjangoSonar you could end up with several gigabytes of data collected. So please use it with caution when in production 🔔
Only authenticated superusers can access sonar. If you are trying to access the dashboard with a wrong type of user, you will see an error page, otherwise you should see the DjangoSonar login page.
You can dump values to DjangoSonar using the sonar() helper function:
from django_sonar.utils import sonar
sonar('something')
And you can also dump multiple values like this:
from django_sonar.utils import sonar
sonar('something', self.request.GET, [1,2,3])
DjangoSonar is open-sourced software licensed under the MIT license.
If you really like this project and you want to help me please consider buying me a beer 🍺
FAQs
The missing debug tool for Django, inspired by Telescope.
We found that django-sonar 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.