fix(security): change pairing lockout to per-client accounting#679
Closed
agorevski wants to merge 1 commit intozeroclaw-labs:mainfrom
Closed
fix(security): change pairing lockout to per-client accounting#679agorevski wants to merge 1 commit intozeroclaw-labs:mainfrom
agorevski wants to merge 1 commit intozeroclaw-labs:mainfrom
Conversation
PR intake checks found warnings (non-blocking)Fast safe checks found advisory issues. CI lint/test/build gates still enforce merge quality.
Action items:
Run logs: https://github.com/zeroclaw-labs/zeroclaw/actions/runs/22187985872 Detected blocking line issues (sample):
Detected advisory line issues (sample):
|
Replace global failed-attempt counter with per-client tracking keyed by client identity. This prevents one attacker from locking out all legitimate clients via brute-force pairing attempts. - Replace global (u32, Option<Instant>) with HashMap<String, (u32, Option<Instant>)> - Add MAX_LOCKOUT_CLIENTS (1000) cardinality bound with expiry-based eviction - Update try_pair signature to accept client_id parameter - Update all call sites (gateway, telegram channel) - Add lockout_is_per_client_not_global regression test Resolves zeroclaw-labs#603 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
b7107f0 to
718d63b
Compare
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.
Replace global failed-attempt counter with per-client tracking keyed by client identity. This prevents one attacker from locking out all legitimate clients via brute-force pairing attempts.
Resolves #603