forked from NeuraLegion/brokencrystals
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathrender.e2e-spec.ts
32 lines (28 loc) · 911 Bytes
/
render.e2e-spec.ts
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
27
28
29
30
31
32
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('POST /render', () => {
it('should not contain possibility to server-side code execution', async () => {
await runner
.createScan({ tests: [TestType.SSTI], name: 'SSTI' })
.timeout(3000000)
.run({
method: 'POST',
headers: {
Accept: 'application/json, text/plain, */*',
'Content-Type': 'text/plain',
Origin: process.env.SEC_TESTER_TARGET,
},
body: `Some text`,
url: `${process.env.SEC_TESTER_TARGET}/api/render`,
});
});
});
});