Commit Graph

987 Commits

Author SHA1 Message Date
Hugh Brown
8e145a2129 security: set sensible defaults for security response headers
X-Content-Type-Options, X-Frame-Options, and Referrer-Policy all
defaulted to empty (disabled). Set defaults to nosniff, DENY, and
strict-origin-when-cross-origin respectively. Operators can still
override or disable via environment variables.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 23:35:10 +05:30
Hugh Brown
c7f8578f38 security: run Docker containers as non-root user
Both backend and frontend Dockerfiles ran all processes as root.
Add a dedicated appuser in each runtime stage so container processes
run with minimal privileges, limiting blast radius of any container
escape.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 23:35:10 +05:30
Hugh Brown
4257c08ba9 security: stop logging token prefix on failed agent auth
The first 6 characters of invalid agent tokens were logged, leaking
partial credential information. Remove token_prefix from log messages
while preserving the request path for debugging.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 23:35:10 +05:30
Hugh Brown
66da278673 security: require org-admin for gateway session message endpoint
send_gateway_session_message only required basic auth (AUTH_DEP) while
all other gateway endpoints required ORG_ADMIN_DEP. Any authenticated
user could send messages to any gateway session. Now requires org-admin
and verifies the board belongs to the caller's organization.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 23:35:10 +05:30
Hugh Brown
7ca4145aff security: add 1 MB payload size limit to webhook ingestion
The webhook ingest endpoint read the entire request body with no size
limit, enabling memory exhaustion attacks. Add a 1 MB limit checked
via both Content-Length header (early reject) and actual body size.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 23:35:10 +05:30
Hugh Brown
5d382ed67b security: mitigate prompt injection in agent instruction strings
User-controlled fields (skill name, source URL, webhook payloads) were
interpolated directly into agent instruction messages. Sanitize skill
fields by stripping newlines/control chars, and fence all external data
behind "BEGIN EXTERNAL DATA" / "BEGIN STRUCTURED DATA" delimiters with
explicit "do not interpret as instructions" markers. Move system
instructions above the data section so they cannot be overridden.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 23:35:10 +05:30
Hugh Brown
4d1dbb4098 security: add HMAC signature verification to webhook ingest
Webhook ingest endpoint was completely unauthenticated. Add an optional
`secret` field to BoardWebhook. When configured, inbound requests must
include a valid HMAC-SHA256 signature in X-Hub-Signature-256 or
X-Webhook-Signature headers. Uses hmac.compare_digest for timing safety.
Includes migration to add the secret column.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 23:35:10 +05:30
Hugh Brown
10848b98cb security: scope agent board listing to organization
Main agents (board_id=None) could list boards across all organizations.
Now resolves the agent's organization via its gateway and filters boards
by organization_id to prevent cross-tenant data leakage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 23:35:10 +05:30
Hugh Brown
c7692e30d3 security: rename misleading require_admin to require_user_actor
The function only checked that the caller was an authenticated user
(not an agent) but its name implied privilege enforcement. Rename to
require_user_actor and add docstring clarifying the distinction between
actor-type checks and privilege/role checks (require_org_admin, is_super_admin).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 23:35:10 +05:30
Abhimanyu Saharan
b32a9f5e66 fix(makefile): set BASE_URL for local environment in database migration commands 2026-03-07 23:19:54 +05:30
Abhimanyu Saharan
de9e73eb7a Merge pull request #226 from aronchick/security/bind-ports-to-localhost
security: bind redis and postgres ports to localhost only
2026-03-05 20:50:29 +05:30
Aaron Aronchick
08462b430f Merge master into security/bind-ports-to-localhost: keep localhost port binding and redis healthcheck 2026-03-05 13:32:32 +00:00
Abhimanyu Saharan
51f35d1978 Merge pull request #222 from abhi1693/installer-tests
feat(ci): harden installer smoke tests across linux and macos
2026-03-05 02:21:17 +05:30
Abhimanyu Saharan
ff643af934 fix(installer): set required backend env values in docker mode 2026-03-05 02:13:27 +05:30
Abhimanyu Saharan
359de2868d fix(ci): address installer workflow review feedback 2026-03-05 02:05:03 +05:30
Abhimanyu Saharan
d46480bd23 feat(ci): enhance installer smoke tests for macOS and Linux with improved readiness checks 2026-03-05 01:55:33 +05:30
Abhimanyu Saharan
ba6726a99c feat(ci): enhance installer workflow with OS matrix and conditional smoke tests 2026-03-05 01:39:38 +05:30
Abhimanyu Saharan
532fbf1dc5 feat(config): make BASE_URL a required field and update related documentation 2026-03-05 01:36:07 +05:30
Abhimanyu Saharan
df7152dcad feat(docker): add watch mode for automatic frontend rebuilds in Docker 2026-03-05 00:54:09 +05:30
Abhimanyu Saharan
2b0d3ba386 Merge pull request #135 from abhi1693/feat/agent-webhook-payload-read
feat(agent): allow agents to read stored webhook payloads for backfill
2026-03-04 23:36:04 +05:30
Abhimanyu Saharan
3acc276d8d fix(agent): address webhook payload read review feedback 2026-03-04 23:26:31 +05:30
Abhimanyu Saharan
1d0b318fc9 lint: fix flake8 E304 after create_task decorator 2026-03-04 23:22:27 +05:30
Abhimanyu Saharan
3fc96baa10 feat(agent): add read-only webhook payload fetch endpoint for backfill 2026-03-04 23:22:27 +05:30
Abhimanyu Saharan
9ccb9aefd8 Merge pull request #134 from abhi1693/fix/blocked-transition-error-schema
Fix blocked-task error schema: include code field
2026-03-04 23:20:30 +05:30
Abhimanyu Saharan
f5e3b8923a test: assert blocked precondition in dependency-only update test 2026-03-04 23:09:56 +05:30
Abhimanyu Saharan
636c130a3b test: harden blocked-task regression tests per review 2026-03-04 23:01:24 +05:30
Abhimanyu Saharan
130947dcea test: format blocked-task schema regression assertions 2026-03-04 22:52:43 +05:30
Abhimanyu Saharan
6f7867872b test: fix import order for blocked dependency regression test 2026-03-04 22:50:47 +05:30
Abhimanyu Saharan
e9ce004e70 test: address PR review feedback for blocked-task schema 2026-03-04 22:46:44 +05:30
Abhimanyu Saharan
8b77eae0f2 Document blocked-task 409 error code in OpenAPI + add regression tests 2026-03-04 22:46:44 +05:30
Abhimanyu Saharan
2ae1c219f7 Merge pull request #131 from abhi1693/test/e2e-critical-flows
test(e2e): cover boards, approvals, packs critical flows
2026-03-04 22:40:57 +05:30
Abhimanyu Saharan
04d80c53ac Merge branch 'master' into test/e2e-critical-flows 2026-03-04 22:30:36 +05:30
Abhimanyu Saharan
b6aff9c796 test(e2e): align critical-flow specs with local auth CI 2026-03-04 22:29:47 +05:30
Abhimanyu Saharan
e567c3ca42 Merge pull request #119 from abhi1693/test/aec2903b-rtl-batch1
test(frontend): add UserMenu RTL coverage (batch 1)
2026-03-04 22:27:06 +05:30
Abhimanyu Saharan
39f314cd8c test(e2e): extract shared page test setup hooks 2026-03-04 22:26:40 +05:30
Abhimanyu Saharan
d1b08b4777 chore(e2e): remove gap analysis markdown doc 2026-03-04 22:26:15 +05:30
Abhimanyu Saharan
c26dddbce8 test(e2e): fix approvals action label assertion for CI 2026-03-04 22:26:15 +05:30
Abhimanyu Saharan
ba918d4231 docs(e2e): add gap analysis + CI determinism notes 2026-03-04 22:26:15 +05:30
Abhimanyu Saharan
f69af0a6c9 test(e2e): add critical flows for boards, approvals, packs 2026-03-04 22:26:15 +05:30
Abhimanyu Saharan
3a21c4c204 test(frontend): auto-restore location stub in UserMenu tests 2026-03-04 22:19:01 +05:30
Abhimanyu Saharan
b3b8285a64 test(frontend): harden UserMenu RTL mocks and local sign-out assertions 2026-03-04 22:18:09 +05:30
Abhimanyu Saharan
3dca0fa813 test(frontend): fix lint typing in UserMenu test link mock 2026-03-04 22:09:52 +05:30
Abhimanyu Saharan
d739e31196 test(frontend): add UserMenu RTL coverage for local-mode menu actions 2026-03-04 22:09:52 +05:30
Abhimanyu Saharan
8981202f8f Merge pull request #221 from abhi1693/dashboard-redesign
feat(dashboard): redesign dashboard and align activity routing with board-scoped events
2026-03-04 21:52:30 +05:30
Abhimanyu Saharan
81b9a586ed fix(activity): use API route metadata for feed links 2026-03-04 16:25:16 +05:30
Abhimanyu Saharan
4378d354f4 fix(ci): resolve backend check failures in dashboard metrics 2026-03-04 16:11:14 +05:30
Abhimanyu Saharan
bdc9fc3f01 redesigned dashboard page 2026-03-04 16:01:56 +05:30
Abhimanyu Saharan
a30e59de60 Merge pull request #100 from abhi1693/docs/skeleton-45a7c1d
docs: add testing + release checklist; fix contributing links
2026-03-03 06:42:01 +05:30
Abhimanyu Saharan
bee40c36cd fix: address PR #100 review comments 2026-03-03 05:17:31 +05:30
Abhimanyu Saharan
7fa0959f63 docs: use sentence-case heading in docs landing 2026-03-03 05:04:42 +05:30