
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
@castleio/castle-js
Advanced tools
Packaged version of Castle fingerprinting script.
The Castle JavaScript automatically captures every user action in your web application, including clicks, taps, swipes, form submissions, and page views. We use this data to build profiles of good user behavior in order to detect the bad.
npm install --save @castleio/castle-js
yarn add @castleio/castle-js
import * as Castle from '@castleio/castle-js'
Castle.configure(YOUR_CASTLE_APP_ID);
// @param appId [string] castle app id.
// @option options [object] :window (default `window`) eg JSDOM.window
// @option options [boolean] :avoidCookies (default `false`) when true cookie storage will be avoided
// @option options [string] :cookieDomain (default topLevel domain) cookies domain scope
import * as Castle from '@castleio/castle-js'
Castle.configure(appId, options);
import * as Castle from '@castleio/castle-js'
Castle.createRequestToken().then( (requestToken) => {
....
});
// or
const requestToken = await Castle.createRequestToken();
See Castle Docs for more information and how to pass the token further.
If your environment does not support modules you can use the browser version
import '@castleio/castle-js/dist/castle.browser.js'
_castle('setAppId', YOUR_CASTLE_APP_ID);
_castle('createRequestToken').then( (requestToken) => {
....
});
Before
_castle('getClientId')
After
Castle.createRequestToken().then( (requestToken) => {
});
// or
const token = await Castle.createRequestToken();
No longer available commands for _castle(...)
:
`autoForwardClientId`, 'autoTrack', `catchHistoryErrors`, `identify`, `setUserId`, `setAccount`, `setKey`, `setAccount`, `sessionId`, `reset`, `page`, `trackPageView`, `setTrackerUrl`
Request Token is now required to be passed in the request params and it is no longer available in the cookie. Check the docs
ES3+ version supported browsers eg:
Chrome 5+
Firefox 3+
IE 6+
Safari 4+
All modern browsers (desktop and mobile)
MIT
FAQs
Castle Fingerprinting Script
The npm package @castleio/castle-js receives a total of 83,704 weekly downloads. As such, @castleio/castle-js popularity was classified as popular.
We found that @castleio/castle-js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 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
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.