fix(agent-os): bound email and basic auth scan complexity - #4070
Open
Ricky Gummadi (Ricky-G) wants to merge 2 commits into
Open
Ricky Gummadi (Ricky-G) wants to merge 2 commits into
Ricky Gummadi (Ricky-G) wants to merge 2 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: Ricky Gummadi <ricky.gummadi@outlook.com>
Ricky Gummadi (Ricky-G)
requested review from
MohammadHaroonAbuomar,
liamcrumm and
Prayag (prayagupa)
as code owners
September 22, 2026 04:48
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
27 tasks
PR Review Summary
Verdict: AI review comments are untrusted advisory output. The summary reports workflow-generated completion status only, not model-authored pass/fail claims. |
Ricky Gummadi (Ricky-G)
enabled auto-merge (squash)
September 22, 2026 05:46
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: Microsoft Corporation <agentgovtoolkit@microsoft.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
This independently-authored replacement PR bounds the email and Basic-auth credential-redaction scans so separator-dense or padded input cannot trigger unbounded regex work. It preserves fail-closed detection for readable email addresses and long scheme-like Basic-auth URIs.
Problem
Issue #3566 identified quadratic behavior in Agent-OS PII scanning on separator-dense input. The original implementation also left the Basic-auth URI scan unbounded on the same input shape. This PR supersedes stale PR #3575 with a fresh commit authored by Ricky Gummadi and keeps the issue linkage on the replacement PR.
Changes
agent-governance-python/agent-os/src/agent_os/credential_redactor.pyagent-governance-python/agent-os/tests/test_credential_redactor.pyTesting
python -m pytest tests\\test_credential_redactor.py -q -k "not trailing_lookahead_patterns_handle_adversarial_input_quickly"— 136 passed, 4 deselected.python -m ruff check src\\agent_os\\credential_redactor.py tests\\test_credential_redactor.py— passed.Fixes #3566
Supersedes #3575.