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

SAST job multiple json files upload #14

Merged
merged 1 commit into from
Apr 28, 2024
Merged
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
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
```