Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function main(c) {
const identity = uuid.v4();
const shell = enchannel.createShellSubject(identity, c.config);
const stdin = enchannel.createStdinSubject(identity, c.config);
const session = uuid.v4();
function createMessage(msg_type) {
const username = process.env.LOGNAME || process.env.USER ||
process.env.LNAME || process.env.USERNAME;
return {
header: {
username,
session,
msg_type,
msg_id: uuid.v4(),
date: new Date(),
version: '5.0',
},
metadata: {},