Skip to content

fix(ENG-12236): document useDefaultToolRules and add ATS/CRM tool rules#10

Merged
hiskudin merged 1 commit into
mainfrom
fix/document-useDefaultToolRules
Mar 3, 2026
Merged

fix(ENG-12236): document useDefaultToolRules and add ATS/CRM tool rules#10
hiskudin merged 1 commit into
mainfrom
fix/document-useDefaultToolRules

Conversation

@hiskudin

@hiskudin hiskudin commented Mar 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Document the useDefaultToolRules option (default: false) which gates all per-tool risk levels and field rules
  • Add it to Quick Start, API options, Vercel AI SDK example, and Tool-Specific Rules section
  • Add clarifying notes to the base risk table and tool rules section that these only apply when useDefaultToolRules: true is set

Without this documentation, users would expect gmail_* to default to high risk when it actually defaults to medium unless opted in.

Test plan

  • README accurately reflects the useDefaultToolRules behavior in src/core/prompt-defense.ts
  • All code examples include the option where tool-specific behavior is shown

🤖 Generated with Claude Code


Summary by cubic

Document useDefaultToolRules (default: false) and clarify that per‑tool base risk and field‑handling rules are opt‑in, while risky‑field overrides always apply, addressing ENG‑12236/DEF‑1. Adds ATS (ats_) and CRM (crm_) sanitization rules and updates examples and the README tool table.

  • New Features
    • Add ats_* and crm_* rules in config (sanitizationLevel: medium, maxFieldLengths, skipFields).

Written for commit 53764e6. Summary will update on new commits.

Copilot AI review requested due to automatic review settings March 3, 2026 15:57
@hiskudin hiskudin changed the title fix(DEF-1): document useDefaultToolRules option in README fix(ENG-12236): document useDefaultToolRules option in README Mar 3, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Documents the useDefaultToolRules option in @stackone/defender so users understand when built-in per-tool base risk levels and rule behavior apply (and that the default behavior differs unless opted in).

Changes:

  • Updated Quick Start and API examples to include useDefaultToolRules: true where per-tool behavior is being demonstrated.
  • Added clarifying notes that the base risk table and tool-specific rules are opt-in via useDefaultToolRules.
  • Updated the Vercel AI SDK example to include useDefaultToolRules.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
@hiskudin hiskudin force-pushed the fix/document-useDefaultToolRules branch from 2d2da5e to bcf0eda Compare March 3, 2026 16:03
@hiskudin hiskudin changed the title fix(ENG-12236): document useDefaultToolRules option in README fix(ENG-12236): document useDefaultToolRules and add ATS/CRM tool rules Mar 3, 2026

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 1 file

- Document useDefaultToolRules option in Quick Start, API options,
  Vercel AI SDK example, and Tool-Specific Rules section
- Add note that per-tool base risk levels only apply when
  useDefaultToolRules: true is set
- Add sanitization rules for ats_* and crm_* tools (maxFieldLengths,
  skipFields) — previously they only had risky field overrides
- Update README tool table to show actual risky fields for ATS and CRM

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@hiskudin hiskudin force-pushed the fix/document-useDefaultToolRules branch from bcf0eda to 53764e6 Compare March 3, 2026 16:06
@hiskudin hiskudin merged commit a563ad3 into main Mar 3, 2026
3 checks passed
@hiskudin hiskudin deleted the fix/document-useDefaultToolRules branch March 24, 2026 14:54
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