Config file fix#11
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request introduces enhancements to the rustfuzz project by adding support for a TOML-based configuration file, new command-line options, and updates to the payload handling and fuzzing logic. Key changes include:
- Updating the Config struct and CLI parsing to support additional optional fields (crawl, mutate, payloads, openapi, analyze)
- Refactoring command-line argument precedence to override configuration file settings and updating version information
- Adding a comprehensive set of XSS payloads and updating associated files (Cargo.toml, rustfuzz.example.toml)
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/main.rs | Updated Config struct, CLI flags and overrides for improved configuration handling and feature switching |
| rustfuzz.example.toml | Introduced TOML configuration file with example settings |
| payloads/xss.txt | Added new XSS payloads to expand fuzzing capabilities |
| Cargo.toml | Bumped the project version from 3.1.0 to 3.2.0 |
Comments suppressed due to low confidence (1)
src/main.rs:267
- [nitpick] Since an empty string may not be a valid URL for subsequent operations, consider adding explicit validation or error messaging to handle cases where a required URL is missing.
let url = config.url.as_deref().unwrap_or("");
| }; | ||
|
|
||
| // Command-line always overrides config | ||
| // Command-line always overrides config if set |
There was a problem hiding this comment.
[nitpick] Consider consolidating the repetitive command-line override logic for config fields into a helper function to reduce duplication and improve maintainability.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several enhancements to the
rustfuzzproject, including support for configuration files, expanded functionality, and improved usability. Key changes include the addition of a TOML-based configuration file, new command-line options, and updates to the payload handling and fuzzing logic.Configuration and CLI Enhancements:
rustfuzz.example.toml) to simplify and centralize settings management. New options includecrawl,mutate,payloads, andopenapi.Configstruct insrc/main.rsto include new fields such ascrawl,mutate, andpayloads, allowing for more flexible configuration.--configoption, enabling users to load settings from a configuration file. Command-line arguments now override configuration file values.Payload and Fuzzing Improvements:
payloads/xss.txtto expand the fuzzing capabilities.crawl,mutate, andpayloads.Version and Metadata Updates:
rustfuzzfrom3.1.0to3.2.0inCargo.tomlandsrc/main.rs. [1] [2]OpenAPI and Analysis Enhancements:
openapiconfiguration option, providing a foundation for future improvements in endpoint parsing.These changes significantly improve the flexibility, usability, and functionality of
rustfuzz, making it a more robust tool for web fuzzing and endpoint discovery.Closes #9