• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / mcp / 45575886203
98%

Build:
DEFAULT BRANCH: main
Ran 25 Nov 2026 08:26AM UTC
Jobs 1
Files 49
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

25 Nov 2026 08:23AM UTC coverage: 98.16%. Remained the same
45575886203

push

github

web-flow
fix(mcp): confirm UPDATEs without WHERE when a column name ends in where (#557)

## What kind of change does this PR introduce?

Bug fix

## What is the current behavior?

Fixes #556

`execute_sql` does not ask for confirmation for an `UPDATE` without
`WHERE` when the statement contains a word that ends in "where" followed
by whitespace, such as `elsewhere` or `nowhere`. It asks for `where(id =
1)`, which has a `WHERE`.

## What is the new behavior?

The `UPDATE` check looks for `where` as a whole word.

| query                                        | before    | after     |
| -------------------------------------------- | --------- | --------- |
| `update films set elsewhere = 1`             | not asked | asked     |
| `update films set nowhere = 1`               | not asked | asked     |
| `update films set title = 'x' where(id = 1)` | asked     | not asked |
| `update films set title = 'x' where id = 1`  | not asked | not asked |
| `update films set title = 'x'`               | asked     | asked     |

## How to Review

1. **The check**
   - `packages/mcp-server-supabase/src/tools/destructive-sql.ts`
- One regex in `isUpdateWithoutWhereFromScan`: `/where\s/i` becomes a
`where` match that is not preceded or followed by an identifier
character (a word character, `$` or a non-ASCII character).

2. **Tests**
   - `packages/mcp-server-supabase/src/tools/destructive-sql.test.ts`
- Statements with `elsewhere`, `nowhere`, `where$x` or `éwhere` and no
`WHERE` must match. A `WHERE` after such an identifier, before a
parenthesis, and after a newline must not.

## Verification

- With the change removed, 5 of the new cases fail on main.
- `vitest run src/tools/destructive-sql.test.ts`: 151 passed. `vitest
run src/tools`: 228 passed. `tsc --noEmit` and `pnpm format:check`:
clean.
- `execute_sql` through the test harness with a mocked database, before
the change: the `elsewhere` and `nowhere` queries ran without a
confirmation.

## Additional context

A `WHERE`... (continued)

1345 of 1393 branches covered (96.55%)

Branch coverage included in aggregate %.

1 of 1 new or added line in 1 file covered. (100.0%)

6285 of 6380 relevant lines covered (98.51%)

298.51 hits per line

Jobs
ID Job ID Ran Files Coverage
1 45575886203.1 25 Nov 2026 08:26AM UTC 49
98.16
GitHub Action Run
Source Files on build 45575886203
  • Tree
  • List 49
  • Changed 2
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #45575886203
  • 57fa34bb on github
  • Prev Build on main (#45371955792)
  • Next Build on main (#45580610422)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc