Skip to content

fix(web): harden ProductOffersExplorer, ProductShareAuditButton, and ProductValueCalculator bounds #1055

Closed

Description

@JOY

Problem

  1. \�pps/web/src/components/leaderboard/ProductOffersExplorer.tsx:
    • \isSafeExternalOfferUrl(url)\ only checks \parsed.protocol === 'http:' || parsed.protocol === 'https:', allowing URLs with control characters, embedded credentials (\username/\password), or oversized lengths (>2048 chars).
    • \handleCopyOffersMarkdown\ does not strip control characters from \productName, \platform, \merchant.name, or \priceSpreadAudit\ merchant fields, and \safeSlugFileToken\ does not strip control characters or cap length.
    • \dosafe_risk_score\ and
      eview_risk_score\ are rendered and exported to CSV without clamping to [0, 100].
  2. \�pps/web/src/components/leaderboard/ProductShareAuditButton.tsx:

    • ormalizeShareAuditFields\ does not cap \safeAuthenticReviews\ or \safeOfferCount\ upper bounds (<= 10_000_000), nor strip control characters / cap length (<= 80) on \safeModelKeyToken.

    • ame, \�rand, \modelKey, and \keySpecLine\ are interpolated into Markdown and JSON exports without stripping control characters.
  3. \�pps/web/src/components/leaderboard/ProductValueCalculator.tsx:
    • \safeCategoryFileToken\ and \safeValueCriterionScore5\ are computed inline without exported helpers or control-character stripping / length bounds (<= 80\ chars).

Acceptance Criteria

  • Harden \isSafeExternalOfferUrl\ and export \sanitizeOffersMarkdownCell, \sanitizeOffersFileToken, and \sanitizeOfferRiskScore100\ in \ProductOffersExplorer.tsx.
  • Harden
    ormalizeShareAuditFields\ and export \sanitizeShareAuditText\ in \ProductShareAuditButton.tsx.
  • Export \sanitizeValueCalcFileToken\ and \sanitizeValueCriterionScore5\ in \ProductValueCalculator.tsx\ and apply them to TCO calculations and exports.
  • Add unit test suite [126h/135]\ in \core-rate-architecture.test.ts.

Activity

  1. self-assigned this
    on Oct 25, 2026
  2. JOY commented on Oct 26, 2026

    @JOY
    ContributorAuthor

    Handoff (2026-10-26): the Antigravity "Rate" (web) agent ran out of quota mid-task. Its uncommitted work is now committed and pushed as branch fix/offers-share-audit-and-value-calc-bounds (b53112f), with draft PR #1096. That PR's body lists the state and next steps:

    The claim stays agent:web. Another agent needs a hand-over (board.mjs --take-over) to continue.

  3. JOY commented on Oct 26, 2026

    @JOY
    ContributorAuthor

    🤖 [Agent: Web] A new Claude Code session took over this issue from the handoff. Next: sync #1096 with dev, verify every acceptance point, run an independent review, then merge when green.

  4. added
    status:in-reviewTask completed and waiting for review / PR merge
    and removed
    status:in-progressTask currently claimed and being worked on by an Agent
    on Oct 26, 2026
  5. added
    status:doneTask completed and verified
    and removed
    status:in-reviewTask completed and waiting for review / PR merge
    on Oct 26, 2026
  6. JOY commented on Oct 26, 2026

    @JOY
    ContributorAuthor

    ✅ [Agent: Web] Completed in #1096 (squash 90b9a51). All required checks green (Typecheck & Build Monorepo, E2E (Playwright), Secret scan (gitleaks), task-claim). Remaining P3 review notes: #1099.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

agent:webClaimed by Agent: Webstatus:doneTask completed and verified

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions