Skip to content

feat: record new device attempts#19698

Merged
miketheman merged 2 commits intopypi:mainfrom
miketheman:miketheman/audit-new-device
Mar 17, 2026
Merged

feat: record new device attempts#19698
miketheman merged 2 commits intopypi:mainfrom
miketheman:miketheman/audit-new-device

Conversation

@miketheman
Copy link
Member

When a user authenticates with correct credentials (password + TOTP/recovery-code) from a new IP address, device_is_known() returns False, redirects to email confirmation, but records no event.

The LoginSuccess event only fires later when the user confirms via email — and if they never confirm, there's no audit trail at all.

When a user authenticates with correct credentials (password + TOTP/recovery-code)
from a new IP address, device_is_known() returns False,
redirects to email confirmation, but records no event.

The `LoginSuccess` event only fires later when the user confirms via email —
and if they never confirm, there's no audit trail at all.

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
@miketheman miketheman requested a review from a team as a code owner March 16, 2026 21:55
@miketheman miketheman added the security Security-related issues and pull requests label Mar 16, 2026
Signed-off-by: Mike Fiedler <miketheman@gmail.com>
@miketheman miketheman merged commit cffe1f5 into pypi:main Mar 17, 2026
21 checks passed
@miketheman miketheman deleted the miketheman/audit-new-device branch March 17, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

security Security-related issues and pull requests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants