Skip to content

Security: Raw exception details returned to caller in DTMF tool#5308

Open
tuanaiseo wants to merge 1 commit intolivekit:mainfrom
tuanaiseo:contribai/fix/security/raw-exception-details-returned-to-caller
Open

Security: Raw exception details returned to caller in DTMF tool#5308
tuanaiseo wants to merge 1 commit intolivekit:mainfrom
tuanaiseo:contribai/fix/security/raw-exception-details-returned-to-caller

Conversation

@tuanaiseo
Copy link
Copy Markdown

Problem

send_dtmf_events catches broad exceptions and returns str(e) directly to the tool caller. Provider/SDK exceptions can include internal endpoint details, request metadata, or other sensitive context that should not be exposed to end users.

Severity: medium
File: livekit-agents/livekit/agents/beta/tools/send_dtmf.py

Solution

Catch expected exception types and return sanitized user-safe errors. Log full exception details server-side with redaction controls instead of returning raw exception text.

Changes

  • livekit-agents/livekit/agents/beta/tools/send_dtmf.py (modified)

Testing

  • Existing tests pass
  • Manual review completed
  • No new warnings/errors introduced

`send_dtmf_events` catches broad exceptions and returns `str(e)` directly to the tool caller. Provider/SDK exceptions can include internal endpoint details, request metadata, or other sensitive context that should not be exposed to end users.

Affected files: send_dtmf.py

Signed-off-by: tuanaiseo <221258316+tuanaiseo@users.noreply.github.com>
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

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.

2 participants