Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added .brightsec/.gitkeep
Empty file.
39 changes: 39 additions & 0 deletions .brightsec/tests/delete-logout.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { test, before, after } from 'node:test';
import { SecRunner } from '@sectester/runner';
import { AttackParamLocation, HttpMethod } from '@sectester/scan';

const timeout = 40 * 60 * 1000;
const baseUrl = process.env.BRIGHT_TARGET_URL!;

let runner!: SecRunner;

before(async () => {
runner = new SecRunner({
hostname: process.env.BRIGHT_HOSTNAME!,
projectId: process.env.BRIGHT_PROJECT_ID!
});

await runner.init();
});

after(() => runner.clear());

test('DELETE /logout', { signal: AbortSignal.timeout(timeout) }, async () => {
await runner
.createScan({
tests: ['csrf', 'http_method_fuzzing', 'xss', 'unvalidated_redirect'],
attackParamLocations: [AttackParamLocation.PATH],
starMetadata: {
code_source: 'NeuraLegion/ruby-example-app:master',
databases: ['PostgreSQL'],
user_roles: ['admin']
},
poolSize: +process.env.SECTESTER_SCAN_POOL_SIZE || undefined
})
.setFailFast(false)
.timeout(timeout)
.run({
method: HttpMethod.DELETE,
url: `${baseUrl}/logout`
});
});
40 changes: 40 additions & 0 deletions .brightsec/tests/delete-posts-1-json.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { test, before, after } from 'node:test';
import { SecRunner } from '@sectester/runner';
import { AttackParamLocation, HttpMethod } from '@sectester/scan';

const timeout = 40 * 60 * 1000;
const baseUrl = process.env.BRIGHT_TARGET_URL!;

let runner!: SecRunner;

before(async () => {
runner = new SecRunner({
hostname: process.env.BRIGHT_HOSTNAME!,
projectId: process.env.BRIGHT_PROJECT_ID!
});

await runner.init();
});

after(() => runner.clear());

test('DELETE /posts/1.json', { signal: AbortSignal.timeout(timeout) }, async () => {
await runner
.createScan({
tests: ['csrf', 'bopla', 'id_enumeration', 'sqli'],
attackParamLocations: [AttackParamLocation.PATH],
starMetadata: {
code_source: 'NeuraLegion/ruby-example-app:master',
databases: ['PostgreSQL'],
user_roles: ['admin']
},
poolSize: +process.env.SECTESTER_SCAN_POOL_SIZE || undefined
})
.setFailFast(false)
.timeout(timeout)
.run({
method: HttpMethod.DELETE,
url: `${baseUrl}/posts/1.json`,
headers: { 'Content-Type': 'application/json' }
});
});
40 changes: 40 additions & 0 deletions .brightsec/tests/delete-posts-1.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { test, before, after } from 'node:test';
import { SecRunner } from '@sectester/runner';
import { AttackParamLocation, HttpMethod } from '@sectester/scan';

const timeout = 40 * 60 * 1000;
const baseUrl = process.env.BRIGHT_TARGET_URL!;

let runner!: SecRunner;

before(async () => {
runner = new SecRunner({
hostname: process.env.BRIGHT_HOSTNAME!,
projectId: process.env.BRIGHT_PROJECT_ID!
});

await runner.init();
});

after(() => runner.clear());

test('DELETE /posts/1', { signal: AbortSignal.timeout(timeout) }, async () => {
await runner
.createScan({
tests: ['csrf', 'bopla', 'id_enumeration', 'sqli'],
attackParamLocations: [AttackParamLocation.PATH],
starMetadata: {
code_source: 'NeuraLegion/ruby-example-app:master',
databases: ['PostgreSQL'],
user_roles: ['admin']
},
poolSize: +process.env.SECTESTER_SCAN_POOL_SIZE || undefined
})
.setFailFast(false)
.timeout(timeout)
.run({
method: HttpMethod.DELETE,
url: `${baseUrl}/posts/1`,
headers: { 'Content-Type': 'application/json' }
});
});
40 changes: 40 additions & 0 deletions .brightsec/tests/delete-users-1-json.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { test, before, after } from 'node:test';
import { SecRunner } from '@sectester/runner';
import { AttackParamLocation, HttpMethod } from '@sectester/scan';

const timeout = 40 * 60 * 1000;
const baseUrl = process.env.BRIGHT_TARGET_URL!;

let runner!: SecRunner;

before(async () => {
runner = new SecRunner({
hostname: process.env.BRIGHT_HOSTNAME!,
projectId: process.env.BRIGHT_PROJECT_ID!
});

await runner.init();
});

after(() => runner.clear());

test('DELETE /users/1.json', { signal: AbortSignal.timeout(timeout) }, async () => {
await runner
.createScan({
tests: ['csrf', 'bopla', 'id_enumeration', 'sqli'],
attackParamLocations: [AttackParamLocation.PATH],
starMetadata: {
code_source: 'NeuraLegion/ruby-example-app:master',
databases: ['PostgreSQL'],
user_roles: ['admin']
},
poolSize: +process.env.SECTESTER_SCAN_POOL_SIZE || undefined
})
.setFailFast(false)
.timeout(timeout)
.run({
method: HttpMethod.DELETE,
url: `${baseUrl}/users/1.json`,
headers: { 'Content-Type': 'application/json' }
});
});
40 changes: 40 additions & 0 deletions .brightsec/tests/delete-users-1.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { test, before, after } from 'node:test';
import { SecRunner } from '@sectester/runner';
import { AttackParamLocation, HttpMethod } from '@sectester/scan';

const timeout = 40 * 60 * 1000;
const baseUrl = process.env.BRIGHT_TARGET_URL!;

let runner!: SecRunner;

before(async () => {
runner = new SecRunner({
hostname: process.env.BRIGHT_HOSTNAME!,
projectId: process.env.BRIGHT_PROJECT_ID!
});

await runner.init();
});

after(() => runner.clear());

test('DELETE /users/1', { signal: AbortSignal.timeout(timeout) }, async () => {
await runner
.createScan({
tests: ['csrf', 'bopla', 'id_enumeration', 'sqli'],
attackParamLocations: [AttackParamLocation.PATH],
starMetadata: {
code_source: 'NeuraLegion/ruby-example-app:master',
databases: ['PostgreSQL'],
user_roles: ['admin']
},
poolSize: +process.env.SECTESTER_SCAN_POOL_SIZE || undefined
})
.setFailFast(false)
.timeout(timeout)
.run({
method: HttpMethod.DELETE,
url: `${baseUrl}/users/1`,
headers: { 'Content-Type': 'application/json' }
});
});
39 changes: 39 additions & 0 deletions .brightsec/tests/get-login.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { test, before, after } from 'node:test';
import { SecRunner } from '@sectester/runner';
import { AttackParamLocation, HttpMethod } from '@sectester/scan';

const timeout = 40 * 60 * 1000;
const baseUrl = process.env.BRIGHT_TARGET_URL!;

let runner!: SecRunner;

before(async () => {
runner = new SecRunner({
hostname: process.env.BRIGHT_HOSTNAME!,
projectId: process.env.BRIGHT_PROJECT_ID!
});

await runner.init();
});

after(() => runner.clear());

test('GET /login', { signal: AbortSignal.timeout(timeout) }, async () => {
await runner
.createScan({
tests: ['csrf', 'xss', 'sqli', 'unvalidated_redirect', 'secret_tokens'],
attackParamLocations: [AttackParamLocation.QUERY, AttackParamLocation.HEADER],
starMetadata: {
code_source: 'NeuraLegion/ruby-example-app:master',
databases: ['PostgreSQL'],
user_roles: ['admin']
},
poolSize: +process.env.SECTESTER_SCAN_POOL_SIZE || undefined
})
.setFailFast(false)
.timeout(timeout)
.run({
method: HttpMethod.GET,
url: `${baseUrl}/login`
});
});
39 changes: 39 additions & 0 deletions .brightsec/tests/get-posts-1-edit.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { test, before, after } from 'node:test';
import { SecRunner } from '@sectester/runner';
import { AttackParamLocation, HttpMethod } from '@sectester/scan';

const timeout = 40 * 60 * 1000;
const baseUrl = process.env.BRIGHT_TARGET_URL!;

let runner!: SecRunner;

before(async () => {
runner = new SecRunner({
hostname: process.env.BRIGHT_HOSTNAME!,
projectId: process.env.BRIGHT_PROJECT_ID!
});

await runner.init();
});

after(() => runner.clear());

test('GET /posts/1/edit', { signal: AbortSignal.timeout(timeout) }, async () => {
await runner
.createScan({
tests: ['csrf', 'bopla', 'id_enumeration', 'xss'],
attackParamLocations: [AttackParamLocation.PATH],
starMetadata: {
code_source: 'NeuraLegion/ruby-example-app:master',
databases: ['PostgreSQL'],
user_roles: ['admin']
},
poolSize: +process.env.SECTESTER_SCAN_POOL_SIZE || undefined
})
.setFailFast(false)
.timeout(timeout)
.run({
method: HttpMethod.GET,
url: `${baseUrl}/posts/1/edit`
});
});
40 changes: 40 additions & 0 deletions .brightsec/tests/get-posts-1-json.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { test, before, after } from 'node:test';
import { SecRunner } from '@sectester/runner';
import { AttackParamLocation, HttpMethod } from '@sectester/scan';

const timeout = 40 * 60 * 1000;
const baseUrl = process.env.BRIGHT_TARGET_URL!;

let runner!: SecRunner;

before(async () => {
runner = new SecRunner({
hostname: process.env.BRIGHT_HOSTNAME!,
projectId: process.env.BRIGHT_PROJECT_ID!
});

await runner.init();
});

after(() => runner.clear());

test('GET /posts/1.json', { signal: AbortSignal.timeout(timeout) }, async () => {
await runner
.createScan({
tests: ['csrf', 'id_enumeration', 'sqli', 'xss'],
attackParamLocations: [AttackParamLocation.PATH],
starMetadata: {
code_source: 'NeuraLegion/ruby-example-app:master',
databases: ['PostgreSQL'],
user_roles: ['admin']
},
poolSize: +process.env.SECTESTER_SCAN_POOL_SIZE || undefined
})
.setFailFast(false)
.timeout(timeout)
.run({
method: HttpMethod.GET,
url: `${baseUrl}/posts/1.json`,
headers: { 'Content-Type': 'application/json' }
});
});
40 changes: 40 additions & 0 deletions .brightsec/tests/get-posts-1.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { test, before, after } from 'node:test';
import { SecRunner } from '@sectester/runner';
import { AttackParamLocation, HttpMethod } from '@sectester/scan';

const timeout = 40 * 60 * 1000;
const baseUrl = process.env.BRIGHT_TARGET_URL!;

let runner!: SecRunner;

before(async () => {
runner = new SecRunner({
hostname: process.env.BRIGHT_HOSTNAME!,
projectId: process.env.BRIGHT_PROJECT_ID!
});

await runner.init();
});

after(() => runner.clear());

test('GET /posts/1', { signal: AbortSignal.timeout(timeout) }, async () => {
await runner
.createScan({
tests: ['csrf', 'bopla', 'id_enumeration', 'sqli', 'xss'],
attackParamLocations: [AttackParamLocation.PATH],
starMetadata: {
code_source: 'NeuraLegion/ruby-example-app:master',
databases: ['PostgreSQL'],
user_roles: ['admin']
},
poolSize: +process.env.SECTESTER_SCAN_POOL_SIZE || undefined
})
.setFailFast(false)
.timeout(timeout)
.run({
method: HttpMethod.GET,
url: `${baseUrl}/posts/1`,
headers: { 'Content-Type': 'application/json' }
});
});
Loading
Loading