Skip to content

fix(cli): keep a service's Dockerfile inside its folder, and bound the SSE frame buffer - #6

Merged
dada-sudo merged 1 commit into
mainfrom
fix/dockerfile-containment-and-sse-bound
Nov 11, 2026
Merged

dada-sudo merged 1 commit into
mainfrom
fix/dockerfile-containment-and-sse-bound

Conversation

@dada-sudo

Copy link
Copy Markdown
Contributor

What changes

  • CLI, deploy: link checks the path --dockerfile gives, but deploy reads the path back from .antelope/cloud.json and packed whatever it named. createSourceArchive now resolves the path (symlinks included) and refuses one that leaves the service folder, with the existing service_path_outside_project problem.
  • SDK, parseSse: the frame buffer had no limit. Reading now stops with invalid_api_response once a single frame passes 1 MiB.
  • Release workflow: the validate job gets contents: read instead of inheriting contents: write and id-token: write.

Tests

cli/test/contracts.test.ts:

  • a Dockerfile path with .., and one through a linked folder, are refused;
  • a stream that never ends a frame is cut after at most 2 MiB read.

Run locally on Windows: the two new tests pass. One existing test, "Ctrl+C says the deployment keeps running and how to follow it", fails there (it sends a signal); CI on Linux is the reference.

Not changed

The default ignore list of the upload (.git, node_modules, .antelope). Files such as .env are still uploaded unless .cloudignore names them; excluding them by default would change what existing projects deploy, so that is left for a separate decision.

…e SSE frame buffer

`link` checks the path `--dockerfile` gives, but `deploy` reads the path back
from `.antelope/cloud.json` and packed whatever it named. That file is meant
to be committed, so a change to it could make a deploy pack a file from
outside the service folder, through `..` or a symlinked folder, into the
upload. `createSourceArchive` now resolves the path and refuses one that
leaves the folder with `service_path_outside_project`.

`parseSse` appended to its buffer until a frame ended, without a limit. It
now stops with `invalid_api_response` once one frame passes 1 MiB. The CLI
and any server that relays a stream through the SDK share this parser.

The release workflow's `validate` job only reads the repository, so it no
longer inherits the workflow's write and OIDC permissions.

Co-Authored-By: Claude <noreply@anthropic.com>
@dada-sudo
dada-sudo merged commit 3eace41 into main Nov 11, 2026
8 checks passed
@dada-sudo
dada-sudo deleted the fix/dockerfile-containment-and-sse-bound branch November 11, 2026 15:45
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