Skip to content

fix: add redaction policy to support diagnostics bundle#4460

Open
neuralmint wants to merge 1 commit into
orchestration-agent:mainfrom
neuralmint:fix/bounty-4453-diagnostics-redaction
Open

fix: add redaction policy to support diagnostics bundle#4460
neuralmint wants to merge 1 commit into
orchestration-agent:mainfrom
neuralmint:fix/bounty-4453-diagnostics-redaction

Conversation

@neuralmint
Copy link
Copy Markdown

Closes #4453

Summary

Adds a redaction policy and diagnostics bundle generator so that sensitive fields (tokens, passwords, secrets, credentials, API keys) are stripped from operator-facing diagnostic output.

Changes

  • New: src/common/diagnostics.pyredact() recursively walks dicts/lists and replaces sensitive values with [REDACTED] placeholders
  • New: src/common/diagnostics.pygenerate_diagnostics_bundle() builds a system metadata bundle and applies redaction to agent registry snapshots and config
  • New: tests/test_diagnostics.py — 16 tests covering key detection, scalar/list/nested redaction, bundle structural integrity, and end-to-end no-leakage verification

Acceptance Criteria

  • Diagnostics omit token, secret, password, and credential fields ✅
  • Redaction applies recursively to nested structures ✅ (test_deeply_nested_token, test_credential_in_connector_config)
  • Tests verify representative config and connector payloads ✅

Implements a recursive redaction function and a generate_diagnostics_bundle()
entry point for the operator-facing diagnostics endpoint. Sensitive fields
(token, password, secret, api_key, credential, etc.) are redacted at every
nesting level before the bundle is returned.

Changes:
- Add src/common/diagnostics.py with redact() and generate_diagnostics_bundle()
- Recursive redaction covers all dict keys at any depth
- Sensitive key patterns include connection strings and credential fields
- Health diagnostics bundle collects system info without leaking secrets
- Add 16 tests covering key detection, scalar/list/nested redaction, bundle integrity

Closes orchestration-agent#4453
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ Bounty $8k ] [ Security ] Remove sensitive fields from health diagnostics — support diagnostics bundle

1 participant