Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Draft
Copilot wants to merge5 commits intomain
base:main
Choose a base branch
Loading
fromcopilot/fix-415
Draft

Conversation

Copilot
Copy link

@CopilotCopilotAI commentedMay 23, 2025
edited
Loading

  • Create a new package for content filtering with functions to filter invisible characters and hidden content
  • Add a flag to enable/disable content filtering in the CLI
  • Update server configuration to include the content filtering flag
  • Modify issue/PR/comment handlers to apply filtering to body content
  • Write tests to verify filtering works correctly
  • Update documentation to mention the content filtering feature

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.

CopilotAIand others added2 commitsMay 23, 2025 10:51
Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
@SamMorrowDrums
Copy link
Collaborator

@copilot continue please

Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
@CopilotCopilot SWE Agent
Copy link
Author

@copilot continue please

I've implemented content filtering for issues, PRs, and comments. The implementation includes:

  1. Creating filters for all relevant GitHub objects (issues, PRs, comments)
  2. Applying filters in all handlers that return content
  3. Writing tests for the filtering functionality
  4. Updating documentation to explain the feature

The changes have been committed in67d6012. All handlers now automatically filter content by default, but the feature can be disabled with the--disable-content-filtering flag.

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,}`)
Copy link
Collaborator

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+

Copy link
Author

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>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@SamMorrowDrumsSamMorrowDrumsSamMorrowDrums left review comments

At least 1 approving review is required to merge this pull request.

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Invisible character filtering
2 participants
@Copilot@SamMorrowDrums

[8]ページ先頭

©2009-2025 Movatter.jp