
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
dc-consent
Advanced tools
A Django app to add a cookie consent modal to your site. This can then be used to check if the user has given consent to use cookies.
To clear the cookie preferences; the user can simple navigate to:
reverse('cookie_consent:revoke')
In templates; it is also possible to check if the user has given consent like so:
request.cookie_consent.allows('analytics') -> bool
Add 'cookie_consent' to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [
...,
'cookie_consent',
]
Include the cookie_consent URLconf in your project urls.py like this:
path('cookies/', include('cookie_consent.urls')),
Add the cookie_consent middleware to your MIDDLEWARE setting like this:
MIDDLEWARE = [
...,
'cookie_consent.middleware.CookieConsentMiddleware',
]
Use the 'cookie_consent' template tag in your base template like this:
{% load cookies_tags %}
{% cookie_consent %}
Check if the user has given consent to use cookies in your templates like this:
{% consents_to 'analytics' %}
<script>
// Will only get rendered if the user has given consent to use analytics cookies.
</script>
{% endconsents_to %}
We require you to use two asset files. These are located in:
static/cookie_consent/cookie-consent.css
static/cookie_consent/cookie-consent.js
FAQs
A Django app to add a cookie consent modal to your site.
We found that dc-consent 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 researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.