Skip to content

feat: add iii-guardrails worker#16

Open
rohitg00 wants to merge 1 commit intomainfrom
feat/guardrails
Open

feat: add iii-guardrails worker#16
rohitg00 wants to merge 1 commit intomainfrom
feat/guardrails

Conversation

@rohitg00
Copy link
Copy Markdown

@rohitg00 rohitg00 commented Apr 7, 2026

Summary

  • Safety layer for function I/O with 3 functions
  • PII detection (email, phone, SSN, credit card, IP), injection prevention, secret scanning
  • All regex patterns pre-compiled at startup, default patterns work without config file
  • All through iii primitives: State, Queue, HTTP triggers
  • 30 tests, 0 warnings

Functions

Function Description
guardrails::check_input PII, injection, length violations
guardrails::check_output PII, leaked secrets, length violations
guardrails::classify Lightweight risk classification

Test plan

  • cargo test — 30 tests passing
  • cargo check — 0 warnings
  • E2E tested: detects email, phone, SSN in live requests

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 7, 2026

Warning

Rate limit exceeded

@rohitg00 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 21 minutes and 3 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 21 minutes and 3 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 891e22d1-676c-492a-a107-0d9004153c0b

📥 Commits

Reviewing files that changed from the base of the PR and between 606a4d4 and 5ef8718.

📒 Files selected for processing (14)
  • guardrails/Cargo.toml
  • guardrails/README.md
  • guardrails/SPEC.md
  • guardrails/build.rs
  • guardrails/config.yaml
  • guardrails/src/checks.rs
  • guardrails/src/config.rs
  • guardrails/src/functions/check_input.rs
  • guardrails/src/functions/check_output.rs
  • guardrails/src/functions/classify.rs
  • guardrails/src/functions/mod.rs
  • guardrails/src/main.rs
  • guardrails/src/manifest.rs
  • guardrails/src/state.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/guardrails

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 and usage tips.

Safety layer for function I/O. 3 functions:
- guardrails::check_input — PII, injection, length violations
- guardrails::check_output — PII, leaked secrets, length violations
- guardrails::classify — lightweight risk classification

Default PII patterns: email, phone, SSN, credit card, IP address.
Secret detection: Bearer tokens, OpenAI keys, GitHub PATs, AWS keys, private keys.
All regex patterns pre-compiled at startup.
Uses iii primitives: State (audit trail), Queue (async batch), HTTP triggers.
30 tests, 0 warnings.
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