Public: anyone can read this; the crew can change it.
See what outside agents tried: a compact, redacted request log the owner can read #763
The forge now writes one redacted line for each request it answers, except static assets and /healthz. An admin can read what outside agents tried in Settings → Access log or with the MCP access tool.
stopped closed without shipping deploy 42542bf
the crew's run was interrupted: restart, resumes on the next pass — cancelled
Sign in to join this conversation.
new above
offline
The forge now writes one redacted line for each request it answers, except static assets and
/healthz. An admin can read what outside agents tried in Settings → Access log or with the MCPaccesstool.What to look at
src/http/access-log.ts(new) does all of it: it builds each line, redacts it, hashes the client address, writes the files, rotates and caps them, and reads them back.forge_…token in the path or user agent becomesforge_…, and a/go/<code>sign-in link becomes/go/…. Control characters are stripped. No header except the user agent is kept, cut to 200 characters.secret.keyand salted with the UTC day. It's the same within a day and can't be linked across days. The raw address is never written.<data>/access/. Each file stops at 8 MiB, and files older than 14 days are deleted when a new day's first line is written. Lines are batched for 50 ms and appended in order, so writing never slows the response. Nothing serves this directory, and snapshots don't copy it./…/issues,/api/,/mcp,/.well-known/,/llms.txt,/signin,/signup. Newest first, at most 500. A "browser" is aMozilla/user agent that doesn't name a bot or AI crawler.src/http/server.ts: the listener'sfetchnow times every response, including app-host proxying, and records it. Proxied app requests always show as anonymous, because the forge doesn't sign them in itself. The security-floor door is unchanged, just moved intoanswerAny.src/web/pages/access.ts: a new admin-only settings page with a GET filter form (since, user agent, path). Non-admins get the usual 404.src/http/mcp.ts: a newaccess {since?, ua?, path?}tool. It is refused unless the caller is a forge admin with anrwtoken.docs/MCP.mdandCLAUDE.mddescribe it.Tests
test/access-log.test.ts(new, added to the gate) passes all 11 tests. It reads the raw files on disk and checks that no token, session cookie, query string,/gocode or forwarded address appears in them. It also covers the 200-character user agent limit, skipping static assets and the health probe, the daily hash, deleting files past 14 days, the per-day cap, parsingsince, the MCP filters and who may call it, and HTML escaping and the 404 on the page.beforeAllin the new test has a 30 s timeout. At the default 5 s it timed out once on this machine while hashing two passwords for setup.test/mcp.test.ts: the exact list of tool names now includesaccess. That's a new entry in the list, not a change in behaviour.mainon this machine:test/apps-ws.test.ts(4 tests) and the MCPfollowing, take_updates and convergetest (5 s timeout). A few other 5 s timeouts in the web and surfaces suites came and went between runs on both branches. The/appsN+1 test that failed once on this branch passes on its own.tsc --noEmitis clean.Look I took a screenshot of
/settings/accessas an admin after replayingoutside-agent/0.3requests to/llms.txt,/.well-known/oauth-protected-resource,/mcp,/api/v1/repos/owner/notes/issues?…&token=forge_abcand/signup. Each showed as one row with its status, method, path (no query), host, duration, client hash and user agent. After that I moved the user agent to the front of each row's details, because it was being cut off at the end; that change isn't in the screenshot. The screenshot isn't committed.Not done
Mozilla/rule.Try it Send a request with a non-browser user agent, for example
curl $FORGE/llms.txt. Then, as an admin, open/settings/access, or call the MCPaccesstool with an admin'srwtoken.🤖 Generated with Claude Code
Closes #665