Skip to content

Validate MIME data before generating tables - #157

Merged
jeremy merged 1 commit into
mainfrom
security/harden-table-generation
Aug 19, 2026
Merged

jeremy merged 1 commit into
mainfrom
security/harden-table-generation

Conversation

@jeremy

@jeremy jeremy commented Aug 13, 2026 •

Copy link
Copy Markdown
Member

Table generation reads Apache Tika XML and emits Ruby source. This change makes that path repeatable and stops before replacing the tables when input or output is invalid.

  • Pin the Tika source by commit and checksum.
  • Verify both downloaded and committed Tika data before generation.
  • Validate MIME fields, offsets, ranges, priorities, and unsupported rules.
  • Serialize source values as data.
  • Write syntax-checked output atomically and verify table parity in the default test task.

It also normalizes the existing HPROF type and the X bitmap parent.

Local validation: bundle exec rake.

@jeremy
jeremy force-pushed the security/harden-table-generation branch from 5f788ad to e0161fe Compare August 18, 2026 09:36
@jeremy jeremy changed the title Harden table generation against hostile MIME data Validate MIME data before generating tables Aug 18, 2026
@jeremy
jeremy force-pushed the security/harden-table-generation branch from e0161fe to c778700 Compare August 18, 2026 09:40
Pin and validate the source XML, serialize its values as Ruby data, and write generated tables atomically. Keep unsupported rules and generated output stable so source changes are explicit in review.
@jeremy
jeremy force-pushed the security/harden-table-generation branch from c778700 to e7c55aa Compare August 18, 2026 18:28
@jeremy
jeremy merged commit 2392341 into main Aug 19, 2026
24 checks passed
@jeremy
jeremy deleted the security/harden-table-generation branch August 19, 2026 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant