
Research
Security News
Malicious npm Packages Use Telegram to Exfiltrate BullX Credentials
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
@micham/sftp-mock-server
Advanced tools
This repository is aimed to provide you with the means to setup and interact with a small sftp server that you can use to run end to end tests in an application using ssh2-sftp-client or another node based sftp client. The package is mostly tested against ssh2-sftp-client.
You can check out the API reference here
Mostly e2e tests but you could also run the server as a standalone service in a dev cluster. Just know that the files will be kept in memory so try not to go overboard
npm install --save-dev @micham/sftp-mock-server
yarn add -D @micham/sftp-mock-server
const mockServer = await createSftpMockServer({
port: '9999',
hostname: '127.0.0.1',
debug: (msg: string) => logger.debug(msg),
});
const mockServer = await createSftpMockServer({
port: '9999',
hostname: '127.0.0.1',
debug: (msg: string) => logger.debug(msg),
users: {
alice: {
publicKey: clientPublicKey,
},
},
});
await data.client.connect({
host: '127.0.0.1',
port: 9999,
username: 'test',
privateKey: clientPrivateKey,
});
import Client from 'ssh2-sftp-client';
const mockServer = await createSftpMockServer({
port: '9999',
hostname: '127.0.0.1',
debug: (msg: string) => logger.debug(msg),
users: {
alice: {
password: 'password',
publicKey: clientPublicKey,
},
},
});
const client = new Client();
await client.connect({
host: '127.0.0.1',
port: 9999,
username: 'test',
password: 'test',
});
await client.put(Buffer.from('File content'), 'tmp/data.txt');
const content = await client.get('tmp/data.txt');
FAQs
Implementation sftp server on node to use in tests
The npm package @micham/sftp-mock-server receives a total of 0 weekly downloads. As such, @micham/sftp-mock-server popularity was classified as not popular.
We found that @micham/sftp-mock-server demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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 uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.
Security News
AI-generated slop reports are making bug bounty triage harder, wasting maintainer time, and straining trust in vulnerability disclosure programs.