Skip to content

Reject malformed parent secret responses without panicking#227

Open
AnthonyRonning wants to merge 1 commit into
masterfrom
codex-opensecret-parent-secret-parser-opensecret
Open

Reject malformed parent secret responses without panicking#227
AnthonyRonning wants to merge 1 commit into
masterfrom
codex-opensecret-parent-secret-parser-opensecret

Conversation

@AnthonyRonning

@AnthonyRonning AnthonyRonning commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • isolate parsing of secret responses received from the Nitro parent
  • return normal errors for malformed JSON, non-string payloads, and invalid secret shapes instead of panicking or silently returning an empty value
  • require exactly one string-valued field in the decoded Secrets Manager object
  • cover valid, truncated, malformed, unexpected-type, non-string, empty, and multi-field responses with deterministic tests

Security boundary

This response is read from the internal Nitro parent over vsock CID 3 / port 8003. The existing read path is capped at 256 KiB and uses 30-second I/O timeouts, and the audit found no public or customer-controlled route into this parser. This PR hardens that internal trust boundary without changing the wire format.

Validation

  • cargo fmt --all -- --check
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo test parent_secret_response_tests -- --nocapture (6 passed)
  • cargo test --all-targets --all-features (219 passed, 16 existing database-dependent tests ignored)

Open in Devin Review

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 31 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: bad70f25-244d-4283-8c2b-184c0e24bdd2

📥 Commits

Reviewing files that changed from the base of the PR and between a3ecc93 and 3f70363.

📒 Files selected for processing (2)
  • src/main.rs
  • src/parent_secret_response_tests.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex-opensecret-parent-secret-parser-opensecret

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

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

Copy link
Copy Markdown
Contributor

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 potential bugs to report.

View in Devin Review to see 1 additional finding.

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.

1 participant