Skip to content

Commit e29086b

Browse files
committed
fix(ci): restore CodeQL coverage of the data-drain test route
Review round 1. - Drop the '**/test/**' and '**/tests/**' globs. A `test` directory is a routable Next.js path segment, and those globs excluded apps/sim/app/api/organizations/[id]/data-drains/[drainId]/test/route.ts — a POST handler that authorizes, decrypts destination credentials and makes an outbound request. CodeQL paths-ignore has no `!` negation to carve it back out, and the globs only covered 76 of 12,716 files. - Add `ready_for_review` to the pull_request activity types. It is not a default type, so a PR opened as a draft and later marked ready was skipped by the draft guard and never rescanned until the next push.
1 parent 551d182 commit e29086b

2 files changed

Lines changed: 14 additions & 5 deletions

File tree

.github/codeql/codeql-config.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,16 @@ paths-ignore:
1616
- '**/__tests__/**'
1717
- '**/__mocks__/**'
1818
- '**/__fixtures__/**'
19-
- '**/test/**'
20-
- '**/tests/**'
21-
- '**/testing/**'
2219
- '**/e2e/**'
20+
# Deliberately no '**/test/**' or '**/tests/**'. A directory named `test` is a
21+
# routable Next.js path segment, not necessarily test code: those globs
22+
# excluded the real endpoint
23+
# apps/sim/app/api/organizations/[id]/data-drains/[drainId]/test/route.ts,
24+
# which authorizes, decrypts destination credentials, and makes an outbound
25+
# request. CodeQL's paths-ignore has no `!` negation to carve it back out
26+
# ("The filter pattern characters ?, +, [, ], and ! are not supported and will
27+
# be matched literally"), and the globs only covered 76 of 12,716 files, so
28+
# the naming convention above is the safer filter.
2329
- '**/*.d.ts'
2430
- '**/node_modules/**'
2531
- '**/dist/**'

.github/workflows/codeql.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,11 @@ on:
2222
branches: [main]
2323
pull_request:
2424
branches: [main, staging]
25-
# Draft PRs are excluded via the job-level `if`, not here: `types` would
26-
# also have to re-list the default event types to keep synchronize working.
25+
# `ready_for_review` is not a default activity type, so it has to be listed
26+
# alongside the defaults it replaces. Without it, a PR opened as a draft and
27+
# then marked ready is skipped by the job-level draft guard and never
28+
# rescanned until the next push.
29+
types: [opened, synchronize, reopened, ready_for_review]
2730
paths:
2831
- '**/*.ts'
2932
- '**/*.tsx'

0 commit comments

Comments
 (0)