Repository navigation
Harden Organization mutual growth between FreeOS and openXYOS - #23
Merged
Merged
Conversation
Add a token-gated /api/freeos ingest-export bridge so a healthy sidecar accepts FreeOS packs without a login wall. Loop and pack wait on the control plane only when reachable or bundled, persist landed surfaces, and localize timeline yes/no. Organization gets assemble/pack/loop/produce.
CodeQL py/path-injection flagged glob/is_dir on user pack_dir. Jail packs under FREEOS_HOME and list children only after an inline realpath/startswith guard on the same string used to open.
6 of 12 tasks
CodeQL still treated pack_dir as a user path into isdir/listdir.
Only the basename is used, joined under {home}/asset-packs, then
realpath + startswith home. Reject '..' and other unsafe names.
CodeQL kept tainting isdir/listdir through helper dest_s parameters.
Read only {FREEOS_HOME}/asset-packs/latest (the loop already publishes
there) and list children after realpath + startswith on that root.
8 tasks done
7 of 10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Deepens the Octop ↔ openXYOS self-growth loop on 组织 after #21. A healthy sidecar no longer ends with
已推送到控制面: false/ “started but not reachable” as the normal outcome.FreeOS → openXYOS: pack / loop POST
/api/freeos/ingestwith a sharedFREEOS_INGEST_TOKEN(no login wall). Employees, talent, plugins, skills, and MCP land in the sidecar sql.js DB. The Organization page shows progress, localized 是/否, and a landed receipt (created/updatedcounts).openXYOS → FreeOS:
/api/freeos/exportplus “导入到 FreeOS” compile live employees into chat-usable colleagues (org-<slug>).Loop: wait/start the sidecar only when a URL is explicit, a probe succeeds, or a bundled runtime exists. Default
127.0.0.1:3780is not treated as “must apply remotely” when nothing is listening. Durable proof stays in{FREEOS_HOME}/openxyos-mirror/<tenant>/.#21 install paths still resolved:
FREEOS_OPENXYOS_HOME,%LOCALAPPDATA%\FreeOS\openxyos,FREEOS_OPENXYOS_INSTALL/$INSTDIR\openxyos,{home}/openxyos, portableorg-sidecar.Also: “从语料生产同事” (local distill or ima/cloud pointer → blueprint → spawn). One-click Ollama pull now registers the model on the
ollamaprovider.CodeQL (this follow-up):
apply.pyno longer joins userpack_dirinto filesystem paths. Apply reads only{FREEOS_HOME}/asset-packs/latest(the loop already publishes there), withrealpath+startswithconfinement andassert_safe_host_path. CodeQL on this PR is green (no new alerts).Constraints kept: 8-item sidebar, 组织 label, no login wall / WebView2 panic, desktop
OCTOP_DESKTOPpaths. Version stays 0.0.1. Do not merge; do not replace Release assets.Target branch
main(continue from Install-time openXYOS workdir, 组织 rename, folder picker, group chats #21 tip)developType of change
remote_applied=falsewhen sidecar is healthy; CodeQL path-injection)Test plan
Checklist
CHANGELOG.md(Unreleased)docs/asset-loop.mdupdated