Skip to content

Name alert and MFA audit events after what they report - #114

Merged
ndbroadbent merged 2 commits into
mainfrom
nathan/verification-alert-names
Oct 12, 2026
Merged

ndbroadbent merged 2 commits into
mainfrom
nathan/verification-alert-names

Conversation

@ndbroadbent

@ndbroadbent ndbroadbent commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Two naming fixes for audit events, so Slack patterns and audit log searches match what people expect.

Verification alerts

Audit log verification alerts were recorded as audit_log.verify, which reads like a record of every verification
run. A passing run records nothing; the events are alerts. They're now:

  • audit_log.verification_failed: verification is failing (status failed, or error when the run couldn't
    verify). Sent on the first failure, when a run finds more failures, and as a daily reminder.
  • audit_log.verification_recovered: verification passes again after failing (status success).

New Slack integrations route audit_log.verification_* to their #security channel.

MFA verification

An MFA verification was recorded under three names: mfa_verification.create (the web routes, named after their
shared permission), mfa.verify (a CLI login's MFA step) and mfa.verify.failed (the failure alert). Starting a
WebAuthn verification, which only issues a challenge, was recorded as mfa_verification.create too.

  • Every MFA verification records mfa.verify (attempt, then a result with status success or failed): POST /auth/mfa/verify, the WebAuthn assertion verify and a CLI login's MFA step.
  • Starting a WebAuthn verification records mfa.challenge.
  • The failure alert is mfa.verify_failed (like login.oauth_failed). It emails the user, and new Slack
    integrations now route it to #security.

Upgrading

Existing Slack integrations keep their patterns. The upgrade notes say to replace audit_log.verify with
audit_log.verification_*, and to add mfa.verify_failed to a security channel. Audit log searches for the old
names find only older events.

The scheduled audit verification's alerts were recorded as audit_log.verify, which reads like the record of a
routine (passing) run. A passing run records nothing; the action only appeared when verification was failing,
and once when it passed again. They're now:

- audit_log.verification_failed (status failed, or error when the run couldn't verify): the first failing run,
  a run with more failures than the last alert reported, and a daily reminder.
- audit_log.verification_recovered (status success): the first passing run after failing.

New Slack integrations route audit_log.verification_* to #security. ActionVerbVerify is gone: nothing records
it (only a pattern-matching test used it as an example).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

  • Run on-demand review

This review includes 16 billable files and costs up to $4.00.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 21 seconds for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 62 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 903215cd-3e42-40d4-9725-046f8bdec28b

📥 Commits

Reviewing files that changed from the base of the PR and between 096c455 and 6708333.


📒 Files selected for processing (16)
  • docs/src/content/docs/deployment/terraform/s3-worm-storage.mdx
  • docs/src/content/docs/integrations/slack.mdx
  • docs/src/content/docs/operations/upgrades.mdx
  • internal/gateway/CLAUDE.md
  • internal/gateway/audit/constants.go
  • internal/gateway/audit/mfa_actions_test.go
  • internal/gateway/handlers/auth_cli.go
  • internal/gateway/handlers/integrations_slack.go
  • internal/gateway/jobs/verifyaudit/alerts.go
  • internal/gateway/jobs/verifyaudit/helpers_test.go
  • internal/gateway/jobs/verifyaudit/worker_test.go
  • internal/gateway/rbac/audit_names.go
  • internal/gateway/rbac/audit_names_test.go
  • internal/gateway/security/notifier.go
  • internal/gateway/slack/notifier.go
  • internal/gateway/slack/notifier_test.go

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@deepsource-io

deepsource-io Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 096c455...6708333 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
JavaScript Oct 12, 2026 7:36a.m. Review ↗
Go Oct 12, 2026 7:36a.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

An MFA verification was recorded under three names: mfa_verification.create (the web routes, named after their
shared permission), mfa.verify (a CLI login's MFA step) and mfa.verify.failed (the failure alert). And starting a
WebAuthn verification, which only issues a challenge, was recorded as mfa_verification.create too.

- Every MFA verification records mfa.verify (attempt, and result with status success or failed): POST
  /auth/mfa/verify, the WebAuthn assertion verify and a CLI login's MFA step.
- Starting a WebAuthn verification records mfa.challenge.
- The failure alert is mfa.verify_failed (like login.oauth_failed). It emails the user, and new Slack integrations
  now route it to #security.

The routes are named in rbac's auditActions; a test in audit checks they match the audit constants.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ndbroadbent ndbroadbent changed the title Name verification alerts after what they report Name alert and MFA audit events after what they report Oct 12, 2026
@ndbroadbent
ndbroadbent merged commit 45f3cc7 into main Oct 12, 2026
14 checks 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