Commit Graph

22 Commits

Author SHA1 Message Date
Peter Steinberger 1b313dc4d4 chore(tooling): enforce indexed access in core tests (#105375)
* test(tooling): enforce indexed access in core tests

* test(tui): constrain theme environment overrides

* test(doctor): enforce indexed access in migration fixtures
2026-07-12 14:29:52 +01:00
Yuval Dinodia 9706aae10a fix(plugins): terminate git clone args so git: specs cannot inject options (#102398)
* fix(plugins): terminate git clone args so git: specs cannot inject options

A git: install spec whose base ends in .git or is scp-form was passed to
git clone as a bare positional. A spec beginning with a dash, such as
git:--upload-pack=/path/pwn.git, was parsed by git as an option rather than
a repository, reaching a command-execution primitive. The sibling
git switch --detach -- <ref> in the same files was already hardened; the
clone sites were missed.

Add a -- option terminator before the URL at both clone call sites
(installPluginFromGitSpec and installSkillFromSource) and reject a
leading-dash URL in isGitUrl as defense in depth.

* test(plugins): prove git option rejection boundary

Co-authored-by: yetval <yetvald@gmail.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-09 12:08:39 +01:00
Peter Steinberger f2c6a0eda6 fix(tests): align plugin temp-dir and registry tests with current contracts (#101896) 2026-07-07 23:49:12 +01:00
Bartok 5dff031467 fix(plugins): stage git plugin clone on target filesystem to avoid EXDEV (#99896)
* fix(plugins): stage git plugin clone on target filesystem to avoid EXDEV

Git plugin installs cloned into os.tmpdir() then atomically renamed the
staged repo into ~/.openclaw/git/. When /tmp and the state dir live on
different filesystems (common in Docker with bind-mounted volumes), the
rename failed with EXDEV: cross-device link not permitted.

Stage the clone under the managed git root (same filesystem as the
destination) so the final rename never crosses devices. Falls back to
os.tmpdir() when the managed root cannot be prepared, preserving prior
behavior.

Closes #99885

* fix(plugins): isolate git clone staging per install

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-07-04 21:40:20 -07:00
Vincent Koc 122f29e5ea fix(plugins): preserve install security provenance 2026-06-17 16:11:32 +08:00
Peter Steinberger 21572415c8 docs: document plugin lifecycle helpers 2026-06-04 04:36:44 -04:00
Josh Avant 154f439c81 Add operator install policy and remove dangerous-code install scanners (#89516)
* feat: add operator install policy

* test: cover plain-file plugin install code

* fix: preserve locationless install policy findings

* refactor: remove install-time plugin scanner

* test: remove stale plugin install helper

* fix: preserve before-install builtin scan type

* fix: preserve plugin dependency denylist

---------

Co-authored-by: Mainframe <mainframe@MainfraacStudio.localdomain>
2026-06-03 14:17:29 -07:00
Peter Steinberger 304e2c83c0 chore(lint): enable stricter oxlint rules 2026-05-31 18:59:02 +01:00
Peter Steinberger f4c6c0aec4 refactor: extract net policy package 2026-05-29 09:45:14 +01:00
Peter Steinberger 75fc0bce0f test: speed up plugin install suites 2026-05-27 00:46:44 +01:00
Patrick Erichsen c0312748c4 feat: support git and local skill installs (#84793) 2026-05-20 21:12:03 -07:00
Andrii Furmanets 42b95a9eb1 fix(plugins): harden git ref checkout 2026-05-14 19:56:36 +08:00
Peter Steinberger 74bbac994d test: dedupe git install mock reads 2026-05-13 03:06:23 +01:00
Peter Steinberger 65c5c3faf8 test: dedupe git install mock reads 2026-05-12 22:50:20 +01:00
Peter Steinberger 7b71987627 test: guard git install mock calls 2026-05-12 06:51:09 +01:00
Peter Steinberger 8604774347 test: guard plugin object helpers 2026-05-11 20:56:22 +01:00
Peter Steinberger a1ff767044 test: tighten git plugin install assertions 2026-05-11 00:08:02 +01:00
Vincent Koc 04cd861732 fix(shared): redact repeated URL userinfo 2026-05-01 16:13:42 -07:00
Vincent Koc f7fd8033b4 fix(plugins): redact git install failure urls 2026-05-01 16:13:42 -07:00
Vincent Koc e302353d61 fix(plugins): harden managed plugin install lifecycle 2026-05-01 14:09:04 -07:00
Peter Steinberger ed8f50f240 refactor: simplify plugin dependency handling
Simplify plugin installation and runtime loading around package-manager-owned dependencies, with Jiti reserved for local/TS fallback paths.

Also scans npm plugin install roots so hoisted transitive dependencies are covered by dependency denylist and node_modules symlink checks.
2026-05-01 21:32:22 +01:00
Peter Steinberger 7ddf28c0d4 feat: support git plugin installs 2026-05-01 10:59:10 +01:00