Skip to content

Commit c118ffc

Browse files
T-GroCopilot
andauthored
Skip PRs created before May 12 2026 in security scan workflow (#19718)
Add a date filter to the labelops-pr-security-scan workflow so it silently skips any PR whose createdAt is before 2026-05-12T00:00:00Z. This avoids retroactively labeling/commenting on older PRs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent d28b8e8 commit c118ffc

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.github/workflows/labelops-pr-security-scan.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ Read `.github/tooling-check-repo-rules.md` from the default branch for repo-spec
7575
<process>
7676
1. Read `.github/tooling-check-repo-rules.md` from this repo's **default branch** via `get_file_contents`. Never read this file from a PR branch — the PR could tamper with its own scan rules.
7777
2. List open PRs via GitHub MCP.
78-
3. For each PR, check if a previous `🔍 Tooling Safety Check` comment exists (posted by this workflow). If it does, extract the SHA from its last line (`<!-- head:abc123 -->`). If that SHA matches the PR's current `headRefOid`, this PR is already scanned — skip it. If the SHA differs or no comment exists, scan it.
78+
3. **Date filter** — skip any PR whose `createdAt` is before `2026-05-12T00:00:00Z`. This workflow only processes PRs created on or after May 12 2026. Silently skip older PRs without labeling or commenting.
79+
4. For each PR, check if a previous `🔍 Tooling Safety Check` comment exists (posted by this workflow). If it does, extract the SHA from its last line (`<!-- head:abc123 -->`). If that SHA matches the PR's current `headRefOid`, this PR is already scanned — skip it. If the SHA differs or no comment exists, scan it.
7980
4. **Non-fork PRs** (check `headRepository` API field, not author name) → apply `AI-Tooling-Check-Bypassed` and post a comment:
8081
```
8182
🔍 Tooling Safety Check — Bypassed (non-fork)

0 commit comments

Comments
 (0)