
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@washingtonpost/wp-uspapi
Advanced tools
The supporting on-page functionality for The Washington Post's compliance process with CCPA, CDPA and a few other privacy tools
https://www.npmjs.com/package/@washingtonpost/wp-uspapi
npm install
Run unit tests:
npm run test
Production build:
npm run build
Validating it works in a browser:
__uspapi('getUSPData', 1, (uspData, success) => {
if (success) { console.debug(uspData, success) }
else { console.error('no') }
});
This provides window.__uspapi
which is needed by ad systems, third party trackers, and any operation that touches user data for CCPA for California residents and CDPA for Virginia residents.
The US Privacy API is our control mechanism for allowing users to opt out of tracking under the California CCPA and Virginia CDPA regulations. Users are eligible for use of the US Privacy API and the Do Not Sell mode if they are California or Virginia residents (as determined by their billing address) or have a California or Virginia geolocation.
Because the California law is strong and protects users outside of the CA Geo, we also use it to grant EU users the ability to opt-out of tracking under the promise we make them when they encounter our TCF banner in the EU and European Economic Area. We call this “EEA Ad Consent” mode, or “EAC”.
Finally, CA and VA residents are also eligible to use the Global Privacy Control. Normally users who wish to opt out do so using the Do Not Sell link in our footer (only available to VA & CA-residents or Geo). However, they can also do so using a signal at the browser level. GPC is that signal and can be activated in Chrome or Edge using a plugin or using a custom configuration for Firefox.
This package is intended to be a one stop shop for implementing the API which, to resolve race conditions, may need to be implimented more than once on the page. It is set up in order to support that approach.
Unit tests cover the functionality of this package under CA, VA and EAC settings.
Including this package in your library will not automatically activate the USP API. You have to initiate it like so:
try {
new Uspapi({
log() {},
debug: console.debug,
});
} catch (e) {
console.error('USP API attachment may have failed.');
}
This class takes an object that emulates the structure of console
. You can pass console
directly in on browser-facing software. You can also use this structure to pass in your own logging objects or NOOP functions. The USPAPI library makes use of log
for verbose console logging to understand program flow. It makes use of debug
to message the console about errors and issues that might disrupt its proper functioning.
On class initiation the USP API library will attach itself to the window
object along with any necessary other objects. You do not need to attach it to the window
object yourself.
Use The Washington Post Confluence pages under Washington Post Data Privacy > Technical Guidance to find and leverage testing instructions.
git pull
git status
npm ci
npm test
npm run build
Either use npm version
or manually update the version in package.json
& package-lock.json
.
git tag 2.0.0
npm publish
git push
git push --tags
With version 6 we move away from parsing a geo cookie directly and move to using an on-page Privacy API. That is now an unlisted dependency for implementation.
FAQs
The supporting on-page functionality for The Washington Post's compliance process with CCPA, CDPA and a few other privacy tools
We found that @washingtonpost/wp-uspapi demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.