fix: enable plain HTTP with insecure for HTTP metrics exporter #45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Snyk checks | |
| on: | |
| push: | |
| branches: [main, master, "**/*"] | |
| pull_request: | |
| branches: ["**/*"] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| security-events: write | |
| jobs: | |
| # Check if pipeline should be skipped based on first line of commit message | |
| check-skip: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| should-skip: ${{ steps.check.outputs.should-skip }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Check if pipeline should be skipped | |
| id: check | |
| run: | | |
| COMMIT_MESSAGE=$(git log -1 --pretty=%B) | |
| FIRST_LINE=$(echo "$COMMIT_MESSAGE" | head -n 1) | |
| if [[ "$FIRST_LINE" == *"--skip-pipeline"* ]]; then | |
| echo "should-skip=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "should-skip=false" >> $GITHUB_OUTPUT | |
| fi | |
| snyk-open-source: | |
| needs: [check-skip] | |
| if: needs.check-skip.outputs.should-skip != 'true' | |
| name: Snyk Open Source (deps) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node (for UI) | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Setup Python (for tests tooling) | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.26" | |
| - name: Install Snyk CLI | |
| uses: snyk/actions/setup@master | |
| - name: Snyk test (all projects) | |
| env: | |
| SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | |
| run: snyk test --all-projects --detection-depth=4 --sarif-file-output=snyk.sarif || true | |
| - name: Upload SARIF | |
| if: always() | |
| uses: github/codeql-action/upload-sarif@v3 | |
| with: | |
| sarif_file: snyk.sarif | |
| snyk-code: | |
| needs: [check-skip] | |
| if: needs.check-skip.outputs.should-skip != 'true' | |
| name: Snyk Code (SAST) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node (for UI) | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Setup Python (for tests tooling) | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Setup Python (for tests tooling) | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| cache: "pip" | |
| cache-dependency-path: | | |
| tests/integrations/requirements.txt | |
| tests/governance/requirements.txt | |
| - name: Install Python dependencies (tests tooling) | |
| run: | | |
| python -m pip install --disable-pip-version-check \ | |
| -r tests/integrations/requirements.txt \ | |
| -r tests/governance/requirements.txt | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.26" | |
| - name: Build | |
| run: make build | |
| - name: Install Snyk CLI | |
| uses: snyk/actions/setup@master | |
| - name: Snyk Code test | |
| env: | |
| SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | |
| run: snyk code test --sarif-file-output=snyk-code.sarif || true | |
| - name: Upload SARIF | |
| if: always() | |
| uses: github/codeql-action/upload-sarif@v3 | |
| with: | |
| sarif_file: snyk-code.sarif |