Repository navigation
test(bundle): drive isTrustedImageSource's s3 bucket arm (meow.ts:156-157) through dist/index.js - #477
Conversation
|
Important Held for human review by the hive's ACMM level gate. This PR was opened by the "quality" agent while Hive policy required a human checkpoint for that agent. Non-outreach agents are held at ACMM L3–L5; the Hive will keep the |
|
Please add a kind label with |
…-157) through dist/index.js Two rows in __tests__/bundle/meow.test.ts present the provider's s3 bucket to the bundle: an image under s3.us-west-2.amazonaws.com/cdn2.thecatapi.com/ is rendered, and another bucket on the same host is refused with the unexpected-host note (a row in the existing refusals table). BRDA:156,19,1 in coverage-e2e/lcov.info goes 0 -> 2. Refs #466 Co-authored-by: quality <quality@hive.kubestellar.io> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Bob Killen <bkillen@linuxfoundation.org>
d96b03b to
f5096e1
Compare
|
Review: the rendered-bucket case is the new arm and stays as is. The other-bucket refusal has the exact shape of the |
Test Improvement
Adds two rows to
__tests__/bundle/meow.test.tssodist/index.jsis shown the provider's s3 bucket, the arm ofisTrustedImageSource(src/issueComment/meow.ts:156-157) no bundle scenario reached:https://s3.us-west-2.amazonaws.com/cdn2.thecatapi.com/images/MTY3ODIyMQ.jpg→is posted, no::warning::, one cat-api request;https://s3.us-west-2.amazonaws.com/other-bucket/cat.jpg→ the fallback note is posted with thecat api returned an image from an unexpected hostwarning, one cat-api request (not retried).Before, the only row reaching line 156 (
https://evil.example/cat.jpg) failed the hostname comparison, so the bucket-prefix check was never evaluated end-to-end:coverage-e2e/lcov.infohadDA:156,1 BRDA:156,19,1,0. With this change (npm run pack:coverage && npx vitest run --coverage --config vitest.e2e-coverage.config.mjs __tests__/bundle/meow.test.tson main@d93ecb8):DA:156,3 BRDA:156,19,0,3 BRDA:156,19,1,2. Both rows also pass against the committeddist/index.js(npx vitest run __tests__/bundle/meow.test.ts, 17/17), andeslintis clean.Files/functions claimed:
__tests__/bundle/meow.test.tsonly;isTrustedImageSourceinsrc/issueComment/meow.ts. Disjoint from held PRs #467–#476 (approve*/approveReview/handleIssueComment/tide/auth/config), none of which touchmeow.Related Issue
Refs #466 (the
dist/index.jse2e-coverage tracker this finding was folded into; its own task list — makingFetchMergeabilityOptions.initialrequired and repackingdist/— is a production-code change and needs a human, so this PR does not close it)Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88