Skip to content

LOU-D18, LOU-X7: verify Slack request signatures; built-in todo tools - #55

Merged
LinuxDevil merged 3 commits into
mainfrom
lou-d18-slack-signature-and-todo-tools
Oct 1, 2026
Merged

LinuxDevil merged 3 commits into
mainfrom
lou-d18-slack-signature-and-todo-tools

Conversation

@LinuxDevil

Copy link
Copy Markdown
Owner

What

  • LOU-D18: SlackTriggerAdapter gets signingSecret, logger and handleRequest({ headers, rawBody }). Every request is verified against the raw body before parsing (HMAC-SHA256 over v0:{ts}:{raw body}, constant-time compare, 5 minute window), generic 401 on failure, signed url_verification handshake answered after verification, one-time warning at listen() when no secret is set. New public verifySlackSignature({ signingSecret, timestamp, signature, rawBody, now? }), used by the ops-pipeline example when SLACK_SIGNING_SECRET is set.
  • LOU-X7: createTodoTools({ store?, onChange? }) returns { tools, todoWrite, todoRead, getTodos } (todo_write / todo_read).

Why

Slack endpoints accepted unauthenticated requests (security finding from LOU-D13 review). Long-running agents also need a way to plan and track work (open-harness parity).

How verified

  • npx tsc --noEmit: clean; npm run lint: 0 errors (no new warnings in touched files)
  • npm run build + create-loushy-agent build: success
  • npm run test:coverage: 100 files passed, 1309 tests passed, 3 skipped
  • npm run fallow: 0 above threshold
  • npm run docs:verify-snippets: all 35 snippets type-check, 5 run cleanly
  • Merged origin/main (6f2dc67) before verification; already up to date.

Notes for reviewer

  • The Slack adapter previously had no HTTP surface (only handleEvent), so handleRequest is new; the host keeps its own HTTP server. Scheme confirmed at https://docs.slack.dev/authentication/verifying-requests-from-slack (api.slack.com redirects there).
  • examples/slack-notifier receives no Slack requests (it only drafts text), so it is unchanged.
  • Todo validation (max one in_progress, unique ids, non-empty content) is a zod refinement, so failures reach the model as ToolArgumentsValidationError.
  • handleRequest awaits the agent before responding (documented; Slack expects a reply in 3s).

🤖 Generated with Claude Code

LinuxDevil and others added 3 commits October 1, 2026 09:42
LOU-D18: SlackTriggerAdapter gains signingSecret + handleRequest(): verifies X-Slack-Signature (HMAC-SHA256 over v0:{ts}:{raw body}, constant-time, 5 minute replay window) before parsing, generic 401 on failure, signed url_verification handshake, one-time warning when unset. verifySlackSignature() is exported for custom handlers and used by the ops-pipeline example when SLACK_SIGNING_SECRET is set. Reuses webhookAuth.ts helpers.

LOU-X7: createTodoTools() returns todo_write/todo_read (shared store, stable ids, at most one in_progress, onChange, pluggable TodoStore, getTodos()).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@LinuxDevil
LinuxDevil merged commit d7927e7 into main Oct 1, 2026
1 check passed
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