Skip to content

app: dangerouslySetInnerHTML used to render static marketing copy #2

Description

@joelpeace48-cell

Problem

app/page.tsx renders the hero paragraph through raw HTML injection:

<p
  className="landing-lead"
  dangerouslySetInnerHTML={{ __html: "ModelTrace turns AI usage into <strong>attested facts on-chain</strong>: ..." }}
/>

The only thing this achieves is one <strong> tag. The content is a static
string literal, so there is no XSS today — but it establishes the wrong pattern
in the file most likely to be copied when the next contributor adds a section,
and this is a security-focused protocol whose own source will be read
critically.

What to do

Replace it with JSX:

<p className="landing-lead">
  ModelTrace turns AI usage into <strong>attested facts on-chain</strong>:
  which model ran, under which policy, and what it costs—so procurement,
  finance, and auditors share one neutral layer.
}</p>

Then add an ESLint rule (react/no-danger) so the pattern cannot return
without an explicit, reviewed override.

Acceptance criteria

  • dangerouslySetInnerHTML removed from app/page.tsx
  • Rendered output visually identical
  • react/no-danger enabled in the ESLint config
  • No other occurrences in the codebase

Notes

Good first issue with real value: it is small, verifiable, and it closes the
door behind itself via the lint rule.

Activity

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

Metadata

Metadata

Labels

GrantFox OSSIssue tracked in GrantFox OSSThird CampaignCampaign: Third Campaignarea:appRoutes (app/)difficulty:easySelf-contained; no deep domain context neededpriority:highNeeded for the next milestonetype:securityAuth, funds, secrets, or abuse surface

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions