From 9744b8f3b58f39e65faa4bf117a3f0efeb9748b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Fabianski?= Date: Mon, 17 Jul 2023 15:24:07 +0200 Subject: [PATCH] feat: add Bearer code scanning option --- code-scanning/bearer.yml | 39 ++++++++++++++ .../properties/bearer.properties.json | 7 +++ icons/bearer.svg | 53 +++++++++++++++++++ 3 files changed, 99 insertions(+) create mode 100644 code-scanning/bearer.yml create mode 100644 code-scanning/properties/bearer.properties.json create mode 100644 icons/bearer.svg diff --git a/code-scanning/bearer.yml b/code-scanning/bearer.yml new file mode 100644 index 0000000000..a62494a45e --- /dev/null +++ b/code-scanning/bearer.yml @@ -0,0 +1,39 @@ +# This workflow file requires a free account on Bearer.com to manage findings, notifications and more. +# +# See https://docs.bearer.com/guides/bearer-cloud/ + +name: Bearer + +on: + push: + branches: [$default-branch, $protected-branches] + pull_request: + # The branches below must be a subset of the branches above + branches: [$default-branch] + schedule: + - cron: $cron-weekly + +permissions: + contents: read # for actions/checkout to fetch code + security-events: write # for github/codeql-action/upload-sarif to upload SARIF results + actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status + +jobs: + bearer: + runs-on: ubuntu-latest + steps: + # Checkout project source + - uses: actions/checkout@v3 + # Scan code using Bearer CLI + - name: Run Report + id: report + uses: bearer/bearer-action@v2 + with: + api-key: ${{ secrets.BEARER_TOKEN }} + format: sarif + output: results.sarif + # Upload SARIF file generated in previous step + - name: Upload SARIF file + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: results.sarif diff --git a/code-scanning/properties/bearer.properties.json b/code-scanning/properties/bearer.properties.json new file mode 100644 index 0000000000..05b02c2718 --- /dev/null +++ b/code-scanning/properties/bearer.properties.json @@ -0,0 +1,7 @@ +{ + "name": "Bearer", + "creator": "Bearer", + "description": "Continuously run Bearer code security scanning tool (SAST) to discover, filter and prioritize security and privacy risks.", + "iconName": "bearer", + "categories": ["Code Scanning", "JavaScript", "TypeScript", "Java", "Ruby"] +} diff --git a/icons/bearer.svg b/icons/bearer.svg new file mode 100644 index 0000000000..64cb93a74b --- /dev/null +++ b/icons/bearer.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +