💥 Override configuration
You can override the configuration of your application on Escape by passing a partial JSON configuration. This configuration will be merged with the one on Escape using the deepmerge algorithm.
info
You can learn more about configuring your application on Escape here.
- GitHub Action
- Gitlab CI
- CLI
- API
# https://github.com/Escape-Technologies/action
name: Post Deploy
on:
push:
branches:
- staging
jobs:
Escape:
runs-on: ubuntu-latest
steps:
- name: Escape Scan
uses: Escape-Technologies/action@v0
with:
application_id: ${{ secrets.ESCAPE_APPLICATION_ID }}
api_key: ${{ secrets.ESCAPE_API_KEY }}
configuration_override: '{"users":{"user1":{"auth":"schema1","headers":{"Authorization":"<YOUR_AUTH>"}}},"auth":{"schema1":{"tech":"manual"}}}'
Escape:
stage: post-deploy
needs:
- deploy # name of your deployment job
variables: # you can find those secrets directly in your Escape Application Settings
- ESCAPE_APPLICATION_ID: $ESCAPE_APPLICATION_ID
- ESCAPE_API_KEY: $ESCAPE_API_KEY
- CONFIGURATION_OVERRIDE: '{"users":{"user1":{"auth":"schema1","headers":{"Authorization":"<YOUR_AUTH>"}}},"auth":{"schema1":{"tech":"manual"}}}'
image: node:alpine
before_script:
- npm install -g @escape.tech/action
- npm show @escape.tech/action version
script:
- escape-action
allow_failure: true
only:
refs:
- staging
export ESCAPE_APPLICATION_ID=<YOUR APPLICATION ID>
export ESCAPE_API_KEY=<YOUR API KEY>
export CONFIGURATION_OVERRIDE='{"users":{"user1":{"auth":"schema1","headers":{"Authorization":"<YOUR_AUTH>"}}},"auth":{"schema1":{"tech":"manual"}}}'
npm i -g @escape.tech/action
escape-action
export APPLICATION_ID=<YOUR APPLICATION ID>
export API_KEY=<YOUR API KEY>
export CONFIGURATION_OVERRIDE='{"users":{"user1":{"auth":"schema1","headers":{"Authorization":"<YOUR_AUTH>"}}},"auth":{"schema1":{"tech":"manual"}}}'
curl -X POST \
-H "Authorization: Key $API_KEY" \
-H "Content-Type: application/json" \
-d "{\"configurationOverride\": $CONFIGURATION_OVERRIDE }"
https://api-public.prod.cloud.escape.tech/applications/$APPLICATION_ID/start-scan