Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@barnardoswebteam/consent-banner
Advanced tools
Run npm install @barnardoswebteam/consent-banner
or yarn add @barnardoswebteam/consent-banner
.
In your code add the following:
const consentBanner = require('@barnardoswebteam/consent-banner');
consentBanner();
And add the GTM container ID in .env or as a config variable as GTM_CODE
.
Optionally add URLs for your privacy policy and cookie policy in .env as PRIVACY_URL
and COOKIE_URL
. If no privacy URL is declared it defaults to https://www.barnardos.org.uk/privacy-notice, and if no cookie URL is declared it defaults to https://www.barnardos.org.uk/cookie-notice.
In your HTML add the following:
<script type="module" src="main.js"></script>
and in main.js:
import consentBanner from './path/to/consent-banner.esm.js';
consentBanner();
And add the GTM container ID in .env or as a config variable as GTM_CODE
.
Optionally add URLs for your privacy policy and cookie policy in .env as PRIVACY_URL
and COOKIE_URL
. If no privacy URL is declared it defaults to https://www.barnardos.org.uk/privacy-notice, and if no cookie URL is declared it defaults to https://www.barnardos.org.uk/cookie-notice.
Put the following near the end of the body element, replacing GTM-XXXXXX with the correct ID.
<script src="path/to/consent-banner.es5.js"></script>
<script>BarnardosConsent({'gtmCode':'GTM-XXXXXX'});</script>
Self hosting is recommended but if it's not possible you can use:
<script src="https://unpkg.com/@barnardoswebteam/consent-banner@latest/consent-banner.es5.js"></script>
<script>BarnardosConsent({'gtmCode':'GTM-XXXXXX'});</script>
Optionally add URLs for your privacy policy and cookie policy to the code like so:
<script>
BarnardosConsent(
{
'gtmCode': 'GTM-XXXXXX',
'privacyURL': 'https://your-domain/privacy-policy',
'cookieURL': 'https://your-domain/cookie-policy'
}
);
</script>
Both are optional, and if either it missing they will default to https://www.barnardos.org.uk/privacy-notice and https://www.barnardos.org.uk/cookie-notice respectively.
Cloning this repo as a git submodule is recommended if not using NPM or Yarn. Watch this repository and run git pull
from inside the submodule directory when there are changes. Otherwise watch this repository and perform manual updates.
Steps for creating a git submodule:
cd
to the directory the submodule will live.git submodule add -b main git@github.com:barnardos/consent-banner.git
and press enter to add the submodule.git submodule init
and press enter.cd
out of the submodule into the parent repository.FAQs
Barnardo's consent banner.
The npm package @barnardoswebteam/consent-banner receives a total of 261 weekly downloads. As such, @barnardoswebteam/consent-banner popularity was classified as not popular.
We found that @barnardoswebteam/consent-banner demonstrated a not healthy version release cadence and project activity because the last version was released 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.