Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
@manifoldco/shadowcat
Advanced tools
Invisible web component auth implementation of Manifold's PUMA
Simple JS OAuth solutions for Manifold UI
In a terminal, install @manifoldco/shadowcat
for your app:
npm i @manifoldco/shadowcat
Then register the web component (we recommend as high up the DOM tree as possible, so it’ll load sooner).
import React, { useEffect, useRef } from "react";
import("@manifoldco/shadowcat/dist/loader").then(({ defineCustomElements }) =>
defineCustomElements(window)
);
const App = () => {
const authRef = useRef(null);
useEffect(() => {
// Fires whenever a token is received
const tokenReceived = detail => {
console.log(detail);
// {
// duration: 1450,
// error: null,
// expiry: 1566565841,
// token: "Hi I'm a super duper secret token!"
// }
};
if (authRef.current) {
authRef.addEventListener("receiveManifoldToken", tokenReceived);
}
}, []);
return (
<>
<Routes />
<manifold-oauth ref={authRef} /> {/* this can be placed anywhere, really, but the sooner it loads the better */}
</>
);
};
<body>
<manifold-auth></manifold-auth>
<script src="https://unpkg.com/@manifoldco/shadowcat/dist/manifold.js"></script>
<script>
document
.querySelector("manifold-oauth")
.addEventListener("receiveManifoldToken", e => {
console.log(e.detail);
// {
// duration: 1450,
// error: null,
// expiry: 1566565841,
// token: "Hi I'm a super duper secret token!"
// }
});
</script>
</body>
In any setup, you can use a CDN for Shadowcat
https://js.cdn.manifold.co/@manifoldco/shadowcat/ # latest (beware of breaking changes!)
https://js.cdn.manifold.co/@manifoldco/shadowcat@0.2.0/ # specific version
You can change the OAuth URL from Manifold’s default by specifying oauth-url
on the custom element:
<manifold-oauth oauth-url="[your-oauth-url]"></manifold-oauth>
FAQs
Invisible web component auth implementation of Manifold's PUMA
We found that @manifoldco/shadowcat demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 21 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 researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.