diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..a4f2f60 --- /dev/null +++ b/action.yml @@ -0,0 +1,43 @@ +name: security-gate +description: Simple and pratical security gate for Github Security Alerts +author: LESIS +branding: + icon: "shield" + color: "blue" + +inputs: + max_critical: + description: 'Critical severity limit' + required: false + default: 1 + max_high: + description: 'High severity limit' + required: false + default: 1 + max_medium: + description: 'Medium severity limit' + required: false + max_low: + description: 'Low severity limit' + required: false + default: 1 + +runs: + using: "composite" + steps: + - shell: bash + env: + CRITICAL: ${{ inputs.max_critical }} + HIGH: ${{ inputs.max_high }} + MEDIUM: ${{ inputs.max_medium }} + LOW: ${{ inputs.max_low }} + GITHUB_TOKEN: ${{ secrets.TOKEN }} + + run: | + docker run ghcr.io/instriq/security-gate/security-gate:latest \ + -t $GITHUB_TOKEN \ + -r ${{ github.repository }} \ + --critical $MAX_CRITICAL \ + --high $MAX_HIGH \ + --medium $MAX_MEDIUM \ + --low $MAX_LOW