From b162ae6b67db2f2f7340e7286773be227d085eff Mon Sep 17 00:00:00 2001 From: Mikhail Bahdashych Date: Tue, 18 Aug 2026 11:03:27 +0200 Subject: [PATCH 1/2] Add Snyk Elixir security scan workflow Registers and keeps fresh the hex dependency scan via the shared elixir-snyk-security-scan workflow, per the security documentation. Co-Authored-By: Claude Fable 5 --- .github/workflows/security.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/security.yaml diff --git a/.github/workflows/security.yaml b/.github/workflows/security.yaml new file mode 100644 index 0000000..a93d095 --- /dev/null +++ b/.github/workflows/security.yaml @@ -0,0 +1,20 @@ +name: Snyk Elixir Security Scan + +on: + pull_request: + merge_group: + push: + branches: + - master + schedule: + - cron: '39 3 * * 1' + workflow_dispatch: + +permissions: + contents: read + +jobs: + security-scan: + uses: salemove/glia-security-workflows/.github/workflows/elixir-snyk-security-scan.yaml@master + secrets: + SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} From d1d44d1db31fc718375c145b34e7a9127c048a35 Mon Sep 17 00:00:00 2001 From: Mikhail Bahdashych Date: Tue, 18 Aug 2026 14:21:21 +0200 Subject: [PATCH 2/2] Inline the Snyk Elixir scan steps (public repo) Public repositories cannot call the private glia-security-workflows reusable workflow, so the scan steps are inlined here directly, with the standard triggers (schedule, workflow_dispatch) from the security docs. Co-Authored-By: Claude Fable 5 --- .github/workflows/security.yaml | 39 +++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/.github/workflows/security.yaml b/.github/workflows/security.yaml index a93d095..5a89c8e 100644 --- a/.github/workflows/security.yaml +++ b/.github/workflows/security.yaml @@ -1,3 +1,7 @@ +# Inlined copy of the scan steps from +# salemove/glia-security-workflows/.github/workflows/elixir-snyk-security-scan.yaml. +# This repository is public and cannot call that private reusable workflow, +# so the steps live here directly. If the shared workflow changes, sync this copy. name: Snyk Elixir Security Scan on: @@ -14,7 +18,34 @@ permissions: contents: read jobs: - security-scan: - uses: salemove/glia-security-workflows/.github/workflows/elixir-snyk-security-scan.yaml@master - secrets: - SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} + snyk-scan: + runs-on: ubuntu-latest + env: + SNYK_CFG_ORG: ${{ vars.SNYK_ORGANIZATION_SLUG }} + steps: + - name: Checkout code + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + with: + persist-credentials: false + + - name: Set up Snyk CLI + uses: snyk/actions/setup@cdb760004ba9ea4d525f2e043745dfe85bb9077e + + - name: Set up Elixir + uses: erlef/setup-beam@5304e04ea2b355f03681464e683d92e3b2f18451 + with: + otp-version: '27' + elixir-version: '1.18' + + - name: Update project monitoring in Snyk + # Never monitor without an explicit org: with SNYK_CFG_ORG empty the CLI + # falls back to the token's default org and recreates projects there. + if: github.event_name == 'push' && vars.SNYK_ORGANIZATION_SLUG != '' + run: snyk monitor --project-name=${{ github.repository }} --file=mix.exs + env: + SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} + + - name: Run Snyk to check for vulnerabilities + run: snyk test --project-name=${{ github.repository }} --severity-threshold=high --print-deps --package-manager=hex --file=mix.exs + env: + SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}