Skip to content

fix: strip Content-Length and make hardcoded values configurable (closes #139, #167)#302

Merged
msoedov merged 2 commits into
msoedov:mainfrom
Carlos-Projects:main
May 27, 2026
Merged

fix: strip Content-Length and make hardcoded values configurable (closes #139, #167)#302
msoedov merged 2 commits into
msoedov:mainfrom
Carlos-Projects:main

Conversation

@Carlos-Projects
Copy link
Copy Markdown

@Carlos-Projects Carlos-Projects commented May 27, 2026

Description

Two fixes:

1. LocalProtocolError fix (closes #139)

Strip Content-Length from 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:

Setting Default
fuzzer.failures_csv_path failures.csv
fuzzer.full_log_csv_path full_scan_log.csv
fuzzer.max_injection_attempts 20

Testing

python -m pytest tests/unit/ -q

34/34 pass.

Closes #139
Closes #167

Carlos 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
@Carlos-Projects Carlos-Projects changed the title fix: strip Content-Length before sending to avoid LocalProtocolError (closes #139) fix: strip Content-Length and make hardcoded values configurable (closes #139, #167) May 27, 2026
@msoedov
Copy link
Copy Markdown
Owner

msoedov commented May 27, 2026

@Carlos-Projects thx for the patch! LGTM

@msoedov msoedov merged commit 40e5986 into msoedov:main May 27, 2026
1 of 3 checks passed
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.

Hardcoded Values in fuzzer.py LocalProtocolError /verify

2 participants