From ef79ed5b091ff554c84573f349b6c1ba00231582 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Heitor=20Gouv=C3=AAa?= Date: Wed, 7 Feb 2024 19:56:39 -0300 Subject: [PATCH] Create action.yml --- action.yml | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 action.yml 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