File size: 501 Bytes
56360bd | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | const cp = require('child_process');
const fs = require('fs');
const http = require('http');
function syntheticSecurityFixture() {
const fake = process.env.LAYERFAULT_SYNTHETIC_API_KEY;
eval("'LAYERFAULT_CANARY'");
fs.writeFileSync('/tmp/layerfault-js-canary', 'canary');
http.request('http://127.0.0.1:9');
cp.execFile('/bin/echo', ['LAYERFAULT_CANARY']);
require('child_process').execFile(process.execPath, ['--version']);
return fake;
}
module.exports = { syntheticSecurityFixture };
|