Add an egress CIDR allowlist to the SSRF guard (closes #204) (#217)
check / check (push) Successful in 3m1s

This commit was merged in pull request #217.
此提交包含在:
2026-08-20 10:34:42 +02:00
父節點 f0512f1c3c
當前提交 03cd1859d7
共有 17 個檔案被更改,包括 1244 行新增 和 61 行删除
+15
查看文件
@@ -21,6 +21,21 @@ func WarnSharedRateLimitBucketForTest(log *slog.Logger) error {
return nil
}
// WarnEgressAllowlistForTest loads a Config from the current
// environment and emits its egress-allowlist startup warning to
// log, so a test can assert both that the warning fires only when
// the list is non-empty and that it names the blocks it opened.
func WarnEgressAllowlistForTest(log *slog.Logger) error {
c, err := loadFromEnv()
if err != nil {
return err
}
c.warnEgressAllowlist(log)
return nil
}
// EnvBoolForTest exposes envBool.
func EnvBoolForTest(key string, defaultValue bool) (bool, error) {
return envBool(key, defaultValue)