Skip to content

feat(mcp): enforce repository allowlist#77

Open
100yenadmin wants to merge 1 commit into
reconcile/r14-mcp-read-onlyfrom
reconcile/r15-mcp-repository-policy
Open

feat(mcp): enforce repository allowlist#77
100yenadmin wants to merge 1 commit into
reconcile/r14-mcp-read-onlyfrom
reconcile/r15-mcp-repository-policy

Conversation

@100yenadmin

Copy link
Copy Markdown
Member

Capability

Implements R15: repository allowlisting and deterministic default selection for MCP.

  • Adds canonical GITNEXUS_MCP_ALLOWED_REPOS and GITNEXUS_MCP_DEFAULT_REPO controls.
  • Retains OpenClaw-prefixed settings as fork compatibility.
  • Resolves canonical names and paths from a startup registry snapshot and fails closed for blank, unknown, ambiguous, or inconsistent configuration.
  • Enforces policy across tools, resources, templates, aliases, groups, dynamic dispatch, and implicit defaults.
  • Filters repository discovery, pagination totals, and sibling metadata before presentation.
  • Shares the prevalidated policy across stdio and HTTP; invalid standalone HTTP configuration fails before bind.
  • Composes with R14 read-only mode without exposing hidden resource-discovery content.

This supersedes the repository-policy portions of mixed legacy commits d1cd512e and c478f4a4; neither is cherry-picked.

Evidence

  • Final combined policy matrix: 140 passed.
  • TypeScript and full package build: passed.
  • Targeted ESLint: zero errors; existing warnings only.
  • Diff check: passed.
  • Detailed evidence: /Volumes/LEXAR/Codex/session-notes/2026-07-13/gitnexus-fork-upstream-reconciliation/r15-mcp-repository-policy.md.

Stack And Gate

  • Base: reconcile/r14-mcp-read-only at 750d9b94a095f6eed5ae4d9fb5562fdabfe957e8.
  • Head: 1d55fec52397cefc2c4ac9c881bfd4da2b5299e7.
  • This PR must wait for R14, then be retargeted to the integration branch and revalidated at current head.
  • Publication, runtime rollout, live-index mutation, and default-branch promotion are outside this PR.

Closes #54 after merge.
Parent epic: #39.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 00f833cf-bd83-4d58-858d-ade60133ecad

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch reconcile/r15-mcp-repository-policy

Comment @coderabbitai help to get the list of available commands.

@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 13, 2026

Copy link
Copy Markdown

evaOS review status: completed

PR: #77 - feat(mcp): enforce repository allowlist
Head: 1d55fec52397cefc2c4ac9c881bfd4da2b5299e7
Updated: 2026-07-13T13:26:23.986Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #77

Review URL: #77 (review)

@evaos-code-review-bot evaos-code-review-bot 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.

Walkthrough

PR: #77 - feat(mcp): enforce repository allowlist
Head: 1d55fec52397cefc2c4ac9c881bfd4da2b5299e7 into reconcile/r14-mcp-read-only. Review event: COMMENT.
Provider: GLM/Z.ai through ZCode (zcode-glm, zcode, model GLM-5.2).

Estimated review effort: 1/5 (~10 min)

Changed Files

File Status Churn Purpose Risk

Review Signal

No validated inline findings.
Dropped findings before posting: 3. High-severity findings: 0.

Risk Taxonomy

No finding categories.

Validation and Proof

1 required validation/proof recommendation(s) selected from changed files.

  • required: TypeScript/web build or CI proof - Runtime TypeScript/web files or package/config files changed. Proof: npm run build; typecheck; focused Vitest; green GitHub check.
    Proof status: sufficient - PR metadata mentions acceptable proof for each required validation recommendation.
    Profile validation hints: Call out stale index, wrong repo identity, memory growth, and destructive analyze behavior.
    Profile proof expectations: Look for focused CLI, index, query, or migration proof.

Related Context

Related issues/PRs: #54, #39.
Suggested labels: none.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Suggested labels (suggestion_only); Review status comment (sticky_status)
  • Path instructions: none
  • Label suggestions: gitnexus, code-intelligence, backend
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown

CI Report

All checks passed

Pipeline Status

Stage Status Details
✅ Typecheck success tsc --noEmit
✅ Tests success unit tests, 3 platforms
✅ E2E success gitnexus-web changes only

Test Results

Tests Passed Failed Skipped Duration
14635 14573 0 62 21s

✅ All 14573 tests passed

62 test(s) skipped — expand for details

Code Coverage

Tests

Metric Coverage Covered Base Delta Status
Statements 80.78% 54326/67244 N/A% 🟢 ████████████████░░░░
Branches 67.88% 33292/49045 N/A% 🟢 █████████████░░░░░░░
Functions 86.92% 6295/7242 N/A% 🟢 █████████████████░░░
Lines 84.3% 48459/57479 N/A% 🟢 ████████████████░░░░

📋 View full run · Generated by CI

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