- Notifications
You must be signed in to change notification settings - Fork899
[WIP] Invisible character filtering#426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
@copilot continue please |
Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
I've implemented content filtering for issues, PRs, and comments. The implementation includes:
The changes have been committed in67d6012. All handlers now automatically filter content by default, but the feature can be disabled with the |
smallTextRegex = regexp.MustCompile(`<[^>]*style="[^"]*font-size:\s*(?:0|0\.\d+|[0-3])(?:px|pt|em|%)[^"]*"[^>]*>[\s\S]*?</[^>]+>`) | ||
// Excessive whitespace (more than 3 consecutive newlines) | ||
excessiveWhitespaceRegex = regexp.MustCompile(`\n{4,}`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
@copilot perhaps also add a filter for excessive spaces and tabs too. Probably for spaces 15+ and for tabs 6+
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I've added filters for excessive spaces and tabs as requested. The implementation filters sequences of 15+ consecutive spaces and 6+ consecutive tabs, replacing them with normalized versions (14 spaces and 5 tabs respectively). Changes are in commit2e27e2a.
Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
Uh oh!
There was an error while loading.Please reload this page.
Added a flag
--disable-content-filtering
to the CLI that allows security researchers to bypass the content filtering. By default, content filtering is enabled.Fixes#415.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn moreCopilot coding agent tips in the docs.