Commit Graph
21076 Commits
Author SHA1 Message Date
4ba761aa29 fix(hostimage): harden nbd export against command injection (#25530)
The nbd export endpoints interpolated the request disk_id into
shell commands (sh -c with the joined qemu-nbd command line, and
ps|grep for the process check), so a crafted disk_id could execute
arbitrary commands as root on the host image service.

- Require the disk_id to be a plain UUID in both export and close
  endpoints
- Run qemu-nbd with argv instead of sh -c
- Check the export process via its pid file and kill -0 instead of
  shell pipelines
- Add unit tests for the validation and the process check

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-09-03 23:47:54 +08:00
Zexi Li 453f74626a feat(llm): support cancel and resume for instant model import (#25519)
Allow deleting models to abort in-flight downloads, persist import input for resume-import after killed status, and clean up import cache on delete.
2026-09-03 20:14:23 +08:00
742297e4a6 fix(mcp-server): do not expose server-monitor as an MCP tool (#25511)
server-monitor sends arbitrary QMP/HMP commands (pmemsave, migrate,
etc.) to a running guest, which exceeds the semantics of monitoring.
As an MCP tool it could be triggered without human awareness through
LLM prompt injection or the tool-request endpoint.

Remove the mcp-desc registration tag from ServerMonitorOptions so
climcgen no longer registers the tool, drop its mention from the MCP
instructions, and add a regression test asserting it is not exposed.
The climc command and the permission-gated region API are unchanged.

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-09-03 19:22:19 +08:00
1312d0d4cf fix: mask tokens and passwords in logs (#25513)
Full session tokens were written to logs in policy.go, mcclient auth,
oidc handler and the webconsole session manager; guest root passwords
were logged by the linux fsdriver and the nbdkit mount command; MCP
tool arguments and full JSON-RPC bodies (which may contain
server-reset-password passwords) were logged by the llm agent.

Truncate tokens in log messages, drop or mask password values and
log only the tool/method name for MCP calls.

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-09-03 19:20:36 +08:00
屈轩 1192272f88 fix(region): vmware vm nic sync (#25508) 2026-09-03 18:27:27 +08:00
d504b5a815 fix(hostman): harden deployer command execution against shell injection (#25498)
- Quote the heredoc delimiter when writing deploy params to the
  deployer guest, so deploy content, passwords and other
  user-supplied values are written literally and shell expansions
  ($(...), backticks, $VAR) inside them are not evaluated by the
  remote shell
- Escape JSON passed via --deploy-params as a single POSIX shell
  word, preventing single quotes in user data from breaking out of
  the argument
- Add unit tests covering injection payloads

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-09-03 10:55:54 +08:00
00ecc7a0a4 fix(webconsole): harden climc shell command execution against injection (#25496)
- Run ssh via exec.Command argv instead of "bash -c" string
  interpolation, so user-supplied fields can no longer escape into
  local shell commands on the webconsole server
- Quote every interpolated value (env, command, args) as a POSIX
  shell word, so they stay literal data on the remote shell
- Validate username charset and limit target_ip to climc pod or container
- Add unit tests covering injection payloads

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-09-03 10:52:21 +08:00
Jian QiuandQiu Jian 7d3d0edda9 fix: apigateway returns cors_hosts to browser (#25493)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-09-03 00:50:14 +08:00
Jian QiuandQiu Jian 296e862fac fix: update rpm build scripts for openeuler (#25474)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-09-02 20:28:36 +08:00
Zexi Li 9efa08e883 Feat/aiproxy model context window (#25479)
* feat(aiproxy): expose catalog context window on AI models

Populate known 1M+ context windows in catalog seed data and return
context_window in AI model list/detail API responses.

* feat(aiproxy): add instance test-connectivity and set-models actions

Add provider instance test-connectivity using stored ai_key secrets,
and set-models to import selected catalog models while skipping
existing model_key rows. Register corresponding climc perform commands.
2026-09-02 17:43:29 +08:00
wanyaoqi 963d560d88 fix(region): disable startrun snapshotsCleanup (#25447) 2026-09-02 15:59:06 +08:00
Zexi Li d96a09ac44 fix(cloudcommon): fix err shadowing in GetPropertyDistinctField (#25470) 2026-09-02 15:58:03 +08:00
屈轩 d5115bc8ba fix(region): optimized cachedimage list (#25466) 2026-09-02 11:40:13 +08:00
屈轩 c03cd96d78 fix(region): support filter cloudprovider by regions (#25461) 2026-09-01 16:05:51 +08:00
屈轩 e8d289e2b3 fix(region): vendor update (#25458) 2026-09-01 13:41:34 +08:00
屈轩 ad6e07588f fix(apigateway): update mcp api addr (#25456) 2026-09-01 13:41:18 +08:00
屈轩 7aaabf461c fix(region): optimized cachedimage list (#25451) 2026-09-01 09:18:09 +08:00
Zexi Li 73d9b55d41 feat(llm): add llm_sku clone API and climc support (#25443) 2026-08-27 19:01:03 +08:00
wanyaoqi 4a86e68f6c fix(region,host): optimize snapshot delete (#25438)
use rebase/commit merge backing chain instead of convert.
2026-08-27 16:27:29 +08:00
wanyaoqi 4dad33757a fix(region): batch detach isolated devices (#25419) 2026-08-27 13:49:05 +08:00
wanyaoqi 6ffabcadfa fix(region): set default stop time 300s (#25430) 2026-08-26 15:14:24 +08:00
Jian QiuandQiu Jian e35d0c4b2b fix: allow empty host networks (#25428)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-08-26 14:40:01 +08:00
屈轩 120d78435e fix(region): not real delete glance cachedimage (#25424) 2026-08-25 14:58:59 +08:00
wanyaoqi 5e5e6e37a3 fix(host-deployer): no noeed clean failed mountpoints (#25420) 2026-08-25 11:34:48 +08:00
屈轩 0aa5a45420 fix(region): v2v migrate uefi check (#25417) 2026-08-24 15:40:48 +08:00
屈轩 cbcec789d3 fix(glance): avoid receive notify when glance restart (#25410) 2026-08-24 15:05:08 +08:00
wanyaoqi 64556ed212 fix(host): guest desc correct rbd disk path (#25395) 2026-08-24 14:37:23 +08:00
wanyaoqi 96cf8c0724 fix(host-health,region): host health detect network available add check peers and default gw (#25357) 2026-08-24 14:33:50 +08:00
屈轩 8cc852dcb9 fix(region): skip hostlocal wire when detect vmware net (#25405) 2026-08-24 14:19:34 +08:00
屈轩 92f10cfc42 fix(region): show more error info for vmware net detect (#25401) 2026-08-24 10:21:30 +08:00
Zexi Li 177c09758a feat(llm): merge SKU envs into container and validate prefer_hosts updates (#25387)
Allow local_path SKUs to update prefer_hosts on edit, and overlay SKU envs onto the primary container with same-key override.
2026-08-21 14:27:32 +08:00
Jian QiuandQiu Jian 72f0867b9c fix: unhandled errors (#25375)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-08-20 17:30:16 +08:00
Zexi Li f2fdb1a3ed fix(host): skip unmanage interface when bridge slave has no address (#25380)
Only call tryUnmanageInterface when the slave interface has IPv4 or IPv6
addresses configured, avoiding unnecessary NetworkManager unmanage on
address-less interfaces during bridge setup.
2026-08-20 17:26:45 +08:00
屈轩 c504d7fd47 fix(region): skip sync cloudpods kvm secgroup (#25377) 2026-08-20 10:45:28 +08:00
wanyaoqi 99d579ab58 fix(region,host): guest stop add timeout options,and check is_force (#25365)
* fix(host): check qga guest-get-osinfo error

* fix(region,host): guest stop add timeout options and is_force check
2026-08-20 10:15:18 +08:00
屈轩 17f9360055 fix(region): support cloudpods ipset (#25373) 2026-08-19 18:56:34 +08:00
Zexi Li 3700689831 fix(scheduler): report HAMI hostFree before min-memory filter (#25369)
Shortage messages now show remaining GPU memory from matched devices
before min-memory filtering, so users see actual free capacity instead of 0.
2026-08-19 16:39:33 +08:00
Jian QiuandQiu Jian 944b41f292 fix: storage set metadata in post_create (#25364)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-08-19 16:28:16 +08:00
wanyaoqi 1391cf730c fix(host): add options enabel vendor/device pt usb dev (#25347)
* fix(host): add options enabel vendor/device pt usb dev

* fix(host): add audio device for spice driver
2026-08-19 14:12:04 +08:00
Jian QiuandQiu Jian d130206269 fix: deploy qga path not found error (#25351)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-08-19 14:03:24 +08:00
Zexi Li 7fde987f93 feat(llm): check sku schedule info (#24910) 2026-08-19 12:17:53 +08:00
Zexi Li 999071048b fix(aiproxy): remove 30-day limit on custom usage range (#25354)
Allow querying usage statistics over custom date ranges longer than 30 days.
2026-08-17 16:59:44 +08:00
Jian QiuandQiu Jian 3b31fe811c fix: disk backup filter by server_id (#25345)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-08-15 09:38:02 +08:00
Jian QiuandQiu Jian a6b47a4738 feature: support idp driver attribtue_names (#25334)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-08-15 00:16:06 +08:00
wanyaoqi 3dfc9279b6 Fix/device add params2 (#25313)
* fix(host): device add params use interface

* fix(host): ide device addr
2026-08-15 00:15:09 +08:00
屈轩 f46730d262 fix(glance): detect windows iso (#25341) 2026-08-14 19:01:47 +08:00
Zexi Li d072d5a110 fix(monitor): nodata 告警补充 ResIdKey 与 AlertDetails (#25337)
为 CommonAlertMetricDetails 填充资源 ID tag,并在无数据评估匹配中序列化 AlertDetails,便于下游定位资源。
2026-08-14 16:08:31 +08:00
屈轩 78da5f7c52 fix(glance): iso image detect (#25330) 2026-08-14 14:55:18 +08:00
屈轩 e23126a2e6 fix: update telegraf version (#25323) 2026-08-14 14:53:20 +08:00
Zexi Li f94f0791c3 feat(aiproxy): encrypt ai_key and virtual_key secrets at rest (#25327)
Store provider secrets and virtual keys encrypted with AES, add hash-based VK lookup, and migrate existing plaintext rows on init.
2026-08-14 14:40:29 +08:00