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.
@ecomfe/san-devhook
Advanced tools
Hook for San. Append a __san_devtool__
namespace on global context contains
components and stores raw data.
<script src="http://xxx/hook.js?autohook"></script>
import {initHook} from '@ecomfe/san-devhook';
const config = {
hookOnly: true, // Do not send any message to content script (Only for extension).
subKey: 'treeData', // Key for the array of sub component tree.
prefixForBindingData: 'my', // Auto bing data and props using specified prefix.
conditions: [{
listeners: ['onAfterGenerateData', e => { }],
event: eventName,
target: targetDOM // All listeners will be disabled (do not execute) until the event
}], // binding on the target is triggered.
onGenerateData: (
message, cnode, parentId, component) => {}, // Append customized data for generating component tree.
onAfterGenerateData: (message, cnode, parentId, component) => {},
onBeforeListenSan: () => {}, // Do something before a San event.
onSanMessage: (
message, cnode, parentId, component) => {}, // Procedure when a San event triggering.
onAfterListenSan: () => {}, // Procedure after a San event.
onBeforeListenStore: () => {}, // Procedure before a san-store event.
onStoreMessage: () => {}, // Procedure when a san-store event triggering.
onAfterListenStore: () => {}, // Procedure after a san-store event.
onRetrieveData: tree => {}, // Retrieve root CNode after calling retrieveData().
onRootReady: (cnode, component) => {} // Emit when root component is ready.
onSan: sender => {} // Emit when San is initialized.
};
// The last argument called *config* is the configuration of san-devhook in all callbacks.
initHook(config);
__san_devtool__
namespacedata
synchronously.__SAN_COMPONENT__
: The component instance of current DOM object.__SAN_DATA__
: The component data.__SAN_PROPS__
: The component props.__SAN_CNODE__
: A CNode instance of component acts as a serializable object.__SAN_PATH__
: Ancestor component ID list.showTree()
: Display the component tree under current DOM object.More instructions refer to docs folder.
$ npm run chrome
And open a page using San.
$ npm run browser
FAQs
Hook for san-devtool.
The npm package @ecomfe/san-devhook receives a total of 0 weekly downloads. As such, @ecomfe/san-devhook popularity was classified as not popular.
We found that @ecomfe/san-devhook demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 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.