review(mod_whp_proxy_guard): None clears scrub/deny lists; probe test is a CI publish gate
Independent review of PR #62 (adversarial probes, combined #59+#60+#61+#62 image): - WHPProxyScrubEnv None / WHPDenyHandler None now empty the list set so far in that context, as WHPProxyAllow None already did. Before, None was only skipped, so a later file (the WHP drop-in) could not switch an image default off at server scope. - build-push.yaml: shellcheck the probe test and run it as a fatal publish gate against the amd64 shared-httpd image by digest (before arm64 and tag assembly), like #60 does for mod_whp_symlink. WHP_PGTEST_REQUIRE=1 turns the local SKIPs (no docker / no image) into failures there. - probe test: `<If><If> SetHandler proxy:http://` accepts "not proxied" (static served) as well as 403: on the #59 image mod_proxy_http is gone and mod_proxy cannot canonicalise the URL; the SSRF-target hit counter still asserts that nothing reached the target. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0185ukXi4YX5FxJGqhi6qab6
This commit is contained in:
1 parent
5f8597363e
commit
c83e4d847f
3 files changed
+32
-5
No files matched your search
@@ -255,7 +255,11 @@ static const char *cmd_scrub(cmd_parms *cmd, void *d, const char *arg)
|
||||
&whp_proxy_guard_module);
|
||||
if (!c->scrub)
|
||||
c->scrub = apr_array_make(cmd->pool, 4, sizeof(const char *));
|
||||
if (strcasecmp(arg, "none"))
|
||||
/* `None` empties the list set so far in this context (same as
|
||||
* WHPProxyAllow None), so a later file can switch the image default off. */
|
||||
if (!strcasecmp(arg, "none"))
|
||||
apr_array_clear(c->scrub);
|
||||
else
|
||||
*(const char **)apr_array_push(c->scrub) = arg;
|
||||
return NULL;
|
||||
}
|
||||
@@ -266,7 +270,9 @@ static const char *cmd_deny_handler(cmd_parms *cmd, void *d, const char *arg)
|
||||
&whp_proxy_guard_module);
|
||||
if (!c->deny_handler)
|
||||
c->deny_handler = apr_array_make(cmd->pool, 8, sizeof(const char *));
|
||||
if (strcasecmp(arg, "none"))
|
||||
if (!strcasecmp(arg, "none")) /* see cmd_scrub */
|
||||
apr_array_clear(c->deny_handler);
|
||||
else
|
||||
*(const char **)apr_array_push(c->deny_handler) = arg;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user