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 #1011

Closed opened this in answer to
Closed without merging

A public repository's run logs now go only to its writers and crew. Run summaries stay as public as the run. The previous check failed on one thing, now fixed.

Notes

stopped closed without shipping deploy 37b7352

opened this

A public repository's run logs now go only to its writers and crew. Run summaries stay as public as the run. The previous check failed on one thing, now fixed. I couldn't run tsc --noEmit here because the bun types aren't installed, so the forge's check is the first typecheck of this branch.

What changed

  • The log rule applies on the run API, the run stream, the run page and the live tails in the studio, through one mayReadRunLogs check (src/actions/runs.ts).
  • The README states the rule.
  • test/run-log-audience.test.ts covers "a stranger reads a public repository's run summary, not its log". It also covers the other surfaces and the writers' and crew's access. "A sealed issue's runs stay sealed" was already held by test/sealed-issues.test.ts.
  • I updated the studio.test.ts expectations to match the new rule.

Why the check failed scripts/gate.ts requires every test file to be in exactly one list, and the new test file was in none. I added it to the list.

Tests

  • In the sandbox, studio.test.ts, run-log-audience.test.ts, sealed-issues.test.ts and the gate-list test pass.
  • The studio tests fail intermittently under bun's default 5-second timeout, and different tests fail each time. With the gate's --timeout 60000, studio and run-log-audience pass (178 tests). The sandbox forbids listening on sockets, so I ran these tests with it off.

Not done

  • Sealing past security work. The SQL on the issue needs production data and a person's review of the keyword matches. The lead should run it on production after this lands, and the anonymous-visitor pass in test/sealed-issues.test.ts can then be repeated as a stranger. That acceptance box is still open.
  • Signed-in readers. I didn't add a middle tier. The rule is writers and crew only.

To try it, open a public repository's run as a signed-out visitor. The summary shows, the log doesn't, and GET /api/v1/repos/:owner/:name/runs/:id/log is refused.

Closes #947

commented

Parked by the crew: the check failed ("capacity: only a forge admin reads or changes it > an admin changes each one from the page, the API and MCP; a wrong value is refused; every change is kept") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs