Skip to content

fix: add TSV (text/tab-separated-values) support to content scanner#1645

Merged
Aaronontheweb merged 2 commits into
devfrom
feature/tsv-support
Jul 15, 2026
Merged

fix: add TSV (text/tab-separated-values) support to content scanner#1645
Aaronontheweb merged 2 commits into
devfrom
feature/tsv-support

Conversation

@Aaronontheweb

Copy link
Copy Markdown
Collaborator

Closes #1632.

The content scanner rejected TSV files with MIME type text/tab-separated-values as unsupported. TSV is plain tab-delimited text — identical in structure to CSV — so it uses the same AnyContent byte-signature matcher.

Changes:

  • MimeTypeCatalog: Added TextTsv constant, definition entry, and extension-to-MIME normalization override (.tsv declared as text/plain → normalized to text/tab-separated-values)
  • MagicByteValidator: Registered text/tab-separated-values in the signature matcher dictionary
  • ContentPolicy: TSV is automatically included in DefaultAllowedMimeTypes since it derives from the catalog
  • Tests: Added coverage for scanner acceptance, MIME normalization, and WebFetch fallback extension

All 97 security tests and 6 WebFetch tests pass.

Add TSV alongside CSV as a supported text MIME type. TSV files are
plain tab-delimited text with no magic bytes, so they use the same
AnyContent matcher as CSV. Updates the MIME catalog, validator, and
extension-to-MIME normalization override.
@Aaronontheweb Aaronontheweb added the security Security-related changes label Jul 15, 2026
@Aaronontheweb
Aaronontheweb enabled auto-merge (squash) July 15, 2026 00:41
@Aaronontheweb
Aaronontheweb merged commit 8a16c61 into dev Jul 15, 2026
36 checks passed
@Aaronontheweb
Aaronontheweb deleted the feature/tsv-support branch July 15, 2026 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

security Security-related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Content scanner rejects TSV files — MIME type text/tab-separated-values not supported

1 participant