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.
docker-exec-websocket-client
Advanced tools
## Purpose Client for [docker-exec-websocket-server](https://github.com/taskcluster/docker-exec-websocket-server).
Client for docker-exec-websocket-server.
Client:
var DockerClient = require('../lib/client.js');
var client = new DockerClient({
url: 'ws://localhost:8081/a' //whole url of websocket, preface with wss if secure
tty: 'true', //Whether or not we expect VT100 style output, also enables exit codes
command: '/bin/bash', //Command to be run, can be an array with options such as ['cat', '-E']
wsopts: {}, //Pass in websocket options for the underlying websocket
});
await client.execute();
process.stdin.pipe(client.stdin);
client.stdout.pipe(process.stdout);
client.stderr.pipe(process.stderr);
client.on('exit', (exitCode) => {
//exitCode is a number between 0 and 255
process.exit(exitCode);
});
There are also other client events:
open
signifies the opening of the websocketpause
and resume
signify when the server has paused/resumed sending datashutdown
signifies the server was shut downerror
signifies that some sort of internal error occured, and may carry a utf-8 payloadEnsure Docker is installed.
To test locally:
yarn install
to install the dependencies, including developer dependenciesyarn test
DEBUG=* yarn test -f 'docker exec wc'
To test with docker-compose
, similar to CI:
docker-compose build --build-arg NODE_VERSION=16-bullseye
, or change to the desired
Node.js image tagdocker-compose run --rm test
docker-compose build ...
when the code changes or you want to try a different Node.js image.FAQs
## Purpose Client for [docker-exec-websocket-server](https://github.com/taskcluster/docker-exec-websocket-server).
The npm package docker-exec-websocket-client receives a total of 61 weekly downloads. As such, docker-exec-websocket-client popularity was classified as not popular.
We found that docker-exec-websocket-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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.