Conversation
There was a problem hiding this comment.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
|
Hi @SeaCelo , I noticed the CodeQL check is flagging 72 high-severity alerts for "Uncontrolled data used in path expression" in API/Classes/Base/FileClass.py and API/Classes/Case/DataFileClass.py. These are path traversal warnings file paths built from user input without sanitization. Let me know if you'd like me to open a PR against your branch with the fixes, or if you'd prefer to handle it yourself. |
|
This PR syncs MUIOGO with upstream MUIO v5.5 and adds path traversal protection. What changed upstream in v5.5 MUIO v5.5 reworked the diagnostics UI (the "DataFile" page), added a new "ModelFile" page for viewing/editing the model text file, simplified how results metadata works (fewer hardcoded parameters/variables), and cleaned up the backend routing and app startup. We took all of it. The only places we held back were where upstream's changes would undo MUIOGO-specific fixes — cross-platform path handling, the Python version guard, and Path traversal guards (new) CodeQL flagged 72 The fix has two parts:
The 72 CodeQL alerts are false positives. CodeQL tracks user input from source to sink and flags any path that uses it in a file operation. It can't recognise custom sanitizer functions — only built-in ones. We explored adding a CodeQL model file to declare To guard against future changes to Also included
|
@parthdagia05 yes, I'm fixed the traversal by sanitizing, but CodeQL doesn't recognize it for other reasons. I documented and we will dismiss the alert as a false positive. |
|
This is a massive lift, @SeaCelo! Stabilizing the v5.5 baseline with a formal UPSTREAM_SYNC playbook is a huge win for the repo’s long-term health. I'll take a look at the RYC metadata gap and those CBC FutureWarnings. I've already prototyped a lightweight way to fill those specific blanks without diverging from the new upstream baseline, so I'll follow up with a targeted patch to clear the residuals. Update: #433 |
Removes 25 active console.log debug calls across 20 files in WebAPP/App/Controller/ and WebAPP/App/Model/. These fired during normal user actions (page loads, cell edits, case selection) and in some cases dumped entire model objects to the browser console. Scope notes: - Preserves console.error (intentional error logging) and commented-out // console.log(...) lines (out of scope). - Skips WebAPP/Classes/*.js since those are upstream-overlap surface per docs/UPSTREAM_SYNC.md and would risk merge conflicts at the next MUIO sync. Follows the cleanup precedent from EAPD-DRB#422, which removed similar debug logs from Pivot.js, DataModelResult.Class.js, and Const.Class.js during the v5.5 sync. Fixes EAPD-DRB#436
Closes #388, closes #389, closes #390, closes #391, closes #392
Summary
What changed
UPSTREAM_SYNC.md,smoke.sh,smoke.bat,test_app_smoke.pyConfig.pylogging paths,app.pystructured logging,DataFileClass.pycleanup (resData consistency, file handle fix, cleanUp robustness),DataFileRoute.pyreadModelFile/readLogFile routes,model.v.5.4.txtwhitespace cleanupDataFile.js,DataFile.html,ModelFile.js,ModelFile.html,ModelFile.Model.js,DataFile.Model.js,Osemosys.Class.js,Html.Class.js,Routes.Class.js,index.html(MathJax),Config.Model.jsDataModelResult.Class.js,Const.Class.js,Pivot.js,Variables.json,Parameters.jsonNavbar.html→ ver.5.5,Versions.htmlwith MUIOGO-specific changelogWhat was intentionally not taken from upstream v5.5
Home.js,Base.Class.js,CaseRoute.py— upstream didn't change these; MUIOGO's fixes stay as-isUploadRoute.py— upstream change is trivial (unused import); MUIOGO's path traversal protection staysFileClass.py,OsemosysClass.py— MUIOGO's refactored versions kept; upstream changes are subsumedapp.config.js— upstream setsSA_IGNORE_CSS = truewhich is a broad layout toggle; not takenosy.pro.css,osy.prov2.css,osemosys.gif,.vscode/launch.json,FileClassCompressed.py,WebAPP/app.log— passive upstream assets not wired into the appKnown residuals
Test plan
./scripts/setup.sh --check./scripts/smoke.sh— 5 tests passgit ls-files -u— no unmerged pathsgit diff --check— no whitespace errors/#/ModelFilerenders equations (MathJax typeset when available, readable fallback when not)