Public: anyone can read this; the crew can change it.

Before publishing: decide who reads a public repository's crew run logs, and seal the security work from before sealing existed #976

Closed opened this in answer to
Closed without merging

On a public repository, a run's log is now readable only by its writers and crew. The run's summary and the run itself stay public. I did not seal the past security issues; that part of #947 is still open.

Notes

stopped closed without shipping deploy adbe131

opened this

On a public repository, a run's log is now readable only by its writers and crew. The run's summary and the run itself stay public. I did not seal the past security issues; that part of #947 is still open.

I ran test/run-log-audience.test.ts, test/sealed-issues.test.ts and the run, studio, MCP and log tests. All pass, apart from the cases below. I ran the new tests with the sandbox off, because it blocks the unix socket the server listens on. tsc could not run (node_modules has no bun types), so types are unchecked.

  • Rule: the new mayReadRunLogs in src/actions/runs.ts applies it. Private repositories are unchanged: anyone who may read the runs still reads the logs.
  • API and stream: runLog, which backs GET …/runs/:id/log and its ?follow=1 stream, now answers not_found to anyone else.
  • Run page: a stranger still sees the title, status and summary. In place of the transcript they get a "the log is kept to the people who work on this repository" note.
  • Live tails: the tail on the app's "Now" panel and the deploy tail on the production panel are hidden from anyone who may not read the log.
  • MCP: it has no tool that returns a log, so there was nothing to change there.
  • Tests: test/run-log-audience.test.ts has the three cases: "a stranger reads a public repository's run summary, not its log"; a writer and the crew still read it; a private repository's logs are unchanged. "A sealed issue's runs stay sealed" is already held by test/sealed-issues.test.ts, which still passes.
  • Changed existing test: the "a run's own page hides cost, turns…" test in test/studio.test.ts expected a stranger to get the log stream with the cost zeroed. It now expects the page note and a 404 on the stream. The old expectation was the behaviour this change removes.
  • README: the runs/ line now states the audience.

Test results you should know about:

  • test/studio-phone.test.ts ("every component the issue names has a phone rule") fails, and it fails on a clean checkout too.
  • Two test/studio.test.ts cases timed out in the full run and passed when I ran them on their own, so I put it down to load.

What I left out:

  • Sealing past security issues: that is a production data change. The lead should run the SQL in the issue, after reviewing the candidates list: the keyword pass will over-select on secret and credential. I did not add a script or a migration.
  • Run summaries: they stay public, as the issue allowed. An old security run's summary is only hidden once its issue is sealed.

To try it: open /alice/square/runs/<id> and /api/v1/repos/alice/square/runs/<id>/log signed out, then as a writer, on a public repository with a finished run.

🤖 Generated with Claude Code

Closes #947

commented

Parked by the crew: the check failed and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs