Version: 0.1 (Draft) Status: Specification Phase
This document defines the security model for VAM — VSAD Arch Manager.
VAM is a system-management platform. Security is a first-class architectural concern.
VAM's security architecture is designed to reduce and control package risk. Absolute security claims are not made.
VAM must never reduce package installation to:
download random script
↓
sudo bash
↓
hope for the best
| Principle | Description |
|---|---|
| Least Privilege | Operations execute with minimum required privileges |
| Explicit Trust | Trust is declared, not assumed |
| Defense in Depth | Multiple security layers |
| Fail Secure | Failures deny by default |
| Transparency | Security operations are visible to the user |
VAM uses two related but distinct security concepts:
Package trust concerns the authenticity and integrity of packages.
| Concern | Description |
|---|---|
| Source Authenticity | Who created the package |
| Repository Trust | Which repositories are trusted |
| Signatures | Cryptographic signatures |
| Hashes/Checksums | Integrity verification |
| Integrity Verification | Package has not been tampered with |
| Version Verification | Package version is expected |
| Controlled Repositories | Only trusted repositories are used |
Runtime safety concerns how packages execute.
| Concern | Description |
|---|---|
| Declared Capabilities | Package declares what it needs |
| Controlled Privilege | Privilege is explicitly granted |
| Execution Boundaries | Package operates within defined boundaries |
| Path Restrictions | Package can only access declared paths |
| Safe Argument Handling | Input is validated |
| Controlled Privileged Operations | Elevated operations go through VAM broker |
Metadata alone does not guarantee a package is safe.
VAM enforces trust through:
- Capability declarations — package must declare what it needs
- Capability validation — VAM checks declarations against policy
- Runtime monitoring — execution is bounded by declared capabilities
- Privilege brokering — elevated operations go through VAM
VAM uses path/network/privilege grants:
| Capability Type | Description | Example |
|---|---|---|
| path | Filesystem access | path = "/var/log" |
| network | Network access | network = "outbound" |
| privilege | Elevated operations | privilege = "systemctl" |
Capabilities are declared in the package manifest:
[[capabilities]]
type = "path"
access = "/var/log"
mode = "read"
[[capabilities]]
type = "network"
access = "outbound"
protocol = "https"
[[capabilities]]
type = "privilege"
access = "systemctl"
operations = ["restart", "status"]Before package execution, VAM validates:
- All declared capabilities are explicitly granted
- No undeclared capabilities are requested
- Capability scope matches declared scope
- User has acknowledged capability requirements
During execution:
- Path capabilities — VAM restricts filesystem access to declared paths
- Network capabilities — VAM controls network access based on declarations
- Privilege capabilities — VAM brokers privileged operations through its API
- VAM handles privilege escalation — the user interacts with VAM, not raw sudo
- VAM provides a controlled privileged-operation API — packages request elevated operations through defined interfaces
- VAM itself does not simply run as root — privilege is requested narrowly
- Packages do not freely call sudo — they use VAM's privileged-operation API
Privileged operations are performed through direct syscalls through VAM broker.
Package
↓
request privileged operation
↓
VAM validates capability
↓
VAM checks user consent
↓
VAM performs operation
↓
return result to package
VAM should use narrowly scoped privileged operations.
Examples of privileged operations:
- systemctl service management
- filesystem writes to protected locations
- network configuration changes
- user/group management
- system configuration changes
Privileged operations require explicit user consent.
The consent model is an OPEN DECISION.
Package Signature
↓
Repository Signature
↓
Manifest Validation
↓
Integrity Checksums
↓
Capability Validation
↓
Dependency Verification
The package trust/signature cryptographic model is an OPEN DECISION.
1. Verify repository signature
2. Verify package signature
3. Validate manifest structure
4. Check integrity checksums
5. Validate capability declarations
6. Check dependency availability
7. Grant or deny installation
| Repository | Trust Level | Control |
|---|---|---|
| Main VAM Repository | High | Tightly controlled by VSAD |
| VAM Plugins Repository | Variable | Open with review process |
Users configure which repositories are trusted.
Trust configuration is an OPEN DECISION.
A local .vampkg is not automatically trusted merely because it is local.
Official repository trust and local package trust are distinct concepts.
VAM uses minimal isolation with capability checks.
The runtime provides:
- Environment control
- Declared path restrictions
- Capability validation
- Privilege boundary enforcement
Full sandboxing is not used. VAM relies on capability declarations and validation.
Packages receive only declared environment variables.
Undeclared environment variables are not passed to package code.
Packages can only access declared paths.
Undeclared path access is denied.
Package execution is monitored for:
- Undeclared capability usage
- Path access violations
- Privilege escalation attempts
- Unexpected behavior patterns
1. Verify repository trust
2. Verify package signature
3. Validate manifest
4. Check integrity
5. Validate capabilities
6. Check dependencies
7. Request user consent for capabilities
8. Extract to temporary location
9. Verify extracted contents
10. Move to final location
11. Register package
- Extract to isolated temporary directory
- Validate extracted contents before moving
- Prevent path traversal attacks
- Validate file permissions
- Check for unexpected files
1. Verify update authenticity
2. Validate update compatibility
3. Create rollback point
4. Install update
5. Verify update success
6. Register rollback
VAM should log:
- Package installations
- Package removals
- Privilege escalations
- Capability grants
- Security violations
- Configuration changes
The logging and audit model is an OPEN DECISION.
- Unauthorized package installation
- Privilege escalation without consent
- Path traversal attacks
- Command injection
- Undeclared capability usage
- Tampered packages
- Untrusted repositories
- Malicious packages with declared capabilities
- Social engineering attacks
- Compromised development environments
- Zero-day vulnerabilities in dependencies
VAM assumes:
- The VAM binary itself is trustworthy
- The user understands capability implications
- The system is not already compromised
- Repository infrastructure is secure
| ID | Decision | Status |
|---|---|---|
| OD-06 | Package trust/signature cryptographic model | OPEN |
| OD-27 | User consent model for privileged operations | OPEN |
| OD-28 | Trust configuration format | OPEN |
| OD-29 | Security violation response | OPEN |
| OD-30 | Audit log format and storage | OPEN |
This security model interacts with:
- Architecture — how security is implemented in VAM Core
- Package Specification — capability declarations, manifest format
- Repository Specification — repository trust, signatures
- Configuration Specification — security configuration