Skip to content

generated provenance: duplicate exception logging sweep (#1612/#1698) - #1725

Draft
seonghobae wants to merge 7 commits into
developfrom
sentinel/fix-exception-logging-2032408815416778398
Draft

seonghobae wants to merge 7 commits into
developfrom
sentinel/fix-exception-logging-2032408815416778398

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Current authority — 2026-09-18

Verified finding in the generated predecessor

The generated commit correctly noticed raw exception interpolation such as f"...{e}", but its blanket replacement with static text plus exc_info=True did not establish exception-detail confidentiality. Standard Python traceback formatting still renders the exception type/value when exc_info=True is attached to the LogRecord. The generated .jules/sentinel.md claim that this preserves full traceback details while avoiding exception-message leakage was therefore internally contradictory.

The same generated sweep also changed the exact production paths already owned by canonical exception-redaction successor #1612: backend/api/emails.py, backend/api/prompts.py, backend/import_fixtures.py, backend/scripts/import_fixtures.py, backend/services/imap_worker.py, backend/services/llm_service.py, and backend/services/pop3_worker.py. #1612 additionally owns the shared backend/core/safe_logging.py contract and focused confidentiality tests. Its LLM paths already replace raw exception values with redacted_exception_info(...) and raise generic LLMServiceError outside the sensitive exception chain, which is strictly stronger than the generated exc_info=True rewrite.

Issue #1698 explicitly records this exact class of failure: treating exc_info=True as redaction is not a complete CWE-532 mitigation. #1700 is the structured telemetry foundation successor and removes raw exception values/original traceback while retaining bounded exception class + one-way failure-site fingerprint; sink-specific migrations are stacked from that owner rather than copied into a new broad sweep.

Corrective action

The generated predecessor was not force-rewritten or simply closed. Ordinary child 30af5fb... preserves the generated commit in ancestry while restoring the protected develop tree byte-for-byte. This removes the weaker duplicate implementation from the effective PR delta without discarding its provenance.

No #1612/#1698/#1700 source, test, helper, doctoring, or prior evidence is copied into this branch. No hosted receipt produced by this zero-effective-delta provenance may transfer to those canonical owners.

Lifecycle boundary

Keep this PR open and Draft as provenance until #1612 or a verified complete successor reaches protected ancestry and a fresh succession audit confirms that every valid security/public-error delta represented by the generated predecessor is already covered by the canonical lineage. Only then may this PR retire under the verified-succession rule.

Do not restore the generated blanket exc_info=True sweep, add a second sanitizer, self-approve, fabricate statuses, manufacture a wake/no-op commit, force-push, destructively rebase, or weaken the canonical security gates.

@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai

coderabbitai Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@seonghobae
seonghobae marked this pull request as draft September 18, 2026 14:50
@seonghobae seonghobae changed the title 🛡️ Sentinel: [CRITICAL] Fix Exception String Interpolation in Logs generated provenance: duplicate exception logging sweep (#1612/#1698) Sep 18, 2026
@seonghobae seonghobae added maintenance priority: medium Normal-priority or P2 work labels Sep 19, 2026 — with ChatGPT Codex Connector
로그 및 예외 메시지에 예외 객체(예: `f'{e}'`)를 문자열 보간하여 민감한 정보(API 키 등)가 노출될 수 있는 취약점을 수정했습니다.
또한 trivy-fs 보안 취약점 경고를 해결하기 위해 anyio, next, sharp 버전을 업데이트했습니다.
로그 및 예외 메시지에 예외 객체(예: `f'{e}'`)를 문자열 보간하여 민감한 정보(API 키 등)가 노출될 수 있는 취약점을 수정했습니다.
또한 trivy-fs 보안 취약점 경고를 해결하기 위해 anyio, next, sharp 버전을 업데이트했습니다.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance priority: medium Normal-priority or P2 work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant