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.
exocom-mock
Advanced tools
A mock implementation of the ExoCom development server in JavaScript, for testing
a mock implementation of ExoCom-Dev for sending and receiving messages to your ExoServices in test
$ npm i --save-dev exocom-mock
create an instance
ExoComMock = require('exocom-mock')
exocom = new ExoComMock
register a service to send messages to
exocom.registerService name: 'users', port: 4001
send a message to the service
exocom.sendMessage service: 'users', name: 'users.create', message-id: '123', payload: { name: 'Jean-Luc Picard' }
verifying messages sent out by the service under test
# ... make your service sent out a request here via exocom.sendMessage...
# wait for the message to arrive
exocom.waitUntilReceive =>
# verify the received message
expect(exocom.receivedMessages()).to.eql [
{
name: 'users.created'
payload:
name: 'Jean-Luc Picard'
}
]
if you want to verify more received messages later, you can reset the register of received messages so far
exocom.reset()
finally, close your instance when you are done, so that you can create a fresh one for your next test
exocom.close()
See our developer documentation
FAQs
A mock implementation of the ExoCom development server in JavaScript, for testing
We found that exocom-mock demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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.