Repository navigation
feat(security): vulnerability management (agent 1.12.0) - #7
Merged
Merged
Conversation
Detect CVEs on IdaraOS Agent devices, like Defender's vulnerability management, rated Critical / High / Medium / Low: - Agent 1.12.0 collects a read-only software inventory (Windows build + UBR, registry/Store apps, Node.js runtimes incl. nvm-windows, global npm packages and packages pinned in package-lock.json / pnpm-lock.yaml under users' code folders) at most every 4 h and uploads only when its hash changed (POST /api/updater/v1/inventory; check-in returns inventoryHash). - Global vulnerability catalog synced from Microsoft MSRC (Windows fixed builds/KBs), NVD (version ranges for curated desktop apps), OSV.dev (npm, cached per package version) and CISA KEV (known exploited). - Matcher derives per-device findings with open/fixed history; daily sync via POST /api/internal/vulnerabilities/sync or "Sync now". - Portal: Security > Vulnerabilities (overview, weaknesses, software inventory) and a Vulnerabilities tab on each device; new security.vulnerabilities module. - Migration 0031_vulnerability_management; unit tests for severity, CVSS 3.x, version ranges, MSRC/NVD/OSV parsing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
….lock - Sync runs itself: instrumentation.ts starts an hourly check that runs a full MSRC/NVD/KEV sync + re-match when the catalog is over a day old (fresh installs fill themselves; VULNERABILITY_SYNC=off to use your own cron). - Permissions: a new module can inherit grants once, when first created; security.vulnerabilities inherits from security.software-updates so existing device admins get it without re-editing roles. - Catalog grows from 23 to 58 NVD-verified products (Zoom, Python, Go, .NET, ASP.NET Core, Visual Studio 2022, VirtualBox, VPN clients, ...), with versionFromName for apps whose installer version doesn't match NVD. - Inventory is re-tagged against the current catalog at every match, so new products are found on devices that haven't re-uploaded. - NVD: skip CVEs whose description limits them to Android/iOS/macOS/Linux/ ChromeOS (853 false positives), and replace ranges for every CVE in a page. - Agent parses yarn.lock (v1 and Berry). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each environment's deploy job reads the optional Key Vault secret nvd-api-key (masked; a notice when it's missing) and sets NVD_API_KEY on the container app, so vulnerability feed syncs use NVD's higher rate limit. The dev compose stack takes NVD_API_KEY from the git-ignored deployment/docker/.env. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Vulnerability management for IdaraOS Agent devices, similar to Microsoft Defender's: each device's installed software is matched against public vulnerability feeds and every finding is rated Critical / High / Medium / Low.
package-lock.json,pnpm-lock.yamlandyarn.lockunder users' code folders (bounded scan). New endpointPOST /api/updater/v1/inventory.instrumentation.tschecks hourly and runs a full sync when the catalog is over a day old. Opt out withVULNERABILITY_SYNC=offand callPOST /api/internal/vulnerabilities/syncinstead. "Sync now" button for admins.security.vulnerabilitiesmodule (view / edit = Sync now). When first created, it's granted to every role that already has Software Updates view/edit (once only).nvd-api-keyand setsNVD_API_KEY(higher NVD rate limit; notice if missing).0031_vulnerability_management(idempotent).Test plan
types.test.tsfailures (also failing onmain).nvd-api-keysecret is picked up on the first deploy (look for the absence of the "No nvd-api-key" notice).After deploying, update devices to agent 1.12.0 (Software Updates → Update all agents, or auto-update) so they start reporting.
🤖 Generated with Claude Code