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

create example with suite name #44

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
step_name: 'init and run'
client_scan_token: ${{ secrets.CLIENT_SCAN_TOKEN_DEMO }}
cli_version: 'latest'
traffic_env: 'crapi-demo1'
traffic_env: 'staging'
include_url_regex: '13.58.254.175'
traceable_server: ${{ secrets.TRACEABLE_SERVER_DEMO }}
- name: Stop Scan
Expand All @@ -27,7 +27,7 @@ jobs:
with:
step_name: 'stop'
client_scan_token: ${{ secrets.CLIENT_SCAN_TOKEN_DEMO }}
traffic_env: 'crapi-demo1'
traffic_env: 'staging'
traceable_server: ${{ secrets.TRACEABLE_SERVER_DEMO }}
functionalTest:
runs-on: ubuntu-20.04
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/test-traceable-ast-init-and-run-with-suite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Test Traceable AST Init And Run Action With AST Scan Suite
on:
push:
branches:
- main
pull_request:
workflow_dispatch:

jobs:
InitAndRunAstScan:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Init and run scan action
uses: Traceableai/ast-action@main
with:
step_name: 'init and run'
client_scan_token: ${{ secrets.CLIENT_SCAN_TOKEN_DEMO }}
cli_version: '1.10.2-rc.23'
scan_suite: 'github-actions-repo-suite'
traceable_server: ${{ secrets.TRACEABLE_SERVER_DEMO }}
- name: Stop Scan
if: always()
uses: Traceableai/ast-action@main
with:
step_name: 'stop'
client_scan_token: ${{ secrets.CLIENT_SCAN_TOKEN_DEMO }}
traceable_server: ${{ secrets.TRACEABLE_SERVER_DEMO }}
functionalTest:
runs-on: ubuntu-20.04
steps:
- name: Run a loop as functional test
run: |
for ((i=1;i<=100;i++));
do
echo $i
done
6 changes: 3 additions & 3 deletions .github/workflows/test-traceable-ast-init-and-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ jobs:
with:
step_name: 'init and run'
client_scan_token: ${{ secrets.CLIENT_SCAN_TOKEN_DEMO }}
cli_version: 'latest'
traffic_env: 'crapi-demo1'
cli_version: '1.10.2-rc.23'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we use latest version here 🤔

traffic_env: 'staging'
traceable_server: ${{ secrets.TRACEABLE_SERVER_DEMO }}
- name: Stop Scan
if: always()
uses: Traceableai/ast-action@main
with:
step_name: 'stop'
client_scan_token: ${{ secrets.CLIENT_SCAN_TOKEN_DEMO }}
traffic_env: 'crapi-demo1'
traffic_env: 'staging'
traceable_server: ${{ secrets.TRACEABLE_SERVER_DEMO }}
functionalTest:
runs-on: ubuntu-20.04
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/test-traceable-ast-init-traceable-ast-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ jobs:
with:
step_name: 'init'
client_scan_token: ${{ secrets.CLIENT_SCAN_TOKEN }}
traffic_env: 'samarth-crapi'
traffic_env: 'staging'
cli_version: '1.10.2-rc.23'
traceable_server: ${{ secrets.TRACEABLE_SERVER }}
traceable_cli_download_path: https://downloads.traceable.ai/cli/rc/latest/traceable-cli-latest-linux-x86_64.tar.gz
- name: Run a loop as functional test
Expand All @@ -28,15 +29,16 @@ jobs:
- name: Run scan action
uses: Traceableai/ast-action@main
with:
log_level: 'debug'
step_name: 'run'
client_scan_token: ${{ secrets.CLIENT_SCAN_TOKEN }}
traffic_env: 'samarth-crapi'
cli_version: 'latest'
traffic_env: 'staging'
cli_version: '1.10.2-rc.23'
- name: Abort Scan
uses: Traceableai/ast-action@main
if: always()
with:
step_name: 'stop'
client_scan_token: ${{ secrets.CLIENT_SCAN_TOKEN_DEMO }}
traffic_env: 'crapi-demo1'
traffic_env: 'staging'
traceable_server: ${{ secrets.TRACEABLE_SERVER_DEMO }}
45 changes: 43 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,49 @@ jobs:
done

```
2. As you can see in the above workflow, we have initiated the scan with initiate scan action step which takes client_scan_token, traffic_env, and traceable_server as input.
3. In the next step we are executing functional tests and then running the scan in the step after that which take client_scan_token,traffic_env, and cli_version as input.
```
name: Test Traceable AST Init And Run Action With AST Scan Suite
on:
push:
branches:
- main
pull_request:
workflow_dispatch:

jobs:
InitAndRunAstScan:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Init and run scan action
uses: Traceableai/ast-action@main
with:
step_name: 'init and run'
client_scan_token: ${{ secrets.CLIENT_SCAN_TOKEN_DEMO }}
cli_version: 'latest'
scan_suite: 'github-actions-test-suite'
traceable_server: ${{ secrets.TRACEABLE_SERVER_DEMO }}
- name: Stop Scan
if: always()
uses: Traceableai/ast-action@main
with:
step_name: 'stop'
client_scan_token: ${{ secrets.CLIENT_SCAN_TOKEN_DEMO }}
traceable_server: ${{ secrets.TRACEABLE_SERVER_DEMO }}
functionalTest:
runs-on: ubuntu-20.04
steps:
- name: Run a loop as functional test
run: |
for ((i=1;i<=100;i++));
do
echo $i
done
```
2. As you can see in the above workflow, we have initiated the scan with initiate scan action step which takes client_scan_token, traffic_env, and traceable_server as input. You can configure other parameters as well as mentioned in the documentation.
3. Alternatively you can create a scan-suite on the Traceable.AI Platform and configure assets, attacks, evaluation criteria etc. on the platform itself. You can spawn a scan from the suite configuration by specifying just the `scan_suite` parameter with value as suite name.
4. In the next step we are executing functional tests and then running the scan in the step after that which take client_scan_token,traffic_env, and cli_version as input.



Loading