Fix: Percy CLI hangs on Node.js 26 during Chromium extraction (PER-10062) #4612
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 of this GitHub Actions workflow. | |
| name: Semgrep | |
| on: | |
| # Scan changed files in PRs (diff-aware scanning): | |
| # The branches below must be a subset of the branches above | |
| pull_request: | |
| branches: ["master", "main"] | |
| push: | |
| branches: ["master", "main"] | |
| schedule: | |
| - cron: '0 6 * * *' | |
| permissions: | |
| contents: read | |
| jobs: | |
| semgrep: | |
| # User definable name of this GitHub Actions job. | |
| permissions: | |
| contents: read # for actions/checkout to fetch code | |
| security-events: write # for github/codeql-action/upload-sarif to upload SARIF results | |
| name: semgrep/ci | |
| # If you are self-hosting, change the following `runs-on` value: | |
| runs-on: ubuntu-latest | |
| container: | |
| # A Docker image with Semgrep installed. | |
| # Pinned to >=1.164.0: the old `returntocorp/semgrep:latest` (semgrep 1.162.0) | |
| # has a bug where `semgrep ci --sarif` counts nosemgrep-suppressed findings as | |
| # blocking and exits non-zero (fixed in 1.164.0), so inline `// nosemgrep` | |
| # suppressions were ignored. See https://semgrep.dev/docs CHANGELOG v1.164.0. | |
| image: semgrep/semgrep@sha256:207983631beecdbe7fa29196c7f4a7a5f29033933cdb76c687ce4a672e07618d # 1.164.0 | |
| # Skip any PR created by dependabot to avoid permission issues, and skip the | |
| # automated release PR (opened by github-actions[bot], same repo, release/* | |
| # branch — the Create Release PR workflow posts the required checks for it). | |
| # The release gate is keyed on the PR author, not the branch name (which any | |
| # contributor controls), so a "release/…" branch can't bypass required checks. | |
| if: >- | |
| ${{ github.actor != 'dependabot[bot]' | |
| && !(github.event.pull_request.user.login == 'github-actions[bot]' | |
| && github.event.pull_request.head.repo.full_name == github.repository | |
| && startsWith(github.head_ref, 'release/')) }} | |
| steps: | |
| # Fetch project source with GitHub Actions Checkout. | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| # Run the "semgrep ci" command on the command line of the docker image. | |
| - run: semgrep ci --sarif --output=semgrep.sarif | |
| env: | |
| # Add the rules that Semgrep uses by setting the SEMGREP_RULES environment variable. | |
| SEMGREP_RULES: p/default # more at semgrep.dev/explore | |
| - name: Upload SARIF file for GitHub Advanced Security Dashboard | |
| uses: github/codeql-action/upload-sarif@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.11 | |
| with: | |
| sarif_file: semgrep.sarif | |
| if: always() |