Repository navigation
Flag response tests that never reach albedo's reflected body - #6
Merged
Merged
Conversation
albedo's /reflect parses the request as a JSON reflection spec and returns only its body field, so a plain string or JSON without body leaves RESPONSE_BODY without the payload and a negative test passes vacuously. Seen on coreruleset/coreruleset#4833.
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.
what
The go-ftw test instructions now flag response-phase tests (RESPONSE-95x) whose
/reflectrequest is not an albedo reflection spec with abody(orencodedBody) field. They also tell the reviewer not to flag the requestContent-Type, which albedo ignores.why
albedo's
/reflectparses the request body as JSON and returns onlybody. Against the pinnedalbedo:0.3.0, a plain string gets400 Invalid JSON in request bodyand JSON withoutbodyreturns an empty response, so the payload never reachesRESPONSE_BODYand a negative test passes without testing anything. CodeRabbit caught this on coreruleset/coreruleset#4833, but the learning it saved is scoped to that one file. Tests 1–6 in953100.yamlhave the same problem, so it is not a one-off.refs
/reflecthandlerai disclosure
bodyand{"body": ...}to confirm the three responses;yamllint -d relaxedandcheck-jsonschemaagainst the v2 schema pass