Test (sast) #126
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: "Test (sast)" | |
| on: | |
| pull_request: | |
| schedule: | |
| - cron: "43 3 * * 5" | |
| workflow_dispatch: | |
| env: | |
| NODE_VERSION: 23.x | |
| permissions: | |
| contents: read | |
| jobs: | |
| sandworm: | |
| name: "sandworm: SCA & Licensing" | |
| runs-on: ubuntu-latest | |
| if: (github.actor != 'dependabot[bot]') | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Setup Node.js ${{ env.NODE_VERSION }} | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Cache npm | |
| uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node- | |
| - name: Install sandworm | |
| run: npm i -g @sandworm/[email protected] | |
| - name: sandworm | |
| run: sandworm-audit --skip-tree | |
| # https://github.com/github/codeql-action | |
| codeql: | |
| name: "CodeQL: SAST" | |
| runs-on: ubuntu-latest | |
| permissions: | |
| actions: read | |
| contents: read | |
| security-events: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| language: [javascript] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Initialize CodeQL | |
| uses: github/codeql-action/init@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0 | |
| with: | |
| languages: ${{ matrix.language }} | |
| queries: +security-and-quality | |
| - name: Autobuild | |
| uses: github/codeql-action/autobuild@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0 | |
| - name: Perform CodeQL Analysis | |
| uses: github/codeql-action/analyze@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0 | |
| with: | |
| category: "/language:${{ matrix.language }}" | |
| # https://semgrep.dev/docs/semgrep-ci/sample-ci-configs/#github-actions | |
| semgrep: | |
| name: "semgrep: SAST" | |
| runs-on: ubuntu-latest | |
| container: | |
| # https://hub.docker.com/r/semgrep/semgrep/tags | |
| image: semgrep/semgrep:1.111.0 # v1.111.0 | |
| if: (github.actor != 'dependabot[bot]') | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| # https://semgrep.dev/docs/semgrep-ci/sample-ci-configs/#github-actions | |
| - name: semgrep | |
| run: semgrep ci |