Skip to content

Commit

Permalink
docs(readme): minor fixes (#69)
Browse files Browse the repository at this point in the history
fixes #67
fixes #68
  • Loading branch information
pmstss committed May 6, 2022
1 parent c73c789 commit d3a94a8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
8 changes: 4 additions & 4 deletions packages/runner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@ Then put obtained token into `BRIGHT_TOKEN` environment variable to make it acce
Once it is done, create a configuration object. Single required option is NeuraLegion `cluster` domain you are going to use, e.g. `app.neuralegion.com` as the main one:

```ts
import { Confiruration } from '@sec-tester/core';
import { Configuration } from '@sec-tester/core';

const configuration = new Confiruration({ cluster: 'app.neuralegion.com' });
const configuration = new Configuration({ cluster: 'app.neuralegion.com' });
```

### Setup runner

To set up a runner, create `SecRunner` instance passing a previously created configuration as follows:

```ts
import { Confiruration } from '@sec-tester/core';
import { Configuration } from '@sec-tester/core';
import { SecRunner } from '@sec-tester/runner';

const configuration = new Confiruration({ cluster: 'app.neuralegion.com' });
const configuration = new Configuration({ cluster: 'app.neuralegion.com' });
const runner = new SecRunner(configuration);

// or
Expand Down
8 changes: 5 additions & 3 deletions packages/scan/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ const target = new Target({
The factory exposes the `createScan` method that returns a new [Scan instance](#managing-a-scan):

```ts
import { TestType } from '@sec-tester/scan';

const scan = await scanFactory.createScan({
target,
tests: [TestType.HEADER_SECURITY]
Expand Down Expand Up @@ -239,17 +241,17 @@ const target = new Target({

The `Scan` provides a lightweight API to revise and control the status of test execution.

For instance, to get a list of found issues, you can use the `listIssues` method:
For instance, to get a list of found issues, you can use the `issues` method:

```ts
const issues = await scan.listIssues();
const issues = await scan.issues();
```

To wait for certain conditions you can use the `expect` method:

```ts
await scan.expect(Severity.HIGH);
const issues = await scan.listIssues();
const issues = await scan.issues();
```

> It returns control as soon as a scan is done, timeout is gone, or an expectation is satisfied.
Expand Down

0 comments on commit d3a94a8

Please sign in to comment.