Fix web testing flag completion and safe log rendering#143
Open
Ledraw wants to merge 1 commit into
Open
Conversation
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.
Summary
This PR fixes two issues found while running
WebTestingWithExplanationagainst CTF-style web targets:Root Cause
Rich MarkupError in logger output
LocalLoggerandRemoteLoggerpassed raw message/tool output directly intorich.panel.Panel.Rich parses plain strings as markup by default. If an HTTP response contains binary-looking content or text such as
[/...], Rich treats it as a closing markup tag and raisesMarkupError.This can happen when the web testing agent requests resources such as favicon, images, fonts, archives, or arbitrary binary/text responses.

WebTestingWithExplanation did not stop after unknown CTF flags
SubmitFlagonly accepted flags from the preconfiguredflagslist. This works for known benchmark flags, but real CTF flags are often unknown before discovery.As a result, when the model found and submitted a valid CTF flag that was not preconfigured, the tool returned

Not a valid flag, the success callback was not called, and the run continued instead of stopping.Changes
rich.text.Text.accept_any_flagsupport toSubmitFlag.accept_any_flagby default forWebTestingWithExplanation.--accept_any_flag=False.Testing