feat: embed mail sender control metadata#1561
Conversation
|
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds documentation for ChangesLark Mail Allow/Blocked Senders Documentation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 markdownlint-cli2 (0.22.1)skills/lark-mail/SKILL.mdmarkdownlint-cli2 v0.22.1 (markdownlint v0.40.0) 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@skills/lark-mail/SKILL.md`:
- Around line 676-678: The permissions table is missing the readonly scope
mapping for the list endpoints, which makes the documented least-privilege setup
incomplete. Update the entries for user_mailbox.allow_senders.list and
user_mailbox.blocked_senders.list in SKILL.md so they include both
mail:user_mailbox.message:readonly and mail:user_mailbox.message:modify,
matching the registered metadata and keeping the table consistent with the other
list methods.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 01614c95-0692-4bbe-921a-23dc8d87c446
📒 Files selected for processing (2)
internal/registry/meta_data_default.jsonskills/lark-mail/SKILL.md
| | `user_mailbox.allow_senders.list` | `mail:user_mailbox.message:modify` | | ||
| | `user_mailbox.allow_senders.batch_remove` | `mail:user_mailbox.message:modify` | | ||
| | `user_mailbox.blocked_senders.list` | `mail:user_mailbox.message:modify` | |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
权限表遗漏了 list 接口的只读 scope 映射
Line 676 和 Line 678 仅写了 mail:user_mailbox.message:modify,但上游注册元数据里这两个 list 方法都支持 mail:user_mailbox.message:readonly 与 mail:user_mailbox.message:modify。当前文档会误导最小权限配置。
✅ 建议修复
-| `user_mailbox.allow_senders.list` | `mail:user_mailbox.message:modify` |
+| `user_mailbox.allow_senders.list` | `mail:user_mailbox.message:readonly` / `mail:user_mailbox.message:modify` |
@@
-| `user_mailbox.blocked_senders.list` | `mail:user_mailbox.message:modify` |
+| `user_mailbox.blocked_senders.list` | `mail:user_mailbox.message:readonly` / `mail:user_mailbox.message:modify` |📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| | `user_mailbox.allow_senders.list` | `mail:user_mailbox.message:modify` | | |
| | `user_mailbox.allow_senders.batch_remove` | `mail:user_mailbox.message:modify` | | |
| | `user_mailbox.blocked_senders.list` | `mail:user_mailbox.message:modify` | | |
| | `user_mailbox.allow_senders.list` | `mail:user_mailbox.message:readonly` / `mail:user_mailbox.message:modify` | | |
| | `user_mailbox.allow_senders.batch_remove` | `mail:user_mailbox.message:modify` | | |
| | `user_mailbox.blocked_senders.list` | `mail:user_mailbox.message:readonly` / `mail:user_mailbox.message:modify` | |
🧰 Tools
🪛 SkillSpector (2.2.3)
[error] 34: [P1] Instruction Override: This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.
Remediation: Remove or rewrite any text that instructs the agent to ignore prompts, override safety rules, or trust unverified content. Ensure skill content cannot be injected to alter agent behavior.
(Prompt Injection (P1))
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@skills/lark-mail/SKILL.md` around lines 676 - 678, The permissions table is
missing the readonly scope mapping for the list endpoints, which makes the
documented least-privilege setup incomplete. Update the entries for
user_mailbox.allow_senders.list and user_mailbox.blocked_senders.list in
SKILL.md so they include both mail:user_mailbox.message:readonly and
mail:user_mailbox.message:modify, matching the registered metadata and keeping
the table consistent with the other list methods.
Sync generated mail registry metadata so user mailbox allow and blocked sender commands are available offline. Refresh the generated mail skill API resource docs.
2ad5d8a to
5e64b60
Compare
Generated by the harness-coding skill.
Sprints
Source specs
This MR was created autonomously. Quality gates were enforced by the repo's own pre-commit hooks.
Summary by CodeRabbit