> For the complete CircleCI developer hub index, see [llms.txt](https://circleci.com/developer/llms.txt)

# wallarm/fast

Wallarm's Framework for Automated Security Testing (FAST) is a tool for automatically generating and running security tests. 
This Orb allows to execute security tests based on the baselines that have been previously recorded. 
To start using this Orb, you have to setup the WALLARM_API_TOKEN at your project's enviroment variables settings (you get the token at https://us1.my.wallarm.com/nodes).
More on how to use FAST read here: https://docs.fast.wallarm.com/en/.


## Commands

### run_security_tests

Start FAST container in testing mode.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `app_host` | string | $(hostname -i | grep -o -E "([0-9]{1,3}[\.]){3}[0-9]{1,3}" | head -n1) | Hostname of application without port. Defaults to internal ip. Examples: 127.0.0.1 or example.com
 |
| `app_port` | string | 80 | Application port. Can be used when app_uri is not specified directly.
 |
| `policy_id` | string |  | Policy id. You can find it at https://my.wallarm.com/testing/policies/?check=all With an empty value test run will be use the default policy.
 |
| `stop_on_first_fail` | boolean | false | Stop Wallarm test run when first vulnerability is found.
 |
| `test_record_id` | string |  | Test record id. You can find it at https://my.wallarm.com/testing/?status=all
 |
| `test_run_desc` | string |  | Description of Wallarm test run. Default value is the name of the related test record.
 |
| `test_run_name` | string |  | Name of Wallarm test run. Default value example: "TestRun Oct 22 13:08 UTC".
 |
| `test_run_rps` | string |  | Maximum value of RPS (requests per second) for Wallarm test run. Unlimited by default.
 |
| `wallarm_api_host` | string | us1.api.wallarm.com | Wallarm API host.
 |
| `wallarm_fast_port` | string | 8080 | Wallarm FAST port.
 |
| `wallarm_version` | string | latest | Wallarm FAST version
 |

## Examples

### fast-example-rails

Example using Wallarm's FAST to run tests against simple Ruby on Rails application.
In this example parameter app_port is used.
Taken from https://github.com/wallarm/fast-example-rails.


```yaml
jobs:
  build:
    machine:
      image: ubuntu-1604:201903-01
    steps:
      - checkout
      - run:
          command: >
            docker run -d --name app-test -p 3000:3000
            wallarm/fast-example-rails
          name: Run application
      - fast/run_security_tests:
          app_port: '3000'
          test_record_id: <test_record_id>
orbs:
  fast: wallarm/fast@dev:x.y.z
version: 2.1
```