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

Reduce crate size by excluding fuzz/ and record/ #1281

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
BurntSushi merged 1 commit into rust-lang:master from erickt:master
Aug 23, 2025

Conversation

@erickt
Copy link
Contributor

@erickt erickt commented Aug 22, 2025
edited
Loading

The fuzz/ and record/ directories are about 2MiB, and are not used by the end user. This removes them from the crate for future publishes.

Also, this avoids risk of an xz-style attack leveraging the binary files produced by fuzzing, where malicious code could be slipped in past review through binary test data.

sigmavirus24 reacted with heart emoji
The fuzz/ and record/ directories are about 2MiB, and are not used by
the end user. This removes them from the crate for future publishes.
Also, this avoids risk of an [xz-style attack] leveraging the binary
files produced by fuzzing, where malicious code could be slipped in past
review through binary test data.
[zx-style attack]: https://en.wikipedia.org/wiki/XZ_Utils_backdoor 
Copy link
Member

@BurntSushi BurntSushi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@BurntSushi BurntSushi merged commit 71233b5 into rust-lang:master Aug 23, 2025
16 checks passed
erickt added a commit to erickt/regex that referenced this pull request Aug 25, 2025
I missed more binary test data `tests/fuzz/` in rust-lang#1281, which should
remove another 56KiB from the regex crate.
BurntSushi pushed a commit that referenced this pull request Aug 25, 2025
I missed more binary test data `tests/fuzz/` in #1281, which should
remove another 56KiB from the regex crate.
PR #1289 
weiznich added a commit to GiGainfosystems/regex that referenced this pull request Oct 14, 2025
During a dependency review I noticed that regex-automata includes binary
fuzzing and test data. These files are not required for building regex-automata as
dependency and make it a hard to review the code. This is similar to rust-lang#1281
This commit introduces a `include` directive in the `Cargo.toml` file to
explicitly include only those files required to build `regex-automata`. This
excludes the test directory and also reduces the size of the
published crate from 122 files, 2.6MiB (610.6KiB compressed) to
77 files, 2.5MiB (584.0KiB compressed) which results in a 150 GB/month
traffic reduction for crates.io assuming the current 6 million/month
downloads and the difference in the compressed package size.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@BurntSushi BurntSushi BurntSushi approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /