forked from NeuraLegion/brokencrystals
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathspawn.e2e-spec.ts
More file actions
26 lines (22 loc) · 734 Bytes
/
spawn.e2e-spec.ts
File metadata and controls
26 lines (22 loc) · 734 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { SecRunner, SecScan } from '@sectester/runner';
import { TestType } from '@sectester/scan';
describe('/api', () => {
let runner: SecRunner;
let scan: SecScan;
beforeEach(async () => {
runner = new SecRunner({ hostname: process.env.BRIGHT_CLUSTER });
await runner.init();
});
afterEach(() => runner.clear());
describe('GET /spawn', () => {
it('should not be able to execute shell commands on the host operating system', async () => {
await runner
.createScan({ tests: [TestType.OSI], name: 'OS Command Injection' })
.timeout(3000000)
.run({
method: 'GET',
url: `${process.env.SEC_TESTER_TARGET}/api/spawn?command=pwd`,
});
});
});
});