Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: test and readme #7

Merged
merged 1 commit into from
Dec 17, 2024
Merged
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
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,6 @@ jobs:
uses: NeuraLegion/stop-discovery@release
with:
api_token: ${{ secrets.BRIGHTSEC_TOKEN }}
discovery: ${{ steps.discovery.outputs.id }}
discovery_id: ${{ steps.discovery.outputs.id }}
project_id: ${{ vars.PROJECT_ID }}
hostname: ${{ vars.HOSTNAME }}
60 changes: 51 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,23 @@ _Example:_ `name: GitHub discovery ${{ github.sha }}`

### `api_token`

**Required**. Your Bright API authorization token (key). You can generate it in the **Organization** section in [the Bright app](https://app.neuralegion.com/login). Find more information [here](https://docs.brightsec.com/docs/manage-your-organization#manage-organization-apicli-authentication-tokens).
**Required**. Your Bright API authorization token (key). You can generate it in the **Organization** section in [the Bright app](https://app.brightsec.com/login). Find more information [here](https://docs.brightsec.com/docs/manage-your-organization#manage-organization-apicli-authentication-tokens).

_Example:_ `api_token: ${{ secrets.NEURALEGION_TOKEN }}`
_Example:_ `api_token: ${{ secrets.BRIGHTSEC_TOKEN }}`

### `project_id`

Provide project-id for the discovery.

_Example:_ `project_id: gBAh2n9BD9ps7FVQXbLWXv`
_Example:_ `project_id: ${{ vars.PROJECT_ID }}`

### `discovery_types`

**Required**. Array of discovery types. The following types are available:

- `archive` - uses an uploaded HAR-file for a scan
- `archive` - uses an uploaded HAR-file for a discovery
- `crawler` - uses a crawler to define the attack surface for a scan
- `oas` - uses an uploaded OpenAPI schema for a scan <br>
- `oas` - uses an uploaded OpenAPI schema for a discovery <br>
If no discovery type is specified, `crawler` is applied by default.

_Example:_
Expand All @@ -76,13 +76,13 @@ discovery_types: |

### `file_id`

**Required** if the discovery type is set to `archive` or `oas`. ID of a HAR-file or an OpenAPI schema you want to use for a discovery. You can get the ID of an uploaded HAR-file or an OpenAPI schema in the **Storage** section on [app.neuralegion.com](https://app.neuralegion.com/login).
**Required** if the discovery type is set to `archive` or `oas`. ID of a HAR-file or an OpenAPI schema you want to use for a discovery. You can get the ID of an uploaded HAR-file or an OpenAPI schema in the **Storage** section on [app.brightsec.com](https://app.brightsec.com/login).

_Example:_

```
FILE_ID=$(nexploit-cli archive:upload \
--token ${{ secrets.NEURALEGION_TOKEN }} \
--token ${{ secrets.BRIGHTSEC_TOKEN }} \
--discard true \
./example.har)
```
Expand Down Expand Up @@ -129,6 +129,47 @@ exclude_entry_points: |
[ { "methods": [], "patterns": [ "users\/.+\/?$" ] } ]
```

### `auth_object_id`

ID of auth-object to be used by the discovery.

_Example:_ `auth_object_id: 7NSbwLjh7Fhd8mPy1DM7Bk`

### `repeaters`

List of repeater ids to be used by the discovery.

_Example:_

```yaml
repeaters: |
['m5Y42fYm2CRCVdZh83w5af']
```

### `smart`

Use automatic smart decisions such as: parameter skipping, detection phases, etc. to minimize scan time (default: true).

_Example:_ `smart: false`

### `crawl_parent_subdomains`

Crawl parent path folders and subdomains (default: false).

_Example:_ `crawl_parent_subdomains: true`

### `concurrency`

Number of maximum concurrent requests allowed to be sent to the target, can range between 1 to 50 (default: 10).

_Example:_ `concurrency: 20`

### `interactions_depth`

Number of maximum interactions with nested objects, can range between 1 to 5 (default: 3).

_Example:_ `interactions_depth: 1`

## Outputs

### `url`
Expand All @@ -147,10 +188,11 @@ ID of the created discovery.
steps:
- name: Start Bright Discovery
id: start
uses: NeuraLegion/run-scan@v1.1
uses: NeuraLegion/run-scan@release
with:
api_token: ${{ secrets.NEURALEGION_TOKEN }}
api_token: ${{ secrets.BRIGHTSEC_TOKEN }}
name: GitHub discovery ${{ github.sha }}
project_id: ${{ vars.PROJECT_ID }}
discovery_types: |
[ "crawler", "archive" ]
crawler_urls: |
Expand Down
Loading