Update active-config.json #56
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build pipeline with security test | |
on: | |
push: | |
repository_dispatch: | |
workflow_dispatch: | |
jobs: | |
scan: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Run CrAPI | |
run: | | |
docker compose pull | |
docker compose -f docker-compose.yml --compatibility up -d | |
- name: Test if CrAPI is up | |
run: sleep 5 && curl http://localhost --retry 10 --retry-delay 1 | |
- name: setup node dependencies for adding users | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- name: Add users to CrAPI | |
run: | | |
npm install | |
node . | |
working-directory: noname/baseline-script | |
- name: Docker login | |
uses: docker/login-action@v1 | |
with: | |
registry: ${{ secrets.ACTIVE_REGISTRY_URL }} | |
username: ${{ secrets.ACTIVE_REGISTRY_USER }} | |
password: ${{ secrets.ACTIVE_REGISTRY_PASSWORD }} | |
- name: Active Testing Scan | |
run: > | |
docker run | |
--add-host=host.docker.internal:host-gateway | |
-e ACTIVE_CONFIG_FILE_PATH=/noname/active-config.json | |
-v $(pwd)/noname:/noname | |
-v $(pwd)/openapi-spec:/openapi-spec | |
${{ secrets.ACTIVE_REGISTRY_URL }}/active-cli:$(curl -k ${{ secrets.ACTIVE_API_URL }}/backend/version) scan | |
--api-url=${{ secrets.ACTIVE_API_URL }} | |
--api-token=${{ secrets.ACTIVE_API_TOKEN }} | |
--test-group-id=892b51de-67cf-4328-beea-3ade61bcdeb2 | |
--branch-name=${{ github. head_ref || github. ref_name }} | |
--severity-threshold=none | |
--analyze | |
deploy: | |
needs: scan | |
runs-on: ubuntu-latest | |
steps: | |
- name: echo | |
run: echo Security scan passed, deploying to environment |