security: harden Time for a public repo (#45)
- beats_of/verdict/retry: trust only github-actions[bot] and owner/member/collaborator authors (forged state and stranger retries on a public repo) - touches_protected: paginate pull files and include previous_filename - browser_check: drop .git after clone, serve only the venture folder, Chrome with no network but localhost - Hands.run: execute in a docker container when a daemon exists (TIME_RUN_IMAGE), host shell fallback - tests: logins on fake comments, stranger retry/forged beat cases, paginated files fake Claude-Session: https://claude.ai/code/session_01CYHXFvWMCs1GUmRmpySqQ6 Co-authored-by: claude <noreply@anthropic.com>
This commit was merged in pull request #45.
This commit is contained in:
1 parent
e52e116815
commit
17e51a6b08
6 files changed
+68
-12
No files matched your search
@@ -3,6 +3,11 @@
|
||||
## [Unreleased]
|
||||
|
||||
### Security
|
||||
- Time's state comments (`<!-- time {...} -->` beats) count only when written by `github-actions[bot]`; a pasted marker from anyone else is ignored. A stranger on a public repo could otherwise steer a card to merge a chosen PR or build a chosen page.
|
||||
- `/time retry` and "Approve"/"Object" comments count only from the owner, members, collaborators and Time itself; any other bot is a stranger too.
|
||||
- The protected-path check reads every file of a PR (not the first 100) and counts a rename under both names.
|
||||
- The browser pass clones the Pages branch, then drops `.git` (the clone URL carried the token), serves only the venture's own folder, and runs headless Chrome with no network except localhost, so a model-written page can't read or send anything.
|
||||
- The worker's `run` tool executes inside a throwaway container (`docker run`, the checkout mounted; the workflows set `TIME_RUN_IMAGE: node:22-bookworm`), so a command can't read the orchestrator's environment through `/proc`. Unset, or without a docker daemon, it is the host shell as before.
|
||||
- A venture build writes only inside its own `ventures/<slug>/` folder on the Pages branch, which also carries the studio's site and every other venture: a fix round once wrote its page over the site's front page.
|
||||
- The Venice worker's shell no longer sees secrets: its environment drops tokens and keys, its checkout keeps no token in `.git/config`, and the workflows check out without persisted credentials.
|
||||
|
||||
|
||||
Reference in new issue
Block a user