Server: - ApproveUpdate() now calls computeAndStorePackageHash() to download artifact, compute SHA256, and store in DB - GET /dashboard/updates/verify-hash endpoint for agents to fetch hashes Database: - Migration 040: added expected_sha256 VARCHAR(64) to current_package_state table Agent: - HandleInstallUpdates() fetches expected hash from server before install - DNFInstaller.VerifyHash() downloads and verifies package hash - APT/Docker/Winget/WindowsUpdate: hash verification stubs (fail-open) - LRU cache (100 entries) to reduce server load Security: - Hash verification happens BEFORE package manager install - Mismatch blocks installation with error logged - Fail-open: hash fetch failure doesn't block, but verification failure does
4 lines
67 B
Go
4 lines
67 B
Go
package cache
|
|
|
|
// Init initializes the cache module
|
|
func Init() {}
|