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.
@transferwise/cookie-consent
Advanced tools
![npm](https://img.shields.io/npm/v/@transferwise/cookie-consent)
This repo contains helper functions to make your application compliant with ICO regulations. How to make your application compliant with ICO regulations
yarn add @transferwise/cookie-consent
import { hasValidConsent } from "@transferwise/cookie-consent";
if (hasValidConsent()) {
mixpanel.opt_in_tracking();
}
hasValidConsent()
checks the cookie consent from document.cookie
. If consent
cookie is not there or document
is undefined then it will return false
.
import { cookie } from "@transferwise/cookie-consent";
cookie.write(
"username=John Doe; expires=Thu, 18 Dec 2013 12:00:00 UTC; path=/"
);
cookie.write(string, object)
takes 2 arguments:
document.cookie
essential
- if it's
true
then we will add it to document.cookie
even when we don't have
consent
How to know if my cookie is essential?Adding essential cookie
:
import { cookie } from "@transferwise/cookie-consent";
cookie.write(
"username=John Doe; expires=Thu, 18 Dec 2013 12:00:00 UTC; path=/",
{ essential: true }
);
yarn test
The package also includes the constants used when creating the consent cookie, and a JSON representation of the cookie policy.
These are typically utilised by the consent mechansim, audit tooling (e.g., cookie monster).
CHANGELOG.md
FAQs
![npm](https://img.shields.io/npm/v/@transferwise/cookie-consent)
The npm package @transferwise/cookie-consent receives a total of 0 weekly downloads. As such, @transferwise/cookie-consent popularity was classified as not popular.
We found that @transferwise/cookie-consent demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
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.