Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
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 21 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.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.