tests: pin probe-verified behaviors of the recently merged plugin fixes#70
Merged
Merged
Conversation
Each of these was verified by hand (CLI probes, and runtime checks against nginx 1.27 in docker) while reviewing #62-#67 but had no test pinning it: - status_page_exposed: http-level allow/deny inheritance; a location whose own partial rules replace the inherited ones (all-or-nothing merge) is flagged again. - return_bypasses_allow_deny: 'rewrite ... break' with a URI replacement reaches the access phase (not flagged); a $scheme:// replacement redirects even under 'break' (flagged); the absolute-URL prefix check is case-sensitive like nginx's, so 'HTTP://' does not count. - unanchored_regex: \A/\Z string anchors; a lookahead carrying the anchor; min>=1 repeats anchor while min=0 repeats do not; an escaped backslash before 'z' is not a \z anchor. - allow_without_deny: auth_jwt participates in the satisfy-any suppression; an explicit 'satisfy all' still warns. - invalid_regex: the set-outside-if fallback path (flag without a provider, stay quiet with one); an unparseable provider regex silences the whole-scope check; add_header and try_files are audited; a static map key spelled 'map' is skipped without crashing while the sibling regex entry is still validated.
…anged The first commit pinned the NEW behaviors; these pin the behaviors that were already correct before #62-#67 and had no test keeping them that way: - return_bypasses_allow_deny: a flagless rewrite with a URI replacement is not a bypass; the named-location pruning applies to redirecting rewrites just as it does to return. - unanchored_regex: prefix (non-regex) locations are never flagged; '~*' case-insensitive regexes still are; a PCRE-only pattern the vendored parser cannot read stays quiet instead of crashing. - allow_without_deny: auth alone (no 'satisfy any') still warns; a sibling location's satisfy/auth does not leak into another location's allow. - invalid_regex: $12 against a captureless pattern reports $1 (single digit), not $12; the whole-scope union spans sibling locations of the same server; static/default map values are never validated against their key. - status_page_exposed: stub_status directly in server context is still audited.
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.
Each of these was verified by hand (CLI probes, and runtime checks against nginx 1.27 in docker) while reviewing #62-#67 but had no test pinning it: