Skip to content

Commit

Permalink
Merge pull request #14 from nyrahul/main
Browse files Browse the repository at this point in the history
SAST job multiple json files upload
  • Loading branch information
nyrahul authored Apr 28, 2024
2 parents 6502f80 + 6b0dcdd commit c88c778
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions sast-job/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#

```bash
rm -f SQ-*.json # Remove existing reports
docker run --rm -it \
-e SQ_URL=http://35.188.10.229:9000 \
-e SQ_AUTH_TOKEN=<AUTH-TOKEN> \
Expand All @@ -10,6 +11,8 @@ docker run --rm -it \
accuknox/sastjob:latest
```

This will create a bunch of SQ-*.json files, one for every project/component found.

## Configuration

| Var | Sample Value | Description |
Expand All @@ -29,8 +32,10 @@ LABEL=SAST
AK_URL="cspm.demo.accuknox.com"
AK_TOK=<artifact token received from accuknox management plane>

curl --location "https://$AK_URL/api/v1/artifact/?tenant_id=$TENANT_ID&data_type=SQ&save_to_s3=True&label_id=$LABEL" \
--header "Tenant-Id: $TENANT_ID" \
--header "Authorization: Bearer $AK_TOK" \
--form 'file=@"SQ-nimbus.json"'
for file in `ls -1 SQ-*.json`; do
curl --location "https://$AK_URL/api/v1/artifact/?tenant_id=$TENANT_ID&data_type=SQ&save_to_s3=True&label_id=$LABEL" \
--header "Tenant-Id: $TENANT_ID" \
--header "Authorization: Bearer $AK_TOK" \
--form "file=@"$file""
done
```

0 comments on commit c88c778

Please sign in to comment.