SkybuDocs

Ferdigheter · Apper

Fix vulnerabilities

Read an app's known vulnerabilities, fix the most urgent first (update a package, rebuild, move off a runtime past end of life), accept a risk only when the user decides, and gate CI on them.

skill://apps/fix-vulnerabilitiesAgenter leser den med resources/read eller skills_read. Den er skrevet på engelsk, for agentene.

Skybu records the packages of every build (from the lockfiles and from the built image) and matches them against a copy of the public advisories it keeps itself: OSV for the language and operating system packages, CISA's list of vulnerabilities exploited in the wild, and EPSS scores for how likely an exploit is. No package list leaves Skybu. The list is for the version that runs now, and it is checked again when a new version goes live and when the advisories are refreshed (about once a day).

In short

  1. list_vulnerabilities with the appId: the open ones come first, most urgent at the top.
  2. Work from the top. Each has next: the step that fixes it.
  3. Update the package (or rebuild, or change the runtime), deploy, and check the list again.
  4. When something cannot be fixed now, ask the user whether to accept the risk, with a reason and an end date; never accept on your own.
  5. In CI, skybu app vulnerabilities <app> --fail-on exploited stops a pipeline while an exploited one is open.

Step 1: read the list

{ "name": "list_vulnerabilities", "arguments": { "appId": "<app id>", "status": "open" } }

Each entry has the package, its installedVersion and the fixedVersion (null when there is none yet), the advisoryId (the CVE when there is one; the GHSA and other ids are in aliases), severity, exploited (in CISA's list: attackers use it now), epss (the chance of an exploit in the next 30 days, 0–1), devOnly (a development package: it is not in the running app), direct and path (which of the app's own dependencies brings it in), and rebuildFixes.

The order is the order to work in: exploited in the wild first, then a high EPSS, then critical ones with a fix. Vulnerabilities with no fix yet and development-only packages come last. For the whole organisation, get_security_overview ranks the apps the same way and gives each its most urgent step.

runtime and os say whether the language version and the image's operating system are past their end of life (eol: true). They are not in the list, because no single package update fixes them.

Step 2: what each fix means

next saysWhat to do
Update <package> to <version>A direct dependency: raise it in package.json (or requirements.txt, go.mod, …), update the lockfile and deploy.
… comes in through a → bAn indirect one: update a to a version that pulls in the fix. If none does yet, pin it with overrides (npm), resolutions (yarn) or pnpm.overrides, then deploy.
Rebuild the appThe fix is in the base image's operating system packages. Deploy again without changes.
No fixed version … is published yetRemove or replace the package if it matters, or ask the user about accepting the risk for a while.

A runtime past end of life (runtime.eol: true) gets no security fixes at all. For Railpack builds, raise the version in engines.node (or .python-version, .ruby-version, go.mod), or the FROM image in a Dockerfile, to a supported one (runtime.latest is the newest of its line), test and deploy.

After the deploy is live, list_vulnerabilities again: fixed ones have status: "fixed".

Step 3: accepting a risk

Only the user decides that a risk is acceptable, and only an owner or administrator of the organisation can record it. Ask: what the vulnerability is, why it may not matter here (the code path is not used, the app is internal), and until when. Then:

{ "name": "accept_vulnerability", "arguments": { "vulnerabilityId": "<id>", "reason": "Only used to format names; update planned with the March release", "expiresAt": "2027-03-01T00:00:00Z" } }

expiresAt is at most 90 days ahead (acceptance_too_long otherwise). The vulnerability is accepted until then and opens again by itself; the acceptance stays when the app is rebuilt. Every acceptance and reopening is in the audit log. reopen_vulnerability takes it back sooner.

Step 4: CI

skybu app vulnerabilities <project>/<app> --fail-on exploited     # exit 1 while one exploited in the wild is open
skybu app vulnerabilities <project>/<app> --fail-on critical --json

--fail-on critical also fails on critical ones; accepted and development-only ones never fail it. For an SBOM to hand to a customer or auditor: skybu app sbom <app> (CycloneDX) or --format spdx; get_inventory lists the packages and licences of one deployment.

Things to know

  • A deployment built before Skybu recorded packages has no list: checked: false. Deploy again to get one.
  • A brand-new package name (one no app on Skybu used before) is checked within the hour, not at once.
  • Static sites list their lockfiles' packages; their operating system and runtime do not run, so they get no end-of-life warning.
  • Organisations can not yet make a vulnerability block deploys: Skybu only warns.