Skip to content

Exclude .browser-ui-repair-source from the domain secret scan - #1287

Merged
brettheap merged 1 commit into
mainfrom
fix/secret-scan-skip-browser-ui-repair-source
Oct 9, 2026
Merged

brettheap merged 1 commit into
mainfrom
fix/secret-scan-skip-browser-ui-repair-source

Conversation

@brettheap

@brettheap brettheap commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Lane: codexfactory-1 (codeXfactory-1)

What

Adds .browser-ui-repair-source to SKIP_DIRS in scripts/validate-domain-factory.py, with a comment in the .openxfactory-pin entry's style. One file, +12/-1. No OpenSpec change, no behaviour change for any directory not named .browser-ui-repair-source.

Why

codexFactory's browser-UI-repair loop materializes its pinned upstream source (the openxFactory/openDox/openDox-code/openXdox/openXdox-code union) into a gitignored .browser-ui-repair-source/ cache inside the repository. scan_secrets walks the filesystem with root.rglob("*"), not git, so it reaches the ignored copy. On the pinned openDox-code dede32b4, src/opendox/runtime/app.py:470 is a bearer-header parse (get_principal) whose local name satisfies the assignment heuristic at SECRET_PATTERNS[1]. It is a request-time parse, not a literal secret. A local run of the canonical validator after the cache exists therefore fails. CI stays green only because of step order (validate-docs.sh runs before the identity --check that builds the cache), so a reorder or a reused runner workspace would turn it red.

Pinned upstream content is not the domain's own surface: the same rationale as .openxfactory-pin.

Before / after proof

Run from this branch's validator over a clean git archive of codexFactory 827cfb26 (scratch dir, no cache), then with a planted .browser-ui-repair-source/<pin>-PLANTED/openDox/code/src/opendox/runtime/app.py holding the real pinned file (blob f485a917, equal to openDox-code dede32b4's blob; the heuristic matches line 470 only).

step validator result
clean target, no cache before (66303e66) 0 error(s), 0 warning(s) -> PASS, exit 0
cache planted before (66303e66) ERROR: possible secret in .browser-ui-repair-source/0992369a…-PLANTED/openDox/code/src/opendox/runtime/app.py → 1 error(s) -> FAIL, exit 1
cache planted after (this PR) 0 error(s), 0 warning(s) -> PASS, exit 0
same file under not-a-cache/src/app.py (negative control) after 1 error(s) -> FAIL, exit 1 (the skip is name-scoped, not blanket)

The planted directory was removed before the commit. The commit holds only the one-file diff.

Tests and validators (on this branch)

  • python3 -m pytest tests/hermes_runtime_contracts/test_domain_factory_subject_scope_and_profile_kind.py tests/hermes_runtime_contracts/test_domain_factory_deprecation_retirements.py tests/hermes_runtime_contracts/test_topology_and_identity.py -q: 101 passed. These are the files that invoke validate-domain-factory.py, two of the cases with the secret scan on.
  • python3 scripts/validate-openspec-cli-pin.py --all --strict: exit 0, @fission-ai/[email protected] verified … 0 UNDISPOSITIONED failures (1 pre-existing accepted exception, unrelated).
  • No digest pins validate-domain-factory.py (contracts/manifest.yaml:183-196 carries no sha256 for it).
  • No test added: the precedent added none. A regression test for SKIP_DIRS membership is a possible follow-up if wanted.

Precedent and route

f2e4e960 (2026-07-14, "Exclude .openxfactory-pin from the domain secret scan"): one file, +7/-1, a direct commit to main with no PR (gh api repos/opensoft/openxFactory/commits/f2e4e960/pulls is empty), no OpenSpec change, no test. No promoted openxFactory spec governs scan_secrets. The direct push is no longer open (Tier-1 ruleset 18962101, 2026-07-15), so this is a plain PR, which is the same route minus the direct push.

Authority

Brett Heap, first-hand, 2026-10-09T17:35:29Z, chose "(A) Add the cache to SKIP_DIRS (Recommended)". It is recorded at codeXfactory/codexFactory#526, comment 6086050454 (https://github.com/codeXfactory/codexFactory/issues/526#issuecomment-6086050454). The option offered was a one-line openxFactory change beside the .openxfactory-pin precedent, drafted by the lane as an openxFactory PR for his merge.

Reach

Every domain running the canonical validator skips one more directory name at any depth; only codexFactory produces that name. codexFactory sees it at its next pin advance past this merge (CI and validate-docs.sh read the validator from the pinned checkout). Lane evidence: 2026-10-09/successors/7.7-7.2.md and 7.7-repro-real/ (a real cache, 171 files, one hit).

Not merged by the author; for Brett Heap's merge.

Refs codeXfactory/codexFactory#526

🤖 Generated with Claude Code

Summary by Sourcery

Bug Fixes:

  • Prevent the domain secret scan from flagging bearer-header parsing code in the gitignored .browser-ui-repair-source cache as a possible secret.

codexFactory's browser-UI-repair loop materializes its pinned upstream
source (the openxFactory/openDox/openDox-code/openXdox/openXdox-code
union) into a gitignored .browser-ui-repair-source/ cache inside the
repository. scan_secrets walks the filesystem, not git, so a local run
of the canonical validator after that cache exists fails on a line of
pinned openDox-code (src/opendox/runtime/app.py:470, a bearer-header
parse whose local name satisfies the assignment heuristic at
SECRET_PATTERNS[1]), while CI stays green only through step order.

Pinned upstream content is not the domain's own surface; this is the
same rationale and the same one-line shape as f2e4e96 (.openxfactory-pin).

Authority: Brett Heap, 2026-10-09T17:35:29Z, chose "(A) Add the cache to
SKIP_DIRS (Recommended)", recorded at codeXfactory/codeXfactory#526
(comment 6086050454).

Refs codeXfactory/codeXfactory#526

Lane: codexfactory-1 (codeXfactory-1)
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@sourcery-ai

sourcery-ai Bot commented Oct 9, 2026

Copy link
Copy Markdown

Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 2 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Oct 9, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

The validator now skips codexFactory’s gitignored .browser-ui-repair-source cache, preventing false-positive secret findings in materialized pinned upstream source while retaining normal scanning elsewhere. The change follows the existing .openxfactory-pin precedent and is limited to one file.

Flow diagram for scoped secret-scan exclusion

flowchart LR
    A[scan_secrets walks repository filesystem] --> B{Directory name is in SKIP_DIRS?}
    B -->|Yes: .browser-ui-repair-source| C[Skip pinned upstream cache]
    B -->|No| D[Scan files for possible secrets]
    C --> E[Validation passes without cache false positive]
    D --> F[Preserve normal secret detection]
Loading

File-Level Changes

Change Details Files
Excludes the browser UI repair cache from domain secret scanning while preserving scanning for similarly named or unrelated directories.
  • Adds .browser-ui-repair-source to the validator’s name-based SKIP_DIRS set.
  • Documents that the cache contains pinned upstream content and is intentionally outside the domain-owned validation surface.
  • Keeps the exclusion scoped to the exact directory name, including at nested paths.
scripts/validate-domain-factory.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sonarqubecloud

sonarqubecloud Bot commented Oct 9, 2026

Copy link
Copy Markdown

@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: codexfactory-1 (codeXfactory-1)

WORD, recorded before any act. Brett Heap answered first-hand in lane codeXfactory-1's own session at 2026-10-09T21:00:16Z (transcript time). He chose the recommended option in a multiple-choice prompt: "Merge when green (Recommended)". As offered, that is: the lane merges it, an admin merge on his word, under openxFactory's landing rules. Its effect reaches codexFactory at the next pin advance. Recorded on codeXfactory/codexFactory#526.

@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: codexfactory-1 (codeXfactory-1)

LANDING — lane codeXfactory-1, session 2b17a476-c057-4a49-abbf-dadbc5529729@Eagle, 2026-10-09T22:36:51Z, PR #1287 into opensoft/openxFactory main, at head de10a568 over main a8ab3039. The register line is verified on origin.

The word is Brett Heap's, first-hand in this lane's session: "Merge when green (Recommended)", given at 2026-10-09T21:00:16Z by the session transcript's timestamp. It is recorded on this PR in comment 6089182312, and as a register RULED line at 2026-10-09T21:01:53Z. This PR touches no openspec/changes/, so Rule 6 does not require a window for it. One is posted anyway, so that no other lane's merge crosses this one. openxFactory main does not require branches to be up to date. This head is 20 commits behind main (merge base 93d13d6c). None of the 183 files those commits change is this PR's one file, scripts/validate-domain-factory.py, and none has a path naming the domain factory or the secret scan.

All 13 required-and-reported checks pass on this head (skipped checks excepted). No other LANDING is open on opensoft/openxFactory main, in the register or in any open PR's comments.

@brettheap
brettheap merged commit 85516e0 into main Oct 9, 2026
15 checks passed
@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: codexfactory-1 (codeXfactory-1)

LANDED — lane codeXfactory-1, session 2b17a476-c057-4a49-abbf-dadbc5529729@Eagle, 2026-10-09T22:38:47Z, PR #1287 into opensoft/openxFactory main → 85516e0deb0523345c9ea7f9f0599d2c9c1e3829 (merged 2026-10-09T22:36:57Z). An admin merge commit on Brett Heap's word, not an approving review. This performs successor 7.7 of advance-openxfactory-pin-0992369a on openxFactory's side. It is option (A), as Brett Heap ruled at 2026-10-09T17:35:29Z ("(A) Add the cache to SKIP_DIRS (Recommended)"): the domain secret scan now skips .browser-ui-repair-source. codexFactory's validate-docs.sh loads this validator from its pinned openxFactory checkout, so the fix reaches codexFactory only when that pin passes this merge. The advance now in flight, codeXfactory/codexFactory#554 to 93d13d6c, does not pass it.

opensoft/openxFactory main is free for the next Rule 6 lander.

brettheap added a commit that referenced this pull request Oct 9, 2026
…currency-dispositions

Re-levels the ratified packet onto openxFactory main, which moved past the
merge base 9a272c6 by #1290 (a8ab303, openXwallet-2's nested-chain group 6:
contracts/openxwallet-pin.yaml, the openXwallet gitlink, verify-openxwallet-pin.py,
scripts/doc_health/pin_shapes.py, five workflows and their tests) and #1287
(85516e0, .browser-ui-repair-source in the domain secret scan's SKIP_DIRS).

No conflict. tests/doc-health/test_pin_shape_adapter.py auto-merged with both
sides' intent kept: main's re-measured verify-openxwallet-pin.py line citations
(:194 -> :225, :443 -> :551) and this branch's live openspec-cli record count
(5 -> 3). Neither side touches the other's surface: main moves no line of
contracts/openspec-cli-pin.yaml, README.md or this packet.

Lane: codexfactory-1 (codeXfactory-1)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
brettheap added a commit that referenced this pull request Oct 11, 2026
Takes #1290, #1287 and #1288 for the landing round. None of them touches
the release surface: contracts/manifest.yaml, contracts/releases/,
contracts/CHANGELOG.md and contracts/README.md are unchanged, and no
contract-v4.1 inventory member moved. The three manifest rows whose files
moved (openspec-cli-pin, openxwallet-pin, domain-factory-conformance-validator)
carry no per-file sha256.

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
brettheap added a commit that referenced this pull request Oct 11, 2026
…ration

PR-2 (#1294, 33d2a56) and PR-3 (#1296, 978e9cb) landed; their branches
are deleted, so main is the source for Phases 2 and 3 from here on. Main
also brings #1287, #1288, #1295 and #1289.

Resolution:
- resolution.py: the admission order keeps Phase 5's A4
  (`_workflow_revision`) and Phase 2's final step 9, which reads the
  `declared` projection entry `_council_and_class` returns.
- The invocation-directory check takes main's separator-terminated prefix
  (the PR-1 follow-up) and keeps the mode name, so `select` says so.
- The family README gains Phase 3's snapshot and assignment row beside
  Phase 5's binding row; the corpus contract's `issued` row carries both
  Phase 4's `public_key` amendment and Phase 3's live-snapshot soundness
  note.
- evidence.md: Phase 3's final records go at the end of § Phase 3, before
  § Phase 4 (as merged from 03cb77e) and § Phase 6.
- Tests: Phase 3's final assignment-area docstring (snapshot half shared,
  retry vectors the consumer's) inside Phase 6's all-areas test; Phase 3's
  pre-review `check` tests kept beside Phase 4's and Phase 5's.
- refusal_code is unchanged: 92 codes, one copy each of binding_unresolved
  and broker_capability_insufficient, at Phase 4's position.
- The conformance index is regenerated: 641 vectors.

Lane: codexfactory-2 (codeXfactory-2)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant