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.
A simple reusable app that checks and lists various information about your project and its dependencies
Django-heartbeat is a simple reusable app that checks and lists various information about your project and its dependencies
Install using pip:
pip install django-heartbeat
Next, add 'heartbeat' to your settings.py INSTALLED_APPS:
INSTALLED_APPS = (
...
'heartbeat',
)
Configure urls.py
if 'heartbeat' in settings.INSTALLED_APPS:
from heartbeat.urls import urlpatterns as heartbeat_urls
urlpatterns += [
url(r'^heartbeat/', include(heartbeat_urls))
]
/heartbeat/
After this point you can access the /heartbeat/ endpoint and receive a 200 OK.
/heartbeat/1337/
If you want a more detailed view of some custom checkers you MUST configure a
custom profile for heartbeat in your settings.py. The profile should be
a dictionary containing at least the basic auth credentials or the key disable
set to True
to disable basic authentication.
e.g.:
HEARTBEAT = {
'package_name': 'foo_project',
'checkers': [
'heartbeat.checkers.build',
'heartbeat.checkers.distribution_list',
'heartbeat.checkers.debug_mode',
],
'auth': {
'username': 'foo',
'password': 'bar',
},
}
If no checkers are defined, heartbeat will default to the following:
heartbeat.checkers.distribution_list
heartbeat.checkers.debug_mode
heartbeat.checkers.python
Please make sure you have the latest version of django-heartbeat since checker names changed in versions 1.0.8 and 2.0.0. If for some reason you cannot install the latest version, read the release notes for the version you have and the versions mentioned above.
heartbeat.checkers.build
heartbeat.checkers.databases
heartbeat.checkers.debug_mode
heartbeat.checkers.distribution_list
heartbeat.checkers.host
heartbeat.checkers.memcached_status
heartbeat.checkers.python
heartbeat.checkers.redis_status
def check(request):
"""
:param request: HttpRequest object
:return: dict
"""
# Checker logic goes here
return {'ping': 'pong'}
Note: The function name of your checker MUST be 'check' and has to return a JSON-serializable object
HEARTBEAT = {
'checkers': [
'heartbeat.checkers.distribution_list',
'my_project.my_checker'
...
],
...
}
Simple, huh?
If you would like to contribute to this library with a new checker (or any other functionality), feel free to make a pull request.
FAQs
A simple reusable app that checks and lists various information about your project and its dependencies
We found that django-heartbeat demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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.