diff --git a/.github/workflows/dependabot-approve-and-request-merge.yml b/.github/workflows/dependabot-approve-and-request-merge.yml new file mode 100644 index 00000000..a2c9b5de --- /dev/null +++ b/.github/workflows/dependabot-approve-and-request-merge.yml @@ -0,0 +1,15 @@ +name: "dependabot approve-and-request-merge" + +on: pull_request_target + +jobs: + worker: + permissions: + contents: write + id-token: write + runs-on: ubuntu-latest + if: github.actor == 'dependabot[bot]' + steps: + - uses: contentful/github-auto-merge@v1 + with: + VAULT_URL: ${{ secrets.VAULT_URL }} diff --git a/.github/workflows/sast.yaml b/.github/workflows/sast.yaml new file mode 100644 index 00000000..cbb7083f --- /dev/null +++ b/.github/workflows/sast.yaml @@ -0,0 +1,31 @@ +name: SAST (Static Application Security Testing) + +on: + push: + branches: [master, main] + pull_request: + branches: [master, main] + +jobs: + polaris: + name: polaris / code-scan + continue-on-error: true + runs-on: ubuntu-latest + if: (github.repository_owner == 'contentful') && (endsWith(github.actor, '[bot]') == false) + steps: + - name: Clone repo + uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + with: + fetch-depth: 0 + + - name: Synopsys Polaris + uses: contentful/polaris-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + polaris_url: ${{ secrets.POLARIS_SERVER_URL }} + polaris_access_token: ${{ secrets.POLARIS_ACCESS_TOKEN }} + debug: true + polaris_command: analyze -w --coverity-ignore-capture-failure + security_gate_filters: '{ "severity": ["High", "Medium"] }' + fail_on_error: false + report_url: "https://github.com/contentful/security-tools-config/issues/new?title=False%20positive%20in%20Polaris"