Skip to content

Centralize sensitive log redaction across services - #308

Open
quarj0 wants to merge 33 commits into
mainfrom
feat/ic-066-structured-log-redaction
Open

Centralize sensitive log redaction across services#308
quarj0 wants to merge 33 commits into
mainfrom
feat/ic-066-structured-log-redaction

Conversation

@quarj0

@quarj0 quarj0 commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Closes #150

Summary

  • adds one shared backend redaction processor for Django, Celery, storage/provider logging paths, and managed AI
  • installs the boundary before Django/Celery/AI application logging can emit records
  • sanitizes nested structured context, positional args, exception text/tracebacks, credentials, common PII shapes, evidence locations, biometric fields, and binary values
  • adds frontend safeLog and rejects direct production console.* calls in lint
  • adds adversarial cross-service tests and operational logging guidance
  • copies the shared backend logging package into both production images

Verification

  • DJANGO_SETTINGS_MODULE=config.settings.testing uv run --project backend python backend/django/manage.py test common
  • cd backend/ai-service && uv run --project .. pytest tests/test_safe_logging.py
  • cd frontend && pnpm --filter @identitycore/api-client lint
  • full CI and Security workflows

Security notes

  • safe operational identifiers/status/reason codes remain available
  • credentials, subject PII, document/OCR content, evidence storage keys, selfies/embeddings/liveness media, and byte payloads are redacted
  • exception strings are sanitized at the Python LogRecord creation boundary so callers cannot bypass redaction by using logger.exception(...) or passing an exception as a formatting argument

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

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.

[IC-066] Create centralized structured-log redaction for secrets, tokens, PII, and biometric payloads.

1 participant