Skip to content

chore: upgrade to cube v1.6.77 and fix High npm advisories - #4

Merged
jtroup merged 11 commits into
stacklet/integrationfrom
elmo/loudly-grown-zebra
Nov 12, 2026
Merged

jtroup merged 11 commits into
stacklet/integrationfrom
elmo/loudly-grown-zebra

Conversation

@jtroup

@jtroup jtroup commented Nov 12, 2026 •

Copy link
Copy Markdown

ENG-9783

what

Merge the upstream v1.6.77 release tag (v1.6 LTS) into
stacklet/integration. The image now installs the 1.6.77
@cubejs-backend/* packages. The merge commit message records the
conflict resolution:

  • Upstream adds a moment-timezone resolution. We keep it next to our
    scoped tar, basic-ftp, tmp and toml resolutions. Upstream
    still locks the same parents, which still ask for the vulnerable
    ranges, so all seven Stacklet resolutions stay.
  • cubejs-docker/package.json takes upstream's 1.6.77 pins, still
    without databricks-jdbc-driver and hive-driver.

A second commit refreshes body-parser, follow-redirects, joi and
zod in yarn.lock within their declared ranges. Every new version is
at least 7 days old. follow-redirects stays at 1.16.2 because 1.16.3
is newer than that. packages/cubejs-docker/yarn.lock matches the root
lockfile again.

why

v1.6.77 is the current release on the LTS line we track. A grype scan
of the image found four new High npm advisories, each with a fix inside
the locked ranges. After the refresh, the only High or Critical npm
finding is decompress, which has no fixed release. The remaining
Debian findings have no bookworm update.

testing

Relying on the image workflow's build, logger-patch check and smoke
test, then downstream tests against the PR image.

  • Downstream tests pass against the v1.6.77-stacklet-pr<N> image

docs

No docs needed.


🤖 Generated with Claude Code

cavi21 and others added 11 commits October 29, 2026 16:06
…ork, thanks @cavi21 (backport cube-js#12461 to v1.6)

neon 1.1.1 frees N-API async work inside `debug_assert_eq!`, so release
builds never call `napi_delete_async_work`. neon 1.1.2 fixes it upstream
(neon-bindings/neon#1145).

On v1.6 the shipped addon (packages/cubejs-backend-native/Cargo.lock) is
still on neon 1.0.0, which is not affected: the bump to 1.1.1 came with
cube-js#12170 (first released in v1.8.3). This backport only moves the rust/cube
workspace lockfile off 1.1.1 and switches `get_cubestore_result` to
`compute_scoped`, which neon 1.0.0 also provides.

(cherry picked from commit 62dbc3f)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ube-js#11963)

* ci(snowflake): switch driver and integration tests to key-pair auth

Snowflake now enforces MFA on the test user, so every password-based
Snowflake job fails with 'Multi-factor authentication is required'. The
encrypted key pair the snowflake-encrypted-pk leg already uses still
authenticates, so make it the default for the drivers suites and the
push.yml integration/smoke tests.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* ci(snowflake): drop the now-redundant encrypted-pk leg; relax smoke env

The base Snowflake env is key-pair now, so snowflake-encrypted-pk re-ran
the same suite for no extra coverage. The smoke harness now requires only
the private key; the authenticator is a constant set by the test, and the
passphrase is only needed for encrypted keys.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…-js#12466 to v1.6) (cube-js#12471)

## Summary

Backport of cube-js#12466 to `lts/v1.6`. tzdb 2026b–2026e cancel the November
1, 2026 fall-back for British Columbia, Alberta, Inuvik (NWT) and
Manitoba; with the bundled 2025b data every conversion in
`America/Vancouver`, `America/Edmonton`, `America/Inuvik` and
`America/Winnipeg` after 2026-11-01 is an hour off.

Fixes cube-js#12431 for 1.6.

## Changes

Same as cube-js#12466:
- `moment-timezone` → `^0.6.5` in schema-compiler, api-gateway and
backend-shared, plus a `resolutions` entry in the root and
`cubejs-docker` `package.json` so `snowflake-sdk` no longer loads a
0.5.x copy that replaces `moment.tz` on the shared moment instance.
- `[patch.crates-io]` with the
[cube-js/chrono-tz](https://github.com/cube-js/chrono-tz) fork pinned by
rev in every Rust workspace: 0.10.4 for Tesseract, Cube Store (its
direct `0.8.2` is bumped to `0.10.4`) and pg-srv, 0.6.3 for the arrow 13
fork under CubeSQL. Drops CubeSQL's unused direct `chrono-tz`
dependency.
- Regression tests for date range bounds, Tesseract `QueryDateTime` and
Cube Store `CONVERT_TZ_KSQL`.

Differences from master: the schema-compiler test uses the 1.6 test
helpers (`compilers.compiler.compile()`, `new PostgresQuery(...)`);
lockfiles are regenerated from `lts/v1.6`.

## Testing

- `yarn tsc` is clean; `base-query.test` (121), backend-shared
`time`/`timezone`, api-gateway date tests pass.
- After loading `snowflake-sdk`, `moment.tz.dataVersion` stays `2026e`.
- cubesqlplanner `--lib` (1075), pg-srv (35), CubeSQL timestamp/timezone
tests, Cube Store streaming tests (18) pass; `cubejs-backend-native`
builds.
- The `node:22.23.4-bookworm-slim` base image already ships ICU tzdb
2026e.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…on (cube-js#12207)

**Check List**
- [x] Tests have been run in packages where changes have been made if
available
- [x] Linter has been run for changed code
- [x] Tests for the changes have been added if not covered yet
- [ ] Docs have been added / updated if required

**Description of Changes Made**

Member expressions arriving over the SQL API carry a SQL fragment
(`expr.sql`) that the gateway compiles into
`Function.constructor(...cubeParams, \`return \`${sql}\`\`)` and
evaluates (`evalMemberExpression` in `gateway.ts`). Nothing validated
that compiled expression, so a fragment (or a crafted `cubeParams`
entry) could execute arbitrary JavaScript in the API process.

This adds a single guard at the eval sink:

- New `src/member-expression-security.ts` exporting
`assertSafeCompiledMemberExpression(expression)`. For the compiled
`[...cubeParams, body]` array it:
- requires each `cubeParams` entry to be a plain identifier (they are
spliced as raw `Function` parameter source, so a non-identifier entry
like `[a = <expr>] = []` would execute);
- requires `body` to be the canonical `` return `<sql>` `` wrapper, then
validates `<sql>`: no template-literal breakout (unescaped backtick /
trailing odd backslash), and every `${…}` interpolation a dotted path
rooted at one of `cubeParams`, segments being identifiers and never
`constructor`/`__proto__`/`prototype`. The `${…}` scan is a linear
`indexOf` walk (no polynomial-regex ReDoS).
- `gateway.ts` calls the guard in `evalMemberExpression` for both sinks
— the `SqlFunction` array and each `PatchMeasure` `addFilters` entry —
before `Function.constructor`.

Guarding at the eval sink (rather than at parse time) covers string-form
members, object-form members (the `parsedMemberExpression` query-schema
alternative, which skips `parseMemberExpression`), and the extra
parse+eval pass after RLS / `queryRewrite`. It runs in the gateway
before either planner, so it protects both Tesseract and the legacy
planner. It does not depend on CubeSQL's `escape_interpolation_quotes`,
and accepts everything CubeSQL legitimately emits (`${Cube.member}`,
`$N$` param placeholders, escaped SQL).

**Tests**

- `test/member-expression-security.test.ts` — unit cases for the guard:
exploit shapes (arbitrary JS, non-identifier `cubeParams`, backtick
breakout, `${process…}`, prototype pivots, unterminated `${`) and the
shapes the planner really emits.
- `test/index.test.ts` — gateway-level cases through `apiGateway.sql({
memberExpressions: true })` that hit both sink call sites (`SqlFunction`
and `PatchMeasure.addFilters`) and the object-form path, asserting
rejection, alongside the existing accept case.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_017j4dBMJMVpABP9CvD6jzrE

---------

Co-authored-by: Claude <noreply@anthropic.com>
Identifiers were wrapped in the dialect's quote without escaping that quote
inside the name, so a quote character in a member alias ended the identifier
early and let the rest of the alias run as SQL.

- `escapeColumnName` now uses new `@cubejs-backend/shared` helpers:
  `escapeIdentifierAnsi` (Base, Vertica, Dremio), `escapeIdentifierMySql`
  (MySQL, Cube Store), `escapeIdentifierSparkSql` (Hive, Databricks, ksqlDB)
  and `escapeIdentifierBackslash` (BigQuery, ClickHouse).
- The MySQL `quotes/escape` template doubles the backtick instead of `\``,
  which MySQL reads literally inside an identifier.
- `quote_identifier` in Tesseract and cubesql doubles backslashes before a
  backslash-escaped quote (BigQuery, ClickHouse), so `\` in a name can no
  longer escape the quote after it.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jtroup
jtroup requested a review from a team as a code owner November 12, 2026 04:38

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

14 issues found across 171 files

Confidence score: 2/5

  • claude-code-review.yml gives Docker access to a secrets-bearing review based on the PR author's association, not whether the PR head is trusted. Gate this on a trusted PR head so an untrusted fork cannot reach the privileged runner.
  • claude-code-review.yml allows Grep to search arbitrary runner paths, so prompt-injected PR content may expose files outside the checkout. Restrict search to the workspace or deny the broad search tools.
  • claude-code-review.yml hard-codes cube-js/cube, so /bot-review operates on the upstream repository instead of stacklet/cube. Use the current repository when listing, deduplicating, and resolving threads.
  • claude-code-review.yml omits issues: read from both caller jobs, so the reusable workflow cannot query issues for /bot-review. Add the permission to both callers or remove the issue-query tools.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="rust/cubestore/cubestore-sql-tests/src/files.rs">

<violation number="1" location="rust/cubestore/cubestore-sql-tests/src/files.rs:78">
P3: Dropping `TestFileServer` aborts only the accept loop; active connection tasks can still finish delayed requests after the server is dropped. Track those handles or cancel them from `Drop` so the documented server lifetime also bounds in-flight requests.</violation>
</file>

<file name="docs-mintlify/scripts/extract-core-data.js">

<violation number="1" location="docs-mintlify/scripts/extract-core-data.js:279">
P2: The extractor cannot reproduce the committed `RequestId` and `Traceparent` additions because the source spec has no parameter references or definitions. Add these parameters and their path references to the source/extraction inputs, otherwise the next regeneration will silently delete the request-tracing documentation.</violation>
</file>

<file name="docs-mintlify/api-reference/core-data.yaml">

<violation number="1" location="docs-mintlify/api-reference/core-data.yaml:201">
P2: The new header contract claims invalid IDs return 400, but the gateway passes `x-request-id` and `traceparent` through without validation. Remove the rejection claim and constraints or add matching gateway validation.</violation>

<violation number="2" location="docs-mintlify/api-reference/core-data.yaml:207">
P3: The `traceparent` schema is not W3C-compatible: its pattern accepts arbitrary request-ID strings such as `foo`. Use the W3C traceparent grammar, or describe this as a generic tracing value instead of a W3C header.</violation>
</file>

<file name="packages/cubejs-api-gateway/src/member-expression-security.ts">

<violation number="1" location="packages/cubejs-api-gateway/src/member-expression-security.ts:50">
P2: This scanner treats escaped `\${...}` text as executable interpolation. Since a backslash before `$` makes the sequence literal in the generated template, skip `${` occurrences preceded by an odd run of backslashes so valid SQL containing literal `${...}` is not rejected.</violation>
</file>

<file name="packages/cubejs-api-gateway/src/gateway.ts">

<violation number="1" location="packages/cubejs-api-gateway/src/gateway.ts:1380">
P2: Malformed filters can now trigger a 500 before Joi validation instead of the expected 400. Validate the query before traversing member paths, or make `memberPaths` tolerate every malformed shape and let the schema report it.</violation>

<violation number="2" location="packages/cubejs-api-gateway/src/gateway.ts:1612">
P3: Remove this unused `memberTarget` helper or wire it into normalization; as written, it is dead code and makes member-alias handling appear implemented when it is not.</violation>
</file>

<file name=".github/workflows/claude-code-review.yml">

<violation number="1" location=".github/workflows/claude-code-review.yml:35">
P2: `issues: read` does not reach `/bot-review` because the caller jobs omit it and reusable workflows cannot elevate `GITHUB_TOKEN` permissions. Add `issues: read` to both caller jobs or remove the new issue-query tools from this workflow.</violation>

<violation number="2" location=".github/workflows/claude-code-review.yml:44">
P1: Custom agent: **Flag Security Vulnerabilities**

This grants Docker to a secrets-bearing review based on the PR author's association, not whether the PR head is trusted. A collaborator-authored fork is checked out as PR code, so prompt injection can use Docker's host access to expose runner credentials through the allowed comment tools; gate this on the PR head repository being the base repository or remove Docker access for fork reviews.</violation>

<violation number="3" location=".github/workflows/claude-code-review.yml:84">
P2: Reusable `/bot-review` runs load trusted review configuration from the default branch whenever the PR targets a different base branch. Fetch or pass the actual PR base SHA before this checkout so branch-specific review instructions and aliases match the PR being reviewed.</violation>

<violation number="4" location=".github/workflows/claude-code-review.yml:139">
P1: The inlined trusted instructions hard-code `cube-js/cube`, but this workflow runs in `stacklet/cube`, so `/bot-review` lists, deduplicates, and resolves threads for the upstream repository instead of the PR being reviewed. Keep the repository dynamic when assembling the trusted prompt and thread commands.</violation>

<violation number="5" location=".github/workflows/claude-code-review.yml:145">
P1: The bare `Grep` allow rule lets a prompt-injected PR search arbitrary runner paths, not just the checkout. Restrict search tools to the workspace with the Claude sandbox/path policy, or deny `Grep` and `Glob` and use `Read` only; the two `Read` denies do not establish a workspace boundary.</violation>
</file>

<file name="rust/cubesql/Cargo.toml">

<violation number="1" location="rust/cubesql/Cargo.toml:13">
P2: Custom agent: **Check new dependencies**

These patches redirect the existing crates.io dependencies to pinned commits from a fork, but the manifest and lockfile do not establish the fork commits’ source provenance or license. Verify the exact revisions’ upstream provenance and license, or use the official chrono-tz source.</violation>
</file>

<file name="rust/cube/Cargo.toml">

<violation number="1" location="rust/cube/Cargo.toml:14">
P2: Custom agent: **Check new dependencies**

This patch sources `chrono-tz` from the `cube-js` fork rather than its listed upstream, `chronotope/chrono-tz`, and does not establish the fork’s license. Verify the pinned fork’s provenance and license, or use the official upstream source.</violation>
</file>
Architecture diagram
sequenceDiagram
    participant Client as API Client
    participant API as API Gateway
    participant Auth as Auth Validator
    participant Schema as Schema Compiler
    participant Eval as Member Expr Evaluator
    participant Guard as Expression Security Guard
    participant SQL as SQL Escaper
    participant DB as Database Driver

    Note over Client,DB: Runtime Request Flow - Query Processing

    Client->>API: HTTP POST /load (with/without member expressions)
    API->>Auth: Validate JWT token
    Auth-->>API: Token valid

    alt REST API (memberExpressions=false)
        API->>API: normalizeQuery() - strict schema validation
        Note over API: Rejects member expressions, subqueryJoins
        API->>Schema: applyRowLevelSecurity(query)
        Schema-->>API: Query with RLS filters
        API->>API: queryRewrite() + validate return type
        API->>Schema: applyRowLevelSecurity(rewritten)
        Schema-->>API: Final normalized query
    else SQL API (memberExpressions=true)
        API->>API: normalizeQuery() - permissive schema (allows expressions)
        API->>Eval: parseMemberExpressionsInQuery()
        Eval->>Eval: Build compiled function arrays
        Eval->>Guard: assertSafeCompiledMemberExpression()
        Guard->>Guard: Validate cubeParams identifiers
        
        alt Unsafe expression detected
            Guard-->>API: Throw UserError
            API-->>Client: 400 "Unsafe member expression"
        else Safe expression
            Eval-->>API: Compiled expression functions
            API->>Schema: applyRowLevelSecurity() + queryRewrite()
            Schema-->>API: Filtered query
        end
    end

    API->>DB: Execute query with escaped identifiers
    Note over SQL,DB: NEW: Identifier escaping per-dialect
    DB->>SQL: escapeColumnName()
    SQL-->>DB: Properly quoted identifier
    
    alt Unsafe identifier characters (quotes/backslashes)
        DB->>SQL: escapeIdentifierAnsi/MySql/SparkSql
        SQL-->>DB: Doubled or backslash-escaped
    end
    
    DB-->>API: Result set
    API-->>Client: Response with data

    Note over API,Guard: Error paths
    alt Invalid query format
        API-->>Client: 400 Invalid query format
    end

    Note over Client,DB: Security boundaries
    Note over Guard: Guards Function.constructor eval<br/>Rejects backtick breakout<br/>Rejects non-identifier cubeParams<br/>Rejects prototype chain access
Loading

This PR changes authentication, authorization, or input validation. Ultrareviews find 2.4x more serious bugs than standard reviews. Comment @cubic-dev-ai ultrareview to run one.

Re-trigger cubic


Leave a blank line after `<summary>` and before `</details>`, otherwise GitHub
won't render the markdown inside (tables and lists especially).
${{ env.REVIEW_PROMPT }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: The inlined trusted instructions hard-code cube-js/cube, but this workflow runs in stacklet/cube, so /bot-review lists, deduplicates, and resolves threads for the upstream repository instead of the PR being reviewed. Keep the repository dynamic when assembling the trusted prompt and thread commands.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At .github/workflows/claude-code-review.yml, line 139:

<comment>The inlined trusted instructions hard-code `cube-js/cube`, but this workflow runs in `stacklet/cube`, so `/bot-review` lists, deduplicates, and resolves threads for the upstream repository instead of the PR being reviewed. Keep the repository dynamic when assembling the trusted prompt and thread commands.</comment>

<file context>
@@ -61,142 +75,150 @@ jobs:
-
-            Leave a blank line after `<summary>` and before `</details>`, otherwise GitHub
-            won't render the markdown inside (tables and lists especially).
+            ${{ env.REVIEW_PROMPT }}
 
-            **Resolving your own stale review threads:**
</file context>

Comment on lines +145 to +146
--allowedTools "mcp__github_inline_comment__create_inline_comment,mcp__github__get_issue_comments,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh issue view:*),Bash(gh issue list:*),Bash(gh search issues:*),Bash(gh list-review-threads:*),Bash(gh show-review-thread:*),Bash(gh reply-to-thread:*),Bash(gh resolve-thread:*),Task,Read(./**),Grep,Glob(./**)${{ env.ADDITIONAL_ALLOWED_TOOLS }}"
--disallowedTools "Read(~/.*),Read(/${{ runner.temp }}/**)"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: The bare Grep allow rule lets a prompt-injected PR search arbitrary runner paths, not just the checkout. Restrict search tools to the workspace with the Claude sandbox/path policy, or deny Grep and Glob and use Read only; the two Read denies do not establish a workspace boundary.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At .github/workflows/claude-code-review.yml, line 145:

<comment>The bare `Grep` allow rule lets a prompt-injected PR search arbitrary runner paths, not just the checkout. Restrict search tools to the workspace with the Claude sandbox/path policy, or deny `Grep` and `Glob` and use `Read` only; the two `Read` denies do not establish a workspace boundary.</comment>

<file context>
@@ -61,142 +75,150 @@ jobs:
           claude_args: |
-            --allowedTools "mcp__github_inline_comment__create_inline_comment,mcp__github__get_issue_comments,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh list-review-threads:*),Bash(gh resolve-thread:*)"
-            --model "claude-opus-5"
+            --allowedTools "mcp__github_inline_comment__create_inline_comment,mcp__github__get_issue_comments,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh issue view:*),Bash(gh issue list:*),Bash(gh search issues:*),Bash(gh list-review-threads:*),Bash(gh show-review-thread:*),Bash(gh reply-to-thread:*),Bash(gh resolve-thread:*),Task,Read(./**),Grep,Glob(./**)${{ env.ADDITIONAL_ALLOWED_TOOLS }}"
+            --disallowedTools "Read(~/.*),Read(/${{ runner.temp }}/**)"
+            --settings '{"outputStyle":"Cube"}'
</file context>
Suggested change
--allowedTools "mcp__github_inline_comment__create_inline_comment,mcp__github__get_issue_comments,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh issue view:*),Bash(gh issue list:*),Bash(gh search issues:*),Bash(gh list-review-threads:*),Bash(gh show-review-thread:*),Bash(gh reply-to-thread:*),Bash(gh resolve-thread:*),Task,Read(./**),Grep,Glob(./**)${{ env.ADDITIONAL_ALLOWED_TOOLS }}"
--disallowedTools "Read(~/.*),Read(/${{ runner.temp }}/**)"
--allowedTools "mcp__github_inline_comment__create_inline_comment,mcp__github__get_issue_comments,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh issue view:*),Bash(gh issue list:*),Bash(gh search issues:*),Bash(gh list-review-threads:*),Bash(gh show-review-thread:*),Bash(gh reply-to-thread:*),Bash(gh resolve-thread:*),Task,Read(./**)${{ env.ADDITIONAL_ALLOWED_TOOLS }}"
--disallowedTools "Grep,Glob,Read(~/.*),Read(/${{ runner.temp }}/**)"

# Running the PR's code is the same trust boundary the rest of CI already
# crosses for a branch PR, but not one to hand a fork. On `workflow_call`
# the payload is the caller's issue_comment, whose issue is the PR.
ADDITIONAL_ALLOWED_TOOLS: ${{ contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.pull_request.author_association || github.event.issue.author_association) && ',Bash(docker:*),Bash(psql:*)' || '' }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Custom agent: Flag Security Vulnerabilities

This grants Docker to a secrets-bearing review based on the PR author's association, not whether the PR head is trusted. A collaborator-authored fork is checked out as PR code, so prompt injection can use Docker's host access to expose runner credentials through the allowed comment tools; gate this on the PR head repository being the base repository or remove Docker access for fork reviews.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At .github/workflows/claude-code-review.yml, line 44:

<comment>This grants Docker to a secrets-bearing review based on the PR author's association, not whether the PR head is trusted. A collaborator-authored fork is checked out as PR code, so prompt injection can use Docker's host access to expose runner credentials through the allowed comment tools; gate this on the PR head repository being the base repository or remove Docker access for fork reviews.</comment>

<file context>
@@ -28,15 +28,29 @@ jobs:
+      # Running the PR's code is the same trust boundary the rest of CI already
+      # crosses for a branch PR, but not one to hand a fork. On `workflow_call`
+      # the payload is the caller's issue_comment, whose issue is the PR.
+      ADDITIONAL_ALLOWED_TOOLS: ${{ contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.pull_request.author_association || github.event.issue.author_association) && ',Bash(docker:*),Bash(psql:*)' || '' }}
     steps:
+      # Cube is public OSS, so runner time is free for us, but Anthropic models
</file context>

'e.g. `Authorization: <CUBE_API_TOKEN>` (no "Bearer" prefix).',
},
},
...(Object.keys(parameters).length ? { parameters } : {}),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The extractor cannot reproduce the committed RequestId and Traceparent additions because the source spec has no parameter references or definitions. Add these parameters and their path references to the source/extraction inputs, otherwise the next regeneration will silently delete the request-tracing documentation.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At docs-mintlify/scripts/extract-core-data.js, line 279:

<comment>The extractor cannot reproduce the committed `RequestId` and `Traceparent` additions because the source spec has no parameter references or definitions. Add these parameters and their path references to the source/extraction inputs, otherwise the next regeneration will silently delete the request-tracing documentation.</comment>

<file context>
@@ -250,6 +276,7 @@ const out = {
           'e.g. `Authorization: <CUBE_API_TOKEN>` (no "Bearer" prefix).',
       },
     },
+    ...(Object.keys(parameters).length ? { parameters } : {}),
     schemas: sortedSchemas,
   },
</file context>

let searchFrom = 0;

for (;;) {
const open = sql.indexOf('${', searchFrom);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: This scanner treats escaped \${...} text as executable interpolation. Since a backslash before $ makes the sequence literal in the generated template, skip ${ occurrences preceded by an odd run of backslashes so valid SQL containing literal ${...} is not rejected.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At packages/cubejs-api-gateway/src/member-expression-security.ts, line 50:

<comment>This scanner treats escaped `\${...}` text as executable interpolation. Since a backslash before `$` makes the sequence literal in the generated template, skip `${` occurrences preceded by an odd run of backslashes so valid SQL containing literal `${...}` is not rejected.</comment>

<file context>
@@ -0,0 +1,101 @@
+  let searchFrom = 0;
+
+  for (;;) {
+    const open = sql.indexOf('${', searchFrom);
+
+    if (open === -1) {
</file context>

Comment thread rust/cubesql/Cargo.toml
debug = true

[patch.crates-io]
chrono-tz = { git = "https://github.com/cube-js/chrono-tz", rev = "eec5a8cadb1b40e139195581be5f0b16afa61145" }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Custom agent: Check new dependencies

These patches redirect the existing crates.io dependencies to pinned commits from a fork, but the manifest and lockfile do not establish the fork commits’ source provenance or license. Verify the exact revisions’ upstream provenance and license, or use the official chrono-tz source.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At rust/cubesql/Cargo.toml, line 13:

<comment>These patches redirect the existing crates.io dependencies to pinned commits from a fork, but the manifest and lockfile do not establish the fork commits’ source provenance or license. Verify the exact revisions’ upstream provenance and license, or use the official chrono-tz source.</comment>

<file context>
@@ -8,3 +8,7 @@ members = [
 debug = true
+
+[patch.crates-io]
+chrono-tz = { git = "https://github.com/cube-js/chrono-tz", rev = "eec5a8cadb1b40e139195581be5f0b16afa61145" }
+chrono-tz-06 = { package = "chrono-tz", git = "https://github.com/cube-js/chrono-tz", rev = "ee0827f1de1501cdd851d9efdcd128b3ccdd2753" }
</file context>

Comment thread rust/cube/Cargo.toml
]

[patch.crates-io]
chrono-tz = { git = "https://github.com/cube-js/chrono-tz", rev = "eec5a8cadb1b40e139195581be5f0b16afa61145" }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Custom agent: Check new dependencies

This patch sources chrono-tz from the cube-js fork rather than its listed upstream, chronotope/chrono-tz, and does not establish the fork’s license. Verify the pinned fork’s provenance and license, or use the official upstream source.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At rust/cube/Cargo.toml, line 14:

<comment>This patch sources `chrono-tz` from the `cube-js` fork rather than its listed upstream, `chronotope/chrono-tz`, and does not establish the fork’s license. Verify the pinned fork’s provenance and license, or use the official upstream source.</comment>

<file context>
@@ -9,3 +9,6 @@ members = [
 ]
+
+[patch.crates-io]
+chrono-tz = { git = "https://github.com/cube-js/chrono-tz", rev = "eec5a8cadb1b40e139195581be5f0b16afa61145" }
</file context>


impl Drop for TestFileServer {
fn drop(&mut self) {
self.task.abort();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: Dropping TestFileServer aborts only the accept loop; active connection tasks can still finish delayed requests after the server is dropped. Track those handles or cancel them from Drop so the documented server lifetime also bounds in-flight requests.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At rust/cubestore/cubestore-sql-tests/src/files.rs, line 78:

<comment>Dropping `TestFileServer` aborts only the accept loop; active connection tasks can still finish delayed requests after the server is dropped. Track those handles or cancel them from `Drop` so the documented server lifetime also bounds in-flight requests.</comment>

<file context>
@@ -55,3 +60,75 @@ pub fn recursive_copy_directory(from: &Path, to: &Path) -> Result<(), CubeError>
+
+impl Drop for TestFileServer {
+    fn drop(&mut self) {
+        self.task.abort();
+    }
+}
</file context>

type: string
minLength: 1
maxLength: 128
pattern: ^[A-Za-z0-9+/=._:@~-]+$

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: The traceparent schema is not W3C-compatible: its pattern accepts arbitrary request-ID strings such as foo. Use the W3C traceparent grammar, or describe this as a generic tracing value instead of a W3C header.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At docs-mintlify/api-reference/core-data.yaml, line 207:

<comment>The `traceparent` schema is not W3C-compatible: its pattern accepts arbitrary request-ID strings such as `foo`. Use the W3C traceparent grammar, or describe this as a generic tracing value instead of a W3C header.</comment>

<file context>
@@ -186,6 +192,31 @@ components:
+        type: string
+        minLength: 1
+        maxLength: 128
+        pattern: ^[A-Za-z0-9+/=._:@~-]+$
+    Traceparent:
+      in: header
</file context>
Suggested change
pattern: ^[A-Za-z0-9+/=._:@~-]+$
pattern: ^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$

});
}

protected memberTarget(resolve?: (path: string) => any) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: Remove this unused memberTarget helper or wire it into normalization; as written, it is dead code and makes member-alias handling appear implemented when it is not.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At packages/cubejs-api-gateway/src/gateway.ts, line 1612:

<comment>Remove this unused `memberTarget` helper or wire it into normalization; as written, it is dead code and makes member-alias handling appear implemented when it is not.</comment>

<file context>
@@ -1530,6 +1542,80 @@ class ApiGateway {
+    });
+  }
+
+  protected memberTarget(resolve?: (path: string) => any) {
+    return resolve && ((path: string) => {
+      const resolved = resolve(path);
</file context>

@wgrant wgrant left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can I say no!

@jtroup
jtroup merged commit b73fffb into stacklet/integration Nov 12, 2026
7 checks passed
@jtroup
jtroup deleted the elmo/loudly-grown-zebra branch November 12, 2026 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants