Skip to content

fix(engine): redact secret-shaped titles from the public-safe results summary#7279

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
bitfathers94:fix/issue-7249
Jul 19, 2026
Merged

fix(engine): redact secret-shaped titles from the public-safe results summary#7279
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
bitfathers94:fix/issue-7249

Conversation

@bitfathers94

Copy link
Copy Markdown
Contributor

fix(engine): redact secret-shaped titles from the public-safe results summary

buildResultsPayload documents ResultsPayload.summary as a public-safe
sentence, but spliced result.title in verbatim. That title is
contributor/miner-authored free text, so a secret-shaped token in it
flowed straight into the customer-facing summary unredacted — violating
the module's own contract, unlike sibling composers (pr-body-draft,
gate-advisory) that scrub free text first.

Run result.title through the package's shared redactSecrets primitive
before embedding it, leaving benign titles byte-for-byte unchanged.

Closes #7249

… summary

buildResultsPayload documents ResultsPayload.summary as a public-safe
sentence, but spliced result.title in verbatim. That title is
contributor/miner-authored free text, so a secret-shaped token in it
flowed straight into the customer-facing summary unredacted — violating
the module's own contract, unlike sibling composers (pr-body-draft,
gate-advisory) that scrub free text first.

Run result.title through the package's shared redactSecrets primitive
before embedding it, leaving benign titles byte-for-byte unchanged.

Closes JSONbored#7249
@bitfathers94
bitfathers94 requested a review from JSONbored as a code owner July 19, 2026 12:06
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jul 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.81%. Comparing base (c743eca) to head (8ebc614).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7279   +/-   ##
=======================================
  Coverage   93.81%   93.81%           
=======================================
  Files         704      704           
  Lines       69458    69459    +1     
  Branches    18896    18896           
=======================================
+ Hits        65163    65164    +1     
  Misses       3302     3302           
  Partials      993      993           
Flag Coverage Δ
shard-1 43.61% <100.00%> (+<0.01%) ⬆️
shard-2 37.34% <100.00%> (+0.10%) ⬆️
shard-3 33.18% <0.00%> (+0.08%) ⬆️
shard-4 33.74% <0.00%> (-0.59%) ⬇️
shard-5 32.89% <100.00%> (+0.71%) ⬆️
shard-6 45.49% <100.00%> (-0.30%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
packages/loopover-engine/src/results-payload.ts 100.00% <100.00%> (ø)

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 19, 2026
@loopover-orb

loopover-orb Bot commented Jul 19, 2026

Copy link
Copy Markdown

Tip

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-19 12:17:04 UTC

2 files · 1 AI reviewer · no blockers · readiness 95/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This fixes a real contract violation: buildResultsPayload's summary field is documented as public-safe but previously spliced result.title (contributor-authored free text) verbatim, allowing secret-shaped tokens to leak into the customer-facing summary. The fix runs the title through the existing redactSecrets primitive before interpolation, matching the pattern already used by sibling composers (pr-body-draft, gate-advisory). Tests cover both the redaction case and the byte-for-byte-unchanged benign case, and CI is green.

Nits — 3 non-blocking
  • The import 'redactSecrets' comes from './subprocess-env.js' (results-payload.ts:6) — an odd module name for a text-redaction utility; consider whether this belongs in a more aptly-named shared module for discoverability.
  • No test covers a title containing multiple secret-shaped tokens or one where the secret sits at the very start/end of the title string, though the core replacement logic is presumably already covered elsewhere by redactSecrets' own unit tests.
  • Consider adding a one-line note in the ResultsPayload.summary JSDoc that titles are now redacted, so future readers don't have to trace into buildResultsPayload to learn the contract is actually enforced (results-payload.ts:34).

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #7249
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ⚠️ 20/25 Preflight is ready, but the PR body does not name the validation run.
Contributor workload ✅ 10/10 Author activity: 38 registered-repo PR(s), 25 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor bitfathers94; Gittensor profile; 38 PR(s), 0 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: moderate
Linked issue satisfaction

Addressed
The diff imports the package's existing redactSecrets primitive and applies it to result.title before splicing into summary, matching the sibling pattern used in pr-body-draft/gate-advisory, and adds regression tests for both a secret-shaped title and a benign title.

Review context
  • Author: bitfathers94
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 38 PR(s), 0 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Start here: Add validation command/output.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @loopover ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver review

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LoopOver approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit a0c3b33 into JSONbored:main Jul 19, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

results-payload splices result.title into the 'public-safe' summary with zero sanitization

1 participant