kubo/plugin
Hector Sanjuan 049256c22f
fix(telemetry): improve vm/container detection (#10944)
* telemetry: use systemd-detect-virt for container/vm detection

Current VM detection is not very accurate and systemd-detect-virt does exactly
what's needed under a miriad of virtualization platforms.

The downside is that we are running a system command which is uglier and might
perhaps flip anti-viruses or something.

* telemetry: improve vm/container detection with pure go

replace systemd-detect-virt with file-based detection to avoid:
- security risks from executing external binaries
- unnecessary repeated detection (now cached with sync.Once)
- missing detection on non-systemd systems

removes false positives:
- cpu hypervisor flag (indicates capability, not guest status)
- generic dmi strings that match physical hardware
- overlay filesystem check (used by immutable distros)

Co-authored-by: Andrew Gillis <11790789+gammazero@users.noreply.github.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2025-09-08 20:38:47 +02:00
..
loader feat: telemetry plugin (#10866) 2025-08-18 20:46:05 +02:00
plugins fix(telemetry): improve vm/container detection (#10944) 2025-09-08 20:38:47 +02:00
daemon.go chore: clean migration 2023-11-29 12:29:59 +01:00
daemoninternal.go refactor: rename to kubo 2022-07-06 18:40:37 +02:00
datastore.go style: gofumpt and godot [skip changelog] (#10081) 2023-08-17 14:02:08 +02:00
fx.go feat: add fx options plugin 2022-08-12 17:04:29 -04:00
ipld.go style: gofumpt and godot [skip changelog] (#10081) 2023-08-17 14:02:08 +02:00
plugin.go doc(plugin): document plugin config 2020-05-12 21:56:02 -07:00
Rules.mk plugin: create plugin API and loader, add ipld-git plugin 2017-07-12 21:53:59 +02:00
tracer.go style: gofumpt and godot [skip changelog] (#10081) 2023-08-17 14:02:08 +02:00