Skip to content

fix(4): remove self-replacing no-op in custom-rules URL (CodeQL #4) [v2 sibling] - #471

Open
Alajmah wants to merge 1 commit into
masterfrom
security/identity-replace-removal-v2
Open

Alajmah wants to merge 1 commit into
masterfrom
security/identity-replace-removal-v2

Conversation

@Alajmah

@Alajmah Alajmah commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Unit 4 (final) of the authorized #425 remediation sequence. Removal of the identity-replacement no-op flagged by CodeQL js/identity-replacement #4 at packages/web-dashboard/src/app/custom-rules/page.tsx:63. Merge authority reserved; returned at exact head for clearance.

The change

.replace("/api/config/", "/api/config/") replaced a value with itself — dead code the query flags as an unfinished edit. The generated URL was and remains /api/config/{owner}/{repo}/custom-rules, resolving against the live backend route configRouter.get("/:owner/:repo/custom-rules") (config.js:238) — verified in the tranche report (PR #464 comment 7053127297). The no-op is deleted; nothing else changes.

Regression

Per the directive: tests/api-urls.test.ts now pins API.repoConfig(owner, repo) + "/custom-rules" === /api/config/o/r/custom-rules — the exact construction the page performs post-fix. Full dashboard suite 67/67.


v2 note: replaces #468 — the original branch was accidentally stacked on three other unit commits; its GitWire review (row 1445, APPROVE) therefore covered all seven files of the union rather than this unit alone. This branch is a single commit on master carrying only this unit; content identical (cherry-picked).

CodeQL js/identity-replacement #4 remediation (custom-rules/page.tsx:63):
.replace("/api/config/", "/api/config/") replaced a value with itself —
dead code flagged by the identity-replacement query as an unfinished edit.
The generated URL was and remains
/api/config/{owner}/{repo}/custom-rules, resolving against the live backend
route configRouter.get('/:owner/:repo/custom-rules') (config.js:238).

Regression (api-urls.test.ts): pins repoConfig(owner, repo) + '/custom-rules'
=== '/api/config/o/r/custom-rules' so the URL cannot drift silently when the
no-op is removed. Full dashboard suite green.

Signed-off-by: Alajmah <55954113+Alajmah@users.noreply.github.com>
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-21T00:00:27.711855Z
We couldn’t complete this review. Comment @codex review to try again.
0f28f4e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@gitwire-hq gitwire-hq 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.

🤖 AI Code Review — ✅ Approved

Confidence: high · Findings: 0
AI judgment: APPROVE · Evidence: COMPLETE · Authority: advisory
Evidence complete · 2/2 changed files accounted for

GitWire AI Review Gate (bundle-driven v2) · Structured schema · Scope-validated · AI recommendation — maintainers and repository policy retain authority

This branch has not been deployed

No deployments
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