a2a-source-edit: write agent.py
This commit is contained in:
2
agent.py
2
agent.py
@@ -763,7 +763,7 @@ def redact_secrets(text: str) -> str:
|
|||||||
r"ghp_[A-Za-z0-9]{12,}",
|
r"ghp_[A-Za-z0-9]{12,}",
|
||||||
]
|
]
|
||||||
for pattern in patterns:
|
for pattern in patterns:
|
||||||
redacted = re.sub(pattern, lambda m: (m.group(1) if m.lastindex else "") + "[REDACTED]", redacted)
|
redacted = re.sub(pattern, _redact_match, redacted)
|
||||||
return redacted
|
return redacted
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user