fix(tasks): hide framework-specific info irrelevant to org#2381
fix(tasks): hide framework-specific info irrelevant to org#2381
Conversation
Resolves SALE-3 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PR SummaryMedium Risk Overview Adds Written by Cursor Bugbot for commit e97dfdd. This will update automatically on new commits. Configure here. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| return isLabelActive(label, activeLabels); | ||
| }); | ||
|
|
||
| return filtered.join('\n\n').trim(); |
There was a problem hiding this comment.
Filter misses framework content in multi-paragraph format
High Severity
The paragraph-level filter only removes paragraphs that themselves start with "For :", but several real seed data entries use a multi-paragraph format where the header "For GDPR:\n\n" is in one paragraph and the framework-specific content is in the next. After split(/\n\n+/), the header paragraph gets removed but the content paragraph stays because it lacks a "For X:" prefix. This leaks framework-specific information that the feature is explicitly designed to hide. Affected seed entries include "Public Policies", "Incident Response", "Board Meetings & Independence", and "Diagramming".
| * beginning of a paragraph (after optional whitespace / newlines). | ||
| */ | ||
| const FOR_FRAMEWORK_LINE_RE = | ||
| /^[ \t]*For\s+([A-Za-z0-9][A-Za-z0-9 .\-/]*?)\s*:/im; |
There was a problem hiding this comment.
Multiline regex flag matches interior lines in paragraphs
Low Severity
The m (multiline) flag on FOR_FRAMEWORK_LINE_RE causes ^ to match at the start of any line, not just the start of the paragraph string. After split(/\n\n+/), a paragraph can still contain single \n characters. If a paragraph has generic text on line one and "For HIPAA:" on a subsequent line (separated by \n), the regex matches the interior line, and the entire paragraph — including the unrelated generic text — gets filtered out. Removing the m flag would restrict matching to the actual paragraph start, matching the documented intent.


Summary
filterDescriptionByFrameworks()utility with framework alias map (e.g., "PCI" matches "PCI DSS")Promise.all— no extra latencyTest plan
Resolves SALE-3
🤖 Generated with Claude Code