fix(security): drop URLhaus feed, validate CIDR ranges, pass unknown client IPs
Gitea Actions Runner Test / test-job (push) Successful in 0s
CI / check (push) Successful in 31s
CI / tests-integration (push) Successful in 1m42s
CI / tests-unit (push) Successful in 1m46s
CI / tests-ui (push) Successful in 2m35s
CI / preflight (push) Skipped
CI / deploy (push) Successful in 1m40s

This commit is contained in:
openhands committed 2026-09-24 19:19:22 +02:00
1 parent 7392b843ad
commit 7f6febf906
4 files changed
+78 -12

No files matched your search

+9
View File
@@ -248,6 +248,15 @@ describe("anti-DDoS automatic CrowdSec blocks", () => {
expect(fetchMock).not.toHaveBeenCalled();
});
it("passes the unknown-IP sentinel through even when a stale block key exists", async () => {
state.map.set("antiddos:block:0.0.0.0", "1");
const decision = await enforceDdosRateLimit(directRequest("0.0.0.0"));
expect(decision.outcome).toBe("pass");
expect(fetchMock).not.toHaveBeenCalled();
});
it("blocks immediately on a local LAPI ban decision (app-layer bouncer)", async () => {
vi.stubEnv("CROWDSEC_LOCAL_ENABLED", "true");
vi.stubEnv("CROWDSEC_LAPI_URL", "http://127.0.0.1:18080");