fix: strip Content-Length and make hardcoded values configurable (closes #139, #167)#302
Merged
Conversation
added 2 commits
May 27, 2026 09:17
Removes Content-Length from request headers before sending with httpx to prevent LocalProtocolError when placeholder replacement (e.g. <<PROMPT>>) changes the body size. httpx calculates the correct Content-Length from the actual content. Closes msoedov#139
Move hardcoded CSV output paths and max injection attempts to configurable settings via agentic_security.toml using settings_var(). - failures_csv_path (default: failures.csv) - full_log_csv_path (default: full_scan_log.csv) - max_injection_attempts (default: 20) Closes msoedov#167
Owner
|
@Carlos-Projects thx for the patch! LGTM |
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.
Description
Two fixes:
1. LocalProtocolError fix (closes #139)
Strip
Content-Lengthfrom request headers before sending to avoid mismatch when<<PROMPT>>replacement changes body size.2. Hardcoded values to config (closes #167)
Move hardcoded CSV output paths and max injection attempts to
agentic_security.toml:fuzzer.failures_csv_pathfailures.csvfuzzer.full_log_csv_pathfull_scan_log.csvfuzzer.max_injection_attempts20Testing
34/34 pass.
Closes #139
Closes #167