Skip to content

sync canvas-kit to 2026-07-07.4 (SSRF redirect guard, schema validation, safe storage) - #21

Closed
jongio wants to merge 1 commit into
mainfrom
sync-canvas-kit-2026-07-07-4
Closed

sync canvas-kit to 2026-07-07.4 (SSRF redirect guard, schema validation, safe storage)#21
jongio wants to merge 1 commit into
mainfrom
sync-canvas-kit-2026-07-07-4

Conversation

@jongio

@jongio jongio commented Jul 7, 2026

Copy link
Copy Markdown
Owner

What

Re-vendors the canonical canvas-kit into all six example extensions, advancing the vendored copy from 2026-07-05.1 → 2026-07-07.4:

  • code-tutor, language-tutor, news-aggregator, random-animal, stock-ticker, wiki-discover

Each extension's canvas-kit/ is now a byte-for-byte mirror of the current create-canvas-app kit (verified with the kit freshness check).

Why

The vendored kit was two point releases behind the canonical kit and missed recent hardening from the Copilot host app's canvas kit:

  • net — re-checks the SSRF guard on every redirect hop (no bypass via 30x).
  • server — caps concurrent SSE subscribers per instance.
  • storage — session-scoped paths and safe atomic saves (no cross-instance clobber).
  • validate / runtime — stricter action input validation.

Test compatibility (no extension behavior change)

The stricter input validation surfaced two smoke tests that asserted against the old kit's looser behavior. Both were updated to the current contract; the extensions' runtime behavior is unchanged:

  • code-tutor — an out-of-enum clear_cache level is now rejected by the kit's schema gate (its message names the allowed values) before the handler's own guard runs. The concept is still protected from deletion; only the error-message text moved. Loosened the assertion (/must be one of/) and refreshed the now-stale "kit does no schema validation" comment.
  • wiki-discover — the "rate the current card" test now omits article instead of passing article: undefined. A real client drops undefined keys during JSON serialization, and the kit now type-checks a present-but-undefined optional object.

Verification (local, mirrors CI's validate job)

  • node scripts/lint.mjs → clean (87 .mjs, 15 .json)
  • node scripts/validate-extensions.mjs → 6 extensions valid
  • node scripts/run-tests.mjs → all 6 test files pass
  • check-kit-freshness.mjs → all 6 vendored kits fresh at 2026-07-07.4

Note

This is intentionally not a pure version bump — it also carries the two small test-compatibility edits above — so it is flagged for a quick review rather than auto-merged.

…on, safe storage)

Re-vendor the canonical canvas-kit into all six example extensions,
advancing the vendored copy from 2026-07-05.1 to 2026-07-07.4. This pulls
the latest hardening from the create-canvas-app kit:
- net: re-check the SSRF guard on every redirect hop
- server: cap concurrent SSE subscribers per instance
- storage: session-scoped paths + safe atomic saves
- validate/runtime: stricter action input validation

The stricter input validation surfaced two smoke tests that asserted
against the old kit's looser behavior. Update them to the current contract
with no behavior change in the extensions themselves:
- code-tutor: an out-of-enum clear_cache level is now rejected by the kit's
  schema gate (the message names the allowed values) before the handler's
  own guard runs; loosen the assertion and refresh the now-stale comment.
- wiki-discover: rating the current card omits `article` instead of passing
  `article: undefined` (a real client drops undefined keys over JSON, and
  the kit now type-checks a present-but-undefined optional object).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jongio jongio closed this Jul 27, 2026
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.

1 participant