sdk

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2026 License: MIT

README

Cadestro SDK

Reusable Linux system capabilities: package managers, users, services, filesystems, disk encryption, networking, antivirus, CA trust, and more, behind one consistent, dependency-injected API — plus the crypto helpers the agent and control server share.

MIT, and intended to be embedded in other people's tools. See ../LICENSING.md.

Repository layout

Path Purpose
sys/ Device capability implementations
pkg/ Package-manager capabilities
crypto/ Enrollment CSR, certificate, and at-rest AEAD helpers
cryptotest/ Shared X.509 fixtures for the capability and agent test suites
logging/ Metadata-only logging helpers
archtest/ Architectural fitness functions over this module
adversary/ Cross-capability adversarial suites
docs/ Capability and contributor documentation

Design

Every capability takes an injected exec.Runner and, where more than one implementation is genuinely supported, an explicit Backend. There is no process-global backend selector and no ambient runner; archtest fails the build when either reappears. Shipped implementations are concrete — systemd for service actions, LUKS for disk encryption — and the public API does not expose selectors for implementations that do not exist.

Leaf purity

This module is proto-free and imports nothing else in this repository; the leaf-purity guard in archtest fails the suite the moment any package — test files included — grows an in-repo import edge.

Verify

Run the canonical standalone-module gate:

./scripts/verify.sh

It checks formatting, build, vet, static analysis, Go tests, and docref. GOWORK=off is intentional so the result matches how a consumer outside this repository resolves the module.

Useful focused commands:

env GOWORK=off go test -p 1 ./...
docref check

See CONTRIBUTING.md for contribution mechanics and docs/04-contributing/01-release-coordination.md for how the modules resolve each other.

Directories

Path Synopsis
Package crypto provides cryptographic utilities for certificate management.
Package crypto provides cryptographic utilities for certificate management.
Package pkg provides a uniform package-manager abstraction for Linux.
Package pkg provides a uniform package-manager abstraction for Linux.
sys
antivirus
Package antivirus manages an on-host antivirus engine through an injected exec.Runner.
Package antivirus manages an on-host antivirus engine through an injected exec.Runner.
catrust
Package catrust manages the host's system-wide CA trust anchors through an injected exec.Runner (plus the fs.Manager for the privileged file writes).
Package catrust manages the host's system-wide CA trust anchors through an injected exec.Runner (plus the fs.Manager for the privileged file writes).
desktop
Package desktop discovers active graphical desktop sessions on the host so user-scoped actions (Flatpak --user installs, shell scripts that need a real $HOME and DBus session bus, etc.) can fan out to every currently-signed-in user instead of running under the agent's own root context.
Package desktop discovers active graphical desktop sessions on the host so user-scoped actions (Flatpak --user installs, shell scripts that need a real $HOME and DBus session bus, etc.) can fan out to every currently-signed-in user instead of running under the agent's own root context.
dns
Package dns manages a host's DNS resolver configuration through an injected exec.Runner.
Package dns manages a host's DNS resolver configuration through an injected exec.Runner.
encryption
Package encryption manages disk encryption through an injected exec.Runner.
Package encryption manages disk encryption through an injected exec.Runner.
exec
Package exec provides command execution utilities for Linux system management.
Package exec provides command execution utilities for Linux system management.
exec/exectest
Package exectest provides a fake exec.Runner for unit-testing capability packages with no host, no sudo, and no container.
Package exectest provides a fake exec.Runner for unit-testing capability packages with no host, no sudo, and no container.
firewall
Package firewall is a cross-backend abstraction for host packet-filter management.
Package firewall is a cross-backend abstraction for host packet-filter management.
fs
Package fs provides privileged filesystem operations for Linux system management, driven by an injected exec.Runner rather than a process-global privilege backend.
Package fs provides privileged filesystem operations for Linux system management, driven by an injected exec.Runner rather than a process-global privilege backend.
inventory
Package inventory provides lightweight system inventory collection using standard Linux interfaces (/proc, /etc, standard tools) without requiring osquery.
Package inventory provides lightweight system inventory collection using standard Linux interfaces (/proc, /etc, standard tools) without requiring osquery.
log
Package log reads system logs through an injected exec.Runner.
Package log reads system logs through an injected exec.Runner.
netconfig
Package netconfig manages a host's per-interface IP / routing / MTU configuration through an injected exec.Runner.
Package netconfig manages a host's per-interface IP / routing / MTU configuration through an injected exec.Runner.
network
Package network manages WiFi connection profiles through an injected exec.Runner.
Package network manages WiFi connection profiles through an injected exec.Runner.
notify
Package notify sends system-wide notifications to logged-in users through an injected exec.Runner.
Package notify sends system-wide notifications to logged-in users through an injected exec.Runner.
osquery
Package osquery integrates the osquery binary for system queries through an injected exec.Runner.
Package osquery integrates the osquery binary for system queries through an injected exec.Runner.
reboot
Package reboot provides system reboot detection and scheduling through an injected exec.Runner.
Package reboot provides system reboot detection and scheduling through an injected exec.Runner.
remote
Package remote pulls files or directory trees onto a managed machine from one of three sources: a public HTTP URL, a version-controlled repository (Git in v1, with a pluggable interface for future drivers), or an anonymous S3-compatible endpoint.
Package remote pulls files or directory trees onto a managed machine from one of three sources: a public HTTP URL, a version-controlled repository (Git in v1, with a pluggable interface for future drivers), or an anonymous S3-compatible endpoint.
repo
Package repo configures external package-manager repositories through an injected exec.Runner, the same dependency-injected idiom as pkg/fs/network.
Package repo configures external package-manager repositories through an injected exec.Runner, the same dependency-injected idiom as pkg/fs/network.
service
Package service manages init/service units through an injected exec.Runner.
Package service manages init/service units through an injected exec.Runner.
smart
Package smart reads S.M.A.R.T. disk health via smartctl (smartmontools) through an injected exec.Runner.
Package smart reads S.M.A.R.T. disk health via smartctl (smartmontools) through an injected exec.Runner.
terminal
Package terminal provides PTY-based shell session management for remote terminal access.
Package terminal provides PTY-based shell session management for remote terminal access.
timesync
Package timesync reads a host's clock-synchronization status through an injected exec.Runner.
Package timesync reads a host's clock-synchronization status through an injected exec.Runner.
user
Package user manages Linux user accounts and groups through an injected exec.Runner.
Package user manages Linux user accounts and groups through an injected exec.Runner.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL