The secrets check stops reading camelCase run ids as phone numbers (#4861) (#4881)

The secrets check no longer reports an 11-digit GitHub Actions run id as
a phone number when code names it `runId`, `RunGithubID` or passes it to
a run call such as `resolveRunDetection(...)`.

Why: Go and TypeScript test fixtures tripped a phone-number finding, and
`gstack-post` asked for confirmation on PR bodies that quoted them.

Nothing to do; every number the check reported before still reports.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Review-Finding: p1/red-team#1 reader=red-team
Review-Finding: p1/red-team#2 reader=red-team
Review-Finding: p2/outside-voice#1 reader=outside-voice
Review-Finding: p2/outside-voice#2 reader=outside-voice
Review-Finding: p2/red-team#1 reader=red-team
Review-Finding: p2/adversarial-native#1 reader=adversarial-native
Review-Finding: p2/adversarial-native#3 reader=adversarial-native
This commit is contained in:
Garry Tanandcapy-ai[bot] authored and GitHub committed 2026-11-28 17:04:07 +00:00
1 parent 4b8c7005dc
commit be9b34e3dc
4 files changed
+112 -1

No files matched your search

+64
View File
@@ -462,6 +462,70 @@ describe("pii.phone.e164: GitHub Actions run and job ids in their id positions",
);
});
// #4861: Go and TypeScript fixtures name the run id with a camelCase identifier, not a plain run word.
describe("pii.phone.e164: an 11-digit run id after a camelCase run identifier (#4861)", () => {
table(
"pii.phone.e164",
"MEDIUM",
[
"\tRunGithubID: 12345678901,",
" runId: 12345678901,",
"\tresolveRunDetection(t, db, d, 12345678901, createdAt)",
'{"runId":38969924945,"pr":3225}',
"const workflowRunID = 40477638211;",
"lastRun := 40477638211",
"RunGitHubId: 40477638211",
"s.getRunStatus(ctx, 40477638211)",
],
[
// A phone-shaped value under a phone-named key, or a Run that is not a whole camelCase word, still reports.
"userPhone: 14155551234",
"phoneNumber: 14155551234",
"myRunnerPhone: 14155551234",
"callRunPhone: 14155551234",
"runPhone: 14155551234",
"RunTel: 14155551234",
"runMobile = 14155551234",
"runContact: 14155551234",
"phoneRun: 14155551234",
"contactRunId: 14155551234",
"cellphoneRunId: 14155551234",
"homephoneRun = 14155551234",
"msisdnRunId: 14155551234",
// A phone word in a quoted, hyphenated or dotted key, a receiver, an outer call or a trailing comment still reports.
"mobile-lastRun: 14155551234",
'{"phone-lastRunId": 14155551234}',
"user.phone.lastRun = 14155551234",
"customer.contact.workflowRunId = 14155551234",
"phone.getRunLogs(14155551234)",
"phoneApi.getRunLogs(ctx, 14155551234)",
"dialPhone(getRunStatus(c, 14155551234))",
"const lastRun = 14155551234; // mom's mobile",
"runner: 14155551234",
"rerunnerId: 14155551234",
"brunId: 14155551234",
// A call that only mentions a run, or passes a phone-named argument, still reports.
"callRun(14155551234)",
"sendRunNotification(user, 14155551234)",
"resolveRunDetection(t, phone, 14155551234)",
"resolveRunDetection(t, db, \"x\", 14155551234)",
// A call name the 80-character window cuts off could hide a phone word in the cut part.
"phoneRunStatus(alphaBetaGammaDeltaArg1, alphaBetaGammaDeltaArg2, alphaBetaGamma3, 14155551234)",
// Separated from the identifier, not 11 digits, or written with a + or separators.
"runId: 1, phone: 14155551234",
"runId 14155551234",
"runId: 4155550123",
"runId: +14155551234",
"runId: 1-415-555-1234",
// A plain run key in quoted JSON stays with the run-word rule, and the id must be the whole value.
'{"run": 14155551234}',
"runId: '14155551234-20261109173601'",
'"sourceRun": "14155551234 slice 4"',
"lastRun = 14155551234/2",
],
);
});
describe("pii.phone.e164: run ids in a runs= list or an actions/runs/ path (GST-1227)", () => {
table(
"pii.phone.e164",