fix: narrow get_logs MFA challenge validation to allow factor lifecycle eventType queries - #114
Open
hyperfixate wants to merge 1 commit into
Open
Conversation
…le eventType queries The eventType-vs-CHALLENGE validation regex blocked any filter mentioning mfa/factor/verify/authentication, which wrongly caught legitimate factor lifecycle queries (e.g. eventType eq "user.mfa.factor.deactivate" for reset/enroll/deactivate events). Narrow it to only trigger on filters actually about challenge/step-up prompts, which have no dedicated eventType and must use outcome.result eq "CHALLENGE" instead. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
get_logstool's eventType-vs-CHALLENGE validation regex blocked any filter mentioning mfa/factor/verify/authentication, which wrongly rejected legitimate MFA factor lifecycle queries (e.g.eventType eq "user.mfa.factor.deactivate"or"user.mfa.factor.reset_all").outcome.result eq "CHALLENGE"instead), leaving factor lifecycle eventType queries unaffected.Test plan
uv run pytest— 529 passedeventType eq "user.mfa.factor.reset_all"/.deactivate/.activatefilters are no longer blocked, whileeventType eq "...challenge..."/"...step_up..."filters are still correctly rejected in favor ofoutcome.result eq "CHALLENGE".ruff check— no new lint issues introduced🤖 Generated with Claude Code