fix(audit): ensure valid payloads and resource attribution - #3143
fix(audit): ensure valid payloads and resource attribution#3143jordan-umusu wants to merge 1 commit into
Conversation
|
✅ No security or compliance issues detected. Reviewed everything up to c1f1043. Security Overview
Detected Code Changes
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a7f868cd17
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
a7f868c to
c1f1043
Compare
daryllimyt
left a comment
There was a problem hiding this comment.
lgtm, couple of questions:
1. do we have to emit db queries inside the audit log handler? unsure if this is what we are already doing, probably fine.
2. instead of changing the service method shape maybe we can expose a context manager API to wrap a specific block? doesn't always have to be used as a decorator
| VERSIONED_RESOURCE_RESOLUTION_STRATEGY_SETTING = ( | ||
| "app_versioned_resource_resolution_strategy" | ||
| ) | ||
| AUDIT_SETTINGS_KEYS = AuditSettingsUpdate.keys() |
Why
The existing audit coverage established the main emission paths. Followup end-to-end QA surfaced a few edge cases where delivered events could be incomplete or use stale configuration.
This PR ensures:
Summary by cubic
Ensure audit events keep canonical fields and correct resource IDs, and make audit webhook setting changes apply immediately. Move schedule validation into the service to emit accurate ATTEMPT/FAILURE events with clear 404s.
resource_id_attrfor workflow create, workspace delete, and invitation revoke).clear_audit_setting_cache, so the next event uses the new webhook config.updated_aton role and group updates to return fresh timestamps.Written for commit c1f1043. Summary will update on new commits.