fix(llm): allow course management operations in guardrails#321
Conversation
|
Claude finished @zaira-bibi's task in 1m 44s —— View job Review Complete
OverviewThis PR updates two guardrail layers — the system prompt ( Critical / Blocking Issues1. Overly broad MCP tool exemption in system prompt (Medium-High) The new wording on line 8 of
This creates a blanket exemption for all MCP tool invocations, not just course management ones. A prompt injection payload (e.g. embedded in user-supplied course content) could exploit this to justify invoking arbitrary tools. The original guardrail was a single clear constraint — this change introduces an open-ended escape hatch. Recommendation: Replace with a scoped exemption that names the allowed category (course management on LMS platforms) rather than exempting all MCP tool usage. See inline suggestion. 2. Missing test coverage (Blocking per repo guidelines) The CLAUDE.md mandates TDD — tests must exist for new functionality. This PR modifies both classifier and system prompt behavior but adds no tests verifying that course management queries (e.g. "publish my course to Canvas", "list all modules in my Open edX course") are now classified as in-scope. The existing test file at
Suggestions (Non-blocking)
Previous Review CommentsNo prior review threads found. Overall AssessmentThe intent is sound — course management operations should be in-scope for the assistant. The classifier update (line 31) is well-scoped and specific. However, the system prompt change introduces a broader exemption than intended, and the PR lacks test coverage. I'd recommend addressing the prompt wording and adding tests before merging. |
014fa28 to
336395c
Compare
|
Claude finished @zaira-bibi's task in 2m 25s —— View job
OverviewThis PR updates two guardrail layers — the system prompt ( Previous Review Comments
Current AssessmentThe main security concern from the previous review has been addressed. Line 8 now scopes the exemption to "course creation and instructional design tasks — including using available plugin tools to publish, retrieve, and manage courses on LMS platforms" rather than blanket-exempting all MCP tool usage. Remaining Issues
SummaryThe security improvement from the previous review is properly addressed. The classifier update ( |
336395c to
4912811
Compare
|
Claude finished @zaira-bibi's task in 1m 58s —— View job
OverviewThis PR updates two guardrail layers — the system prompt ( Previous Review Comments
All 5 previous review threads are now resolved. Current AssessmentAll issues from the previous two reviews have been addressed. The changes are clean:
Remaining Note
SummaryThis PR is in good shape. The security concern from the first review is properly resolved, all style feedback has been incorporated, and "deploying" was removed to avoid ambiguity. The classifier and system prompt changes are well-aligned and appropriately scoped. |
What
Allow course management operations in guardrails by removing restrictions on actions such as course publishing, retrieval, and related management workflows.
Changes
fix(llm): Update guardrails and scope classifier to allow authorized course operations without being blocked by existing guardrail constraints.How to Test
Notes
None