version: 2
jobs:
check-policy-compliance:
docker:
- image: 'circleci/node:latest'
auth:
username: $DOCKERHUB_USER
password: $DOCKERHUB_PASSWORD
steps:
- checkout
- run:
name: Install roxctl
command: |
curl -H "Authorization: Bearer $ROX_API_TOKEN" https://$STACKROX_CENTRAL_HOST:443/api/cli/download/roxctl-linux -o roxctl && chmod +x ./roxctl
- run:
name: Scan images for policy deviations and vulnerabilities
command: |
./roxctl image check --endpoint "$STACKROX_CENTRAL_HOST:443" --image "<your_registry/repo/image_name>"
- run:
name: Scan deployment files for policy deviations
command: |
./roxctl image check --endpoint "$STACKROX_CENTRAL_HOST:443" --image "<your_deployment_file>"
# Important note: This step assumes the YAML file you'd like to test is located in the project.
workflows:
version: 2
build_and_test:
jobs:
- check-policy-compliance
version: 2
jobs:
check-policy-compliance:
docker:
- image: 'circleci/node:latest'
auth:
username: $DOCKERHUB_USER
password: $DOCKERHUB_PASSWORD
steps:
- checkout
- run:
name: Install roxctl
command: |
curl -H "Authorization: Bearer $ROX_API_TOKEN" https://$STACKROX_CENTRAL_HOST:443/api/cli/download/roxctl-linux -o roxctl && chmod +x ./roxctl
- run:
name: Scan images for policy deviations and vulnerabilities
command: |
./roxctl image check --endpoint "$STACKROX_CENTRAL_HOST:443" --image "<your_registry/repo/image_name>" 1
- run:
name: Scan deployment files for policy deviations
command: |
./roxctl image check --endpoint "$STACKROX_CENTRAL_HOST:443" --image "<your_deployment_file>" 2
# Important note: This step assumes the YAML file you'd like to test is located in the project.
workflows:
version: 2
build_and_test:
jobs:
- check-policy-compliance
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow