> For the complete documentation index, see [llms.txt](https://docs.nullify.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nullify.ai/tools/dast-action.md).

# DAST GitHub Action

The `Nullify-Platform/dast-action` GitHub Action requests a pentest assessment of an application from your pipeline. It installs the Nullify CLI and runs `nullify pentest`, so it behaves as described in the [CLI engagement workflow](https://docs.nullify.ai/capabilities/pentests/engagement-workflow.md#cli): our team reviews the request before the pentest runs, and the step returns once the request is recorded.

From action versions that pin CLI version 0.29.0, the action installs the CLI from its release archive and verifies the archive against the release checksums. Earlier action versions pin CLI 0.11.6, whose release has no downloadable assets, so they fail at install.

## Before you start

* Configure the application in Nullify: its targets, web services and credentials. The API schema and credentials come from this configuration, not from the action.
* Confirm that the target to test is non-production. A request for a production or unconfirmed target is refused.
* The action exchanges the workflow's GitHub token for a Nullify token, so it needs no Nullify secret.

## Inputs

| Input                        | Behavior                                                                                       |
| ---------------------------- | ---------------------------------------------------------------------------------------------- |
| `nullify-host`               | Required. Your Nullify instance, such as `acme.nullify.ai`.                                    |
| `app-id`, `app-name`         | The application to assess; set one. When you set both, they must name the same application.    |
| `target-host`                | The URL of the deployment to assess, needed when the application has more than one deployment. |
| `github-token`               | The token exchanged for a Nullify token. Defaults to the workflow's token.                     |
| `nullify-version`, `os-arch` | The CLI release and platform to install. `os-arch` is detected from the runner when empty.     |
| `base-args`                  | Global CLI arguments, such as `-v`; only use trusted configuration.                            |

## Outputs

| Output    | Value                                                                  |
| --------- | ---------------------------------------------------------------------- |
| `scan_id` | The ID of the requested scan.                                          |
| `status`  | The scan status: `awaiting_manual` while our team reviews the request. |

## Example

```yaml
- name: Request a Nullify pentest assessment
  id: pentest
  uses: nullify-platform/dast-action@<pinned-revision>
  with:
    nullify-host: acme.nullify.ai
    app-name: Payments API
    target-host: https://api.staging.example.dev
- run: echo "Scan ${{ steps.pentest.outputs.scan_id }} is ${{ steps.pentest.outputs.status }}"
```

Pin and review the action revision you use. Do not run the action on untrusted pull-request code.

## Migrating from earlier action versions

* `nullify-host` is now required; the earlier default, `api.nullify.ai`, cannot exchange a GitHub token.
* `spec-path`, `header`, every `auth-*` input and every `user-N-*` input are removed. Configure the API schema and credentials on the application in Nullify instead.
* `local` and `image-label` are removed. A target that is not reachable from the internet is assessed by Nullify with access to your network; see [Running in Private Networks](https://docs.nullify.ai/capabilities/pentests/private-networks.md).
* `github-repository` is removed: the action uses the workflow's repository.
