Skip to content

fix(export): redact four drifted secret column families and guard against future drift - #9895

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

fix(export): redact four drifted secret column families and guard against future drift#9895
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
bitfathers94:fix/issue-9651

Conversation

@bitfathers94

Copy link
Copy Markdown
Contributor

fix(export): redact four drifted secret column families and guard against future drift

REDACTED_COLUMNS was missing four secret-bearing families added since the
DO-NOT-MIGRATE list was last touched: orb_enrollments.secret_value_*,
provider_credentials envelope, orb_instances.ingest_secret_hash and
orb_webhook_events.payload_hash. Add them, and introduce
EXPORT_REVIEWED_NON_SECRET_COLUMNS plus a migrations/-scanning drift-guard test
so a future ciphertext/secret/token column fails the suite until it is
classified as redacted or explicitly-reviewed non-secret.

Closes #9651

…inst future drift

REDACTED_COLUMNS was missing four secret-bearing families added since the
DO-NOT-MIGRATE list was last touched: orb_enrollments.secret_value_*,
provider_credentials envelope, orb_instances.ingest_secret_hash and
orb_webhook_events.payload_hash. Add them, and introduce
EXPORT_REVIEWED_NON_SECRET_COLUMNS plus a migrations/-scanning drift-guard test
so a future ciphertext/secret/token column fails the suite until it is
classified as redacted or explicitly-reviewed non-secret.
@bitfathers94
bitfathers94 requested a review from JSONbored as a code owner July 29, 2026 19:31
@loopover-orb

loopover-orb Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Tip

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-29 20:01:20 UTC

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

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
The PR correctly adds four missing secret column families to the redaction list and introduces a drift guard test to prevent future drift. The changes ensure all sensitive columns in migrations are classified as either redacted or explicitly-reviewed non-secrets, with comprehensive tests validating the redaction logic and drift detection.

Nits — 2 non-blocking
  • Consider adding a comment explaining the purpose of the `EXPORT_REVIEWED_NON_SECRET_COLUMNS` constant to improve clarity for future maintainers.
  • Ensure the drift guard test covers edge cases where columns are renamed or removed in migrations.

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 #9651
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 ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 94 registered-repo PR(s), 65 merged, 1 issue(s).
Contributor context ✅ Confirmed Gittensor contributor bitfathers94; Gittensor profile; 94 PR(s), 1 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: significant
Linked issue satisfaction

Addressed
The PR adds the four required secret columns to REDACTED_COLUMNS with one-line reasons, introduces EXPORT_REVIEWED_NON_SECRET_COLUMNS with reviewed entries, and implements a drift-guard test that scans migrations/ directory against the sensitive pattern. All deliverables including the synthetic column detection test and dead-entry check are included.

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: TypeScript
  • Official Gittensor activity: 94 PR(s), 1 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
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 <question> answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat <question> 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

@superagent-security

Copy link
Copy Markdown
Contributor

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

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

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.29%. Comparing base (af98111) to head (2a5dc98).
⚠️ Report is 2 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (af98111) and HEAD (2a5dc98). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (af98111) HEAD (2a5dc98)
backend 1 0
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #9895       +/-   ##
===========================================
- Coverage   91.76%   79.29%   -12.48%     
===========================================
  Files         921      281      -640     
  Lines      113173    58566    -54607     
  Branches    27244     8605    -18639     
===========================================
- Hits       103854    46440    -57414     
- Misses       8034    11843     +3809     
+ Partials     1285      283     -1002     
Flag Coverage Δ
backend ?

Flags with carried forward coverage won't be shown. Click here to find out more.
see 773 files with indirect coverage changes

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

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 04c77d2 into JSONbored:main Jul 29, 2026
8 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.

export: the D1 export's DO-NOT-MIGRATE redaction list has drifted from the schema again

1 participant