Skip to content

Commit 87eea43

Browse files
gitcommit90claude
andcommitted
test: use exact status URL comparisons
Resolve CodeQL's incomplete URL substring sanitization findings in the delivery status test stub. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Joseph Yaksich <gitcommit90@users.noreply.github.com>
1 parent 6b0a35f commit 87eea43

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎test/delivery-status.mjs‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ test("website probing uses the structured health identity instead of scraping HT
161161
const site = report.environments.find(({ id }) => id === "website");
162162
assert.equal(site.health, "healthy");
163163
assert.equal(site.version, "0.0.41");
164-
assert.ok(urls.includes("https://site.example/health"));
165-
assert.ok(!urls.includes("https://site.example/"));
164+
const requested = urls.map((value) => new URL(value));
165+
assert.ok(requested.some((url) => url.origin === "https://site.example" && url.pathname === "/health" && url.search === "" && url.hash === ""));
166+
assert.ok(!requested.some((url) => url.origin === "https://site.example" && url.pathname === "/" && url.search === "" && url.hash === ""));
166167
});

0 commit comments

Comments
 (0)