Skip to content

fix: harden manifest public-safe filter - #659

Merged
JSONbored merged 2 commits into
mainfrom
codex/propose-fix-for-review-override-vulnerability
Jun 14, 2026
Merged

fix: harden manifest public-safe filter#659
JSONbored merged 2 commits into
mainfrom
codex/propose-fix-for-review-override-vulnerability

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Motivation

  • A repo-controlled .gittensory.yml review override could bypass the stricter public comment sanitizer and cause sensitive terms (e.g. seed phrase, private rankings) to be published under the GitHub App identity, so the manifest-level public-safe check needed to be aligned with the site-wide sanitizer.

Description

  • Tighten the shared manifest public-safety guard by expanding isFocusManifestPublicSafe to block additional forbidden public-output terms and common plural/variant forms (covers seed phrase, private key, plural rankings, score/scoreability/estimate variants, and related patterns) in src/signals/focus-manifest.ts.
  • Add a regression test ensuring review footer/note overrides containing terms covered by the public comment sanitizer are dropped with warnings in test/unit/focus-manifest.test.ts.
  • Extend the sanitizer coverage assertions in test/unit/policy-sanitizer.test.ts so the shared guard is exercised for the newly-covered terms.
  • Preserves existing behavior for safe inputs; only manifest-parsed public strings are more strictly rejected before they can reach public comment sinks.

Testing

  • Ran npm exec -- vitest run test/unit/focus-manifest.test.ts test/unit/policy-sanitizer.test.ts and the tests passed.
  • Ran npm run typecheck (tsc --noEmit) which completed successfully.

Codex Task

@ghost

ghost commented Jun 13, 2026

Copy link
Copy Markdown

gittensory · advisory review

Reviewed 3 changed file(s) — two independent AI reviewers.

Suggested action:Safe to merge — both reviewers found no blocking issues.

Reviewer A · gpt-oss-120b — recommends ✅ merge
The PR expands the public‑safe filter regex to block additional forbidden terms, adds tests to verify that review overrides containing these terms are stripped, and updates the policy sanitizer test suite accordingly. The changes are straightforward and maintain existing functionality.

Suggestions

  • Consider adding a test case for a plain "score" term to confirm whether it should be filtered, given the original regex covered \bscore\w*.
  • Run the full test suite to verify that the expanded regex does not introduce performance regressions on large manifest texts.

Worth double-checking

  • The removal of the generic \bscore\w* pattern could allow unintended safe‑passing of simple "score" mentions; verify this aligns with policy.
  • Complex regex may have edge‑case false positives; ensure no legitimate public content is inadvertently blocked.

Reviewer B · mistral-small-3.1-24b-instruct — recommends ✅ merge
This PR strengthens the public-safe filter in the focus manifest by expanding the list of forbidden terms. It includes new tests to ensure the filter works as intended. The change is clear and well-targeted.

Suggestions

  • Consider adding a comment explaining the rationale behind the new terms added to the regex pattern.
  • Ensure that the new terms are documented in the relevant parts of the codebase or documentation to maintain clarity.

Worth double-checking

  • Verify that the expanded regex pattern does not inadvertently block legitimate terms.
  • Check that the new tests cover all edge cases and that the existing tests remain valid.

@ghost ghost added the gittensory-review label Jun 13, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

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

@ghost

ghost commented Jun 13, 2026

Copy link
Copy Markdown

Note

Gittensory Gate skipped

PR closed before full evaluation. No late first comment was created.

Signal Result Evidence Action
Gate result ⚠️ Skipped #659 is no longer open. No action.

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

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

@ghost ghost added the gittensory:reviewed label Jun 13, 2026
@JSONbored JSONbored self-assigned this Jun 14, 2026
@dosubot dosubot Bot added the size:XS label Jun 14, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 14, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
gittensory-ui 6beaf3c Commit Preview URL

Branch Preview URL
Jun 14 2026, 02:15 PM

@ghost ghost mentioned this pull request Jun 14, 2026
@JSONbored
JSONbored merged commit 57d1a9f into main Jun 14, 2026
11 checks passed
@JSONbored
JSONbored deleted the codex/propose-fix-for-review-override-vulnerability branch June 14, 2026 14:22
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jun 14, 2026
@github-actions github-actions Bot mentioned this pull request Jun 14, 2026
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant