feat: add audit logging and strengthen intelligence - #572
Conversation
Bumps [docker/login-action](https://github.com/docker/login-action) from 4.1.0 to 4.4.0. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](docker/login-action@4907a6d...af1e73f) --- updated-dependencies: - dependency-name: docker/login-action dependency-version: 4.4.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 4.1.1 to 4.1.2. - [Release notes](https://github.com/sigstore/cosign-installer/releases) - [Commits](sigstore/cosign-installer@cad07c2...6f9f177) --- updated-dependencies: - dependency-name: sigstore/cosign-installer dependency-version: 4.1.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
- Voice dialog with live Web Speech API transcription and fluid orb visual - MicrophoneIcon added to nucleo icon set - Allow same-origin microphone in Permissions-Policy Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 6.0.0 to 6.2.0. - [Release notes](https://github.com/docker/metadata-action/releases) - [Commits](docker/metadata-action@030e881...dc80280) --- updated-dependencies: - dependency-name: docker/metadata-action dependency-version: 6.2.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
* fix(ci): only run releases for changesets * fix(dashboard): align core e2e checks with current UI
…tions/staging/docker/metadata-action-6.2.0 chore(deps): bump docker/metadata-action from 6.0.0 to 6.2.0
…tions/staging/sigstore/cosign-installer-4.1.2 chore(deps): bump sigstore/cosign-installer from 4.1.1 to 4.1.2
…tions/staging/docker/login-action-4.4.0 chore(deps): bump docker/login-action from 4.1.0 to 4.4.0
add voice input to agent chat
This reverts commit 1154779.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The latest updates on your projects. Learn more about Unkey Deploy
|
Greptile SummaryThis PR adds an organization-scoped audit ledger and tightens Insight evidence handling.
Confidence Score: 2/5This PR should not merge until audit writes cannot leave committed mutations behind an error or silently omit security-sensitive events, and request-origin attribution uses a trusted proxy boundary. API-key and website writes can commit before a failing audit append changes the response outcome, Better Auth deliberately drops failed audit writes, and both audit entry paths persist unverified forwarding-header values as origin IPs. Files Needing Attention: packages/rpc/src/routers/apikeys.ts, packages/rpc/src/routers/websites.ts, packages/auth/src/auth.ts, packages/rpc/src/lib/audit.ts, apps/dashboard/app/api/auth/[...all]/route.ts
|
| Filename | Overview |
|---|---|
| packages/auth/src/auth.ts | Adds Better Auth organization audit hooks, but suppresses post-commit audit failures and can leave the ledger incomplete. |
| packages/rpc/src/lib/audit.ts | Centralizes RPC audit attribution, but persists unverified forwarding-header values as origin IPs. |
| packages/rpc/src/routers/apikeys.ts | Audits API-key mutations after committing them, allowing error responses and retries against already-changed state. |
| packages/rpc/src/routers/websites.ts | Adds comprehensive website audit events, but post-write append failures can report failed operations after committed changes. |
| packages/rpc/src/routers/audit-logs.ts | Adds tenant-authorized cursor-based audit reads and records audit-log access. |
| packages/services/src/audit.ts | Implements audit persistence and querying, but offers no durable retry mechanism for callers that cannot make writes atomic. |
| packages/db/src/drizzle/schema/audit.ts | Adds the organization-scoped audit_events schema and indexes without target foreign keys so history survives deletion. |
| apps/insights/src/generation.ts | Tightens investigation evidence and action-generation boundaries with accompanying replay and schema coverage. |
| apps/dashboard/app/api/auth/[...all]/route.ts | Adds request context around audited Better Auth routes but trusts caller-controlled proxy headers for IP attribution. |
Sequence Diagram
sequenceDiagram
participant C as Authenticated client
participant R as Auth/RPC handler
participant D as Primary database state
participant A as Audit ledger
C->>R: Organization, API-key, or website mutation
R->>D: Commit primary mutation
D-->>R: Success
R->>A: Append audit event
alt Audit append succeeds
A-->>R: Recorded
R-->>C: Success
else Audit append fails
A-->>R: Error
R-->>C: Error or success with missing audit
end
Reviews (1): Last reviewed commit: "feat(audit): add organization audit logg..." | Re-trigger Greptile
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
📄 Knowledge reviewDosu skipped reviewing this PR because your organization has used its |
What changed
Why
Organization changes need a durable tenant-scoped history, while Insight briefs should make evidence-backed next moves without overstating what analytics can prove.
Validation
Notes
Database-backed audit integration coverage will run in CI.
Summary by cubic
Adds an organization-scoped audit log with outbox replay and a read API, strengthens Insights with safer, executable outcomes and rechecks, and adds voice input for the agent. Also reduces noisy 4xx logs and skips email alerts when unset.
New Features
@databuddy/services/auditand@databuddy/shared/audit; audits org membership, API keys, and website lifecycle; newaudit-logsRPC with cursor pagination; Better Auth and ORPC capture actor, IP, UA, and request id; outbox replay retries failed writes.recheckAt; manual runs can force rechecks; rechecks trigger on goal/funnel changes; executable goal edits/deletes validated; inbox hides cases during verification; feed foregrounds outcomes and links evidence; caches invalidate on goal/funnel updates.Permissions-Policyallowsmicrophoneon same origin.Bug Fixes
basketand the ORPC interceptor; avoid double-capturing known client errors.RESEND_API_KEYis missing and warn once; blocked-traffic alerts pull key from app config..changeset/**; GitHub Actions dependencies bumped.Written for commit 941dc13. Summary will update on new commits.