@imazhar101/mcp-bigquery-server 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -92,8 +92,18 @@ export class BigQueryService {
92
92
  if (prevented.length === 0) {
93
93
  return { filteredRows: rows, filteredSchema: schema, strippedFields: [] };
94
94
  }
95
- // Case-insensitive match against full field name or glob-style suffix (*_email, email_*)
96
- const isBlocked = (name) => prevented.some((p) => name.toLowerCase() === p.toLowerCase());
95
+ // Case-insensitive substring match: a prevented token strips any column
96
+ // whose name contains it (e.g. `grm_email` strips `grm_email_one`,
97
+ // `grm_email_primary`). Substring is the only semantics that reliably
98
+ // catches real column sprawl; the BIGQUERY_PREVENTED_FIELDS list is curated
99
+ // to avoid over-broad tokens (e.g. `first_name`/`last_name`, never bare
100
+ // `name`). NOTE: output-column filtering is an accident guard, not an
101
+ // access boundary — it is bypassed by aliasing and does not cover PII used
102
+ // only in WHERE/JOIN/aggregates. Use allowedTables + governed views for that.
103
+ const isBlocked = (name) => {
104
+ const n = name.toLowerCase();
105
+ return prevented.some((p) => n.includes(p.toLowerCase()));
106
+ };
97
107
  const allFieldNames = schema.length > 0
98
108
  ? schema.map((f) => f.name)
99
109
  : rows.length > 0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imazhar101/mcp-bigquery-server",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "BigQuery MCP server — read-only query execution, schema exploration, dataset discovery",
5
5
  "type": "module",
6
6
  "main": "dist/servers/bigquery/src/index.js",