Static pull request scan
pr-scan.yml is a reusable workflow for pull_request. It uses no inference document, model credential, or package installation from the PR. With its default review_drafts: false, it skips drafts. Copy the caller to enable it.
What runs
Section titled “What runs”| Scanner | Scope |
|---|---|
| Semgrep CE | Open-source rules for TypeScript, JavaScript, Python, secrets, and GitHub Actions. Reviewdog filters to added lines for posting. |
| Gitleaks | PR commit range with secret values redacted. Findings are not restricted to added lines in the final diff: a credential can appear in an earlier commit and be removed later. |
| zizmor | Offline analysis of GitHub workflow files. Reviewdog filters to added lines for posting. |
| OSV-Scanner | Dependency files from base and head are scanned without executing project code. Only newly introduced advisories appear in the PR summary. |
The checkout uses persist-credentials: false. Line scanners mount it read-only inside their containers, with a separate result directory and no posting token. Scanner reports keep rule descriptions and locations without source snippets. The scan can run on a Linux runner with Docker, Python 3, and standard command-line utilities.
Posting and skips
Section titled “Posting and skips”The workflow mints the App token after scanning for eligible same-repository PRs. Forks, Dependabot, and runs without App credentials report to the Actions log instead. The workflow reports scan findings. It does not fail a job solely because a finding exists. See workflow inputs for the runner and draft settings.