Repository navigation
Fix the 25 open SonarCloud findings on main and bring the documentation up to date - #340
Conversation
config.json's apiBase went straight into every fetch() and the event stream's EventSource, so a malformed or tampered config.json could point the frontend at another scheme, smuggle credentials into the URL, or add a query string to every request. SonarCloud reported this as server-side and client-side request forgery (client.ts) and connection hijacking (events.ts). apiBase is now accepted only as an absolute http(s) URL with no credentials, query or fragment; dot segments are resolved and trailing slashes dropped. A refused value is logged and the frontend stays same-origin rather than using it. Every path passed to apiUrl() must be root-relative and free of backslashes, control characters and . or .. segments (plain or percent-encoded) before its query string, so a value taken from the address bar or returned by the server cannot leave the API's path space. The checks live in api/apiBase.ts with tests. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0136P7ZjoMTmdce1zuwSJWdN
Thirteen calls started a promise and dropped it, so a failure became an unhandled rejection with nothing shown to the user. Each one is now awaited or ends in a .catch that reports the error: - main.tsx: a failed start-up writes the error into the page instead of leaving it blank. - PlotlyChart: a failed Plotly.react or relayout is shown under the chart. - phylogeny/qc: a failed alignment load returns to the Show alignment button and raises a toast, instead of showing Loading... for ever. - phylogeny/common: a failed log load shows the error in the log pane. - PlacementPanel, FigureBuilder, TablesPanel, PipelineStages: the remaining calls are awaited inside their existing try/catch or raise a toast. These functions already reported their own failures; the catch covers what escapes them. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0136P7ZjoMTmdce1zuwSJWdN
Six elements reacted to a mouse click but not to the keyboard: - The copy-on-click statistics in the table summary and in the numeric column filter are now <button>s styled as the text they were, so Tab reaches them and Enter or Space copies. - A figure's group row selected the group on click. The letter and size are now a real button (aria-pressed) filling the row, beside the move and remove buttons rather than around them. - The column filter dropdown is a labelled dialog; Escape closes it, as an outside click already did. - The mobile menu's backdrop is decorative (aria-hidden); Escape now closes the open menu, alongside the existing Menu button. - The name dialog's backdrop is presentational; the dialog inside it already closes on Escape. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0136P7ZjoMTmdce1zuwSJWdN
buildDisplay picks which of two nodes sharing a split keeps its name and support with reduce(). The list always has at least two entries, so the result is unchanged; the explicit initial value removes the throw that an empty list would cause and states the intent. A test pins the behaviour: the support stays on the smaller side whichever order the root's children come in. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0136P7ZjoMTmdce1zuwSJWdN
renv records packages by scanning the project's R files for library() calls, and this file exists only so renv::snapshot() keeps dada2, vegan, tibble, MASS and glmGamPoi in renv.lock. The if (FALSE) guard keeps the calls from running if the file is ever sourced. The code is unchanged; the comment records why a static analyser's "useless if (FALSE)" finding does not apply. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0136P7ZjoMTmdce1zuwSJWdN
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 3 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Adds docs/release-notes/2026-11-13-current-state.md, a dated snapshot of: - the open upstream pull requests (recoverable SSH stages, exact descriptive statistics, native differential abundance waiting on the CompositionalDA registration in General, multinomial models, and the high-precision extension), none of them merged; - the two statistics catalogues: approved in scope by the fork owner on this fork, pending_review in the upstream proposals until upstream's own review; - the SonarCloud and Codecov numbers, and a note for the upstream maintainer on the five patch lines Codecov reports as uncovered on the exact-statistics pull request. Also: the README describes the apiBase validation for split deployments, the pinned bun frontend commands and the Sonar guard; the Sonar page lists the 25 findings fixed on main and how; the sync note, the native-DA proposal package and VALIDATED_STATISTICS.md point at the snapshot; the AI manifest names it and the Sonar guide for agents. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0136P7ZjoMTmdce1zuwSJWdN
…selves The first analysis of the fixes reported one vulnerability and seven code smells in the new lines: - Log injection: a refused apiBase was logged with its value in the message. normaliseApiBase's messages are now fixed text. - A trailing-slash regex flagged as super-linear is replaced by a loop. - The filter dropdown's role="dialog" div with click and key handlers, and the name dialog's role="presentation" backdrop, are replaced by document listeners: Escape or a press outside closes either one. The header cell sorts only on clicks aimed at the cell itself, so the dropdown no longer needs to stop click propagation. - Two one-line Enter/Escape key handlers are split onto separate lines. - A test uses toHaveLength. Behaviour is otherwise as before; the Sonar page's table is updated. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0136P7ZjoMTmdce1zuwSJWdN
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0136P7ZjoMTmdce1zuwSJWdN
|



Change and reason
Fixes the 25 unresolved SonarCloud findings on
main(3 vulnerabilities, 22 bugs, re-queried on 2026-11-13), and brings the documentation up to the current state of this fork and of the work proposed upstream.Vulnerabilities (3)
client.tsrequest forgery (S5144, S8476) andevents.tsconnection hijacking (S8480): all three came fromconfig.json'sapiBasereachingfetch()/EventSourceunchecked.apiBaseis now accepted only as an absolutehttp(s)URL with no credentials, query or fragment. A refused value is logged with a fixed message and the frontend stays same-origin. Every path given toapiUrl()must be root-relative, with no./..segment (plain or%2e), backslash or control character. New modulefrontend/src/api/apiBase.tswith tests.Bugs (22)
.catchthat shows the error. Two of them were user-visible defects: a failed alignment load left "Loading…" on screen for ever, and a failed start-up left the page blank.<button>s. Escape closes the filter dropdown, the name dialog and the mobile menu. The menu backdrop isaria-hidden.tree/model.tsreduce()without an initial value (S6959): an initial value is added. The result is unchanged, and a new test pins it.R/_renv_dependencies.Rif (FALSE)(S1145): not changed, because this code is live. renv's implicit snapshot reads thoselibrary()calls to keep the packages inrenv.lock. The file now explains this. The finding still needs resolving as Won't fix in the SonarCloud UI, which I have not done.The first analysis of these fixes raised one new vulnerability (log injection from echoing the refused
apiBase) and seven code smells (role="dialog"/"presentation"with handlers, a regex flagged as super-linear, one-line key handlers, a test assertion). A follow-up commit clears all of them.Documentation
docs/release-notes/2026-11-13-current-state.mdcovers:approvedin scope by the fork owner on this fork,pending_reviewin upstream build(deps): bump the frontend-dependencies group in /frontend with 10 updates #69/ci: declare least-privilege GITHUB_TOKEN permissions (re-anchors the salvageable delta of #71) #72.README.md: a pointer to the snapshot, theapiBaserules for split deployments, and the frontend commands with the pinned bun and the Sonar guard.docs/sonar-quality-gate.md: a table of the 25 findings and how each was fixed.notes/upstream-sync.md,docs/proposals/upstream-pr-70/README.md,VALIDATED_STATISTICS.md: dated updates.0-AI-MANIFEST.a2ml(the bot-facing manifest): names the snapshot and the Sonar guide.CONTRIBUTING.md,.coderabbit.yaml,codecov.ymland the PR template already describe the current setup. The repository has noCHANGELOG,CLAUDE.mdorAGENTS.md.Note for Joshua on #69's coverage (not posted upstream)
Codecov reports 5 uncovered patch lines on upstream #69: 99.53% patch coverage, with 1,058 of 1,063 changed lines covered. The patch check is informational and green. The lines are:
src/server/routes/validated_statistics.jlsrc/server/routes/validated_statistics.jltime_limit_secondssrc/analysis/derived_analyses.jlrethrow()after a failed hard link with no competing recordsrc/canonical.jlrepr(::Float64)mantissa without a decimal point, which may be unreachableHow, or whether, to cover them is Joshua's decision. The same note, with more detail, is in the snapshot.
Validation
config/defaults/tool_versions.yml), TypeScript 5.9.3 and Vite 6.4.5:bun install --frozen-lockfile: no lockfile change.bun run typecheck: clean.bun run test: 90 pass, 0 fail. The baseline before the change was 82; the 8 new tests coverapiBaseand the root-split reduce.bun run build: succeeds.bash scripts/lint-sonar-reliability.sh: OK.R/_renv_dependencies.R. CI'sJulia testsjob runs them on this PR.main. Only the post-mergemainanalysis shows that, so re-query SonarCloud after merging.Scope
client.ts(127 interpolations) is not individuallyencodeURIComponent-encoded. The centralcheckApiPathguard covers traversal; per-segment encoding would be a separate, larger change.Wiki
The wiki edits (Status and roadmap, Testing and benchmarks, Operator track) are not pushed. The commit is signed with this session's key, but I could not confirm through the tools available here that GitHub shows it as Verified, so it is attached as a patch to apply to
MetaManifold-WebUI.wiki.gitmaster(git am):wiki.patch
The wiki has other pages I have not audited line by line. They may still refer to files this repository does not have (for example
mise.toml,justfileanddocs/migration/STATUS.md).Contribution checks
main(7b2cadd) and contains no merges. The Branch freshness check passed.Julia testswas still running when this was written.Agents wrote this code and these documents. The person answering for them is Jonathan D. A. Jewell (The Open University). The owner has not reviewed them yet.
🤖 Generated with Claude Code
https://claude.ai/code/session_0136P7ZjoMTmdce1zuwSJWdN