Skip to content

Commit

Permalink
RAT job for vms
Browse files Browse the repository at this point in the history
Signed-off-by: Aryan-sharma11 <[email protected]>
  • Loading branch information
Aryan-sharma11 committed Jan 8, 2025
1 parent 23638d9 commit 4704cdf
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions rat-job/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Risk Assessment Tool (RAT)

## Deploy Accuknox RAT as a job for VMs

Follow these instructions to deploy RAT as cronjob for VM clusters in Accuknox SAAS

### Using knoxctl

RAT can be installed in vm cluster using knoxctl cli

#### Parameters:

| Variable | Sample Value | Description |
|----------------------|------------------------|----------------------------|
| url | cspm.dev.accuknox.com | AccuKnox CSPM Endpoint URL |
| tenantId | 24 | AccuKnox Tenant ID |
| label | $label | AccuKnox Label |
| authToken | $token | AccuKnox Token |
| clusterName | $clusterName | Cluster Name |
| schedule | 30 9 * * * | CronJob (UTC) |
| profile | ubuntu20.04/rhel9 | profile for RAT tool |
| benchmark | stig | benchmark for RAT tool |

#### knoxctl command to deploy RAT job
```sh
knoxctl onboard vm scanner \
--version v0.8.3 \
--profile ubuntu20.04 \
--benchmark stig \
--auth-token {{value}} \
--cluster-name idt1 \
--tenant-id 24 \
--label {{value}} \
--url cspm.dev.accuknox.com \
--schedule "30 9 * * *"
```
in VM clusters RAT can be installed in 2 modes
1) As a docker container
2) As a systemd service

By default RAT is installed as docker container to install it as a systemd service add `--vm-mode=systemd` flag to the above command.

## Manual Procedure

Follow these instructions to run AccuKnox RAT manually, without knoxctl.

On docker

``` sh
docker run --privileged --hostname=$(hostname) --pid=host --network=host -v /tmp:/host/tmp -v /:/host:rw --rm -it accuknox/rat:latest -p ubuntu20.04 -b stig --json
```

Using binary

- Download the RAT latest release from [here](https://github.com/accuknox/RAT/releases)
- Extract binary
- Run the following command
```sh
sudo ./rat analyze -p ubuntu20.04 -b stig --json
```
### Pushing the report to SAAS
``` sh
sudo ./rat analyze --auth-token $authtoken --url $url --label $label --cluster-name $clustername --tenant-id $tenantId -p ubuntu20.04 -b stig --json
```



0 comments on commit 4704cdf

Please sign in to comment.