# Advisory feed and signing
Source: https://shld.app/docs/advisory-feed · Updated 2026-11-22 · Synced from shld f6c77924

> Understand the public advisory sources, signed bundle format, publication triggers, host sync states, and behavior during a feed outage.


This page explains where shld gets advisory data and how the agent decides whether to trust it. It also describes what happens to matching when fresh data is unavailable.

## Public inputs

The producer builds per-ecosystem bundles from public sources. It adds CISA KEV and EPSS overlays to the bundle records.

| Ecosystem | Primary source |
| --- | --- |
| Debian | Debian security tracker |
| Ubuntu | Ubuntu security data |
| Alpine | Alpine secdb |
| PyPI, npm, Go, crates.io | OSV exports for each ecosystem |
| WordPress core, plugins, themes | CVE List V5 |
| Risk overlays | CISA KEV and EPSS |

shld uses these inputs as advisory evidence. Source coverage, record quality, version parsing, and the host inventory all affect the result.

## WordPress plugin closures

The producer checks plugin slugs from the WordPress bundle through the public WordPress.org plugin API. It caches results for 24 hours, prioritizes unchecked and oldest-due slugs, and retains the last known status after an API error.

A `security-issue` closure adds one high-severity `wporg-closed` record with a stable `WPORG-CLOSED-` ID. The agent shows one removal finding per plugin and site for all versions. It emails only when the closure also has KEV, EPSS of at least 0.1 (a 10% exploit likelihood), critical severity, or a malicious ID.

The finding replaces CVE update groups with WP-CLI commands to deactivate, delete, and verify removal in the site path. The synthetic advisory uses the existing platform contract and links to the WordPress.org plugin page.

Other closure reasons add no record. A successful response without a closed status removes the record on the next due check. Older agents show an unfixed advisory on the dashboard and send no email.

## Bundles and the manifest

The public endpoint is `https://feed.shld.app/manifest.json`. The schema-2 manifest names full bundles and direct deltas, with compressed and normalized hashes, sizes, record counts, and source facts. Bundle IDs cover language ecosystems, WordPress, and release-qualified distro data such as `deb@debian-12` and `apk@alpine-3.20`.

The publisher signs the exact manifest payload with Ed25519. The signature travels in an update envelope with the payload. The feed key differs from the RSA-3072 key used for binary releases.

A manifest expires exactly 48 hours after generation. The publisher uploads immutable bundle and delta objects first, then publishes the signed manifest. The agent rejects lower versions, same-version forks, bad signatures, incorrect object hashes, and manifests generated more than five minutes ahead.

## When the publisher rebuilds

The platform Worker checks the manifest at minute 05 of each hour. It dispatches the bundle workflow when any of these conditions holds:

- The manifest cannot be read or has no valid generation time.
- The manifest is at least 5 hours 50 minutes old.
- The CISA KEV `Last-Modified` value is newer than the latest KEV source time in the manifest.

A scheduled GitHub workflow runs every 6 hours as a backup. It skips a fresh manifest. A manual workflow dispatch always builds.

The agent has its own schedule. `shld run` checks for new bundles every hour by default, and its `--feed-interval` flag changes that interval. The minimum accepted interval is one minute. A one-shot `shld scan` uses cached data without starting background refresh.

## Sync and failure behavior

The agent requests only bundle IDs needed by its inventory and distro release. It caches verified state in `<state>/advisory-feed`. Network failures retain that state, and retries use exponential backoff with jitter from one minute toward one hour.

| State | Matching behavior |
| --- | --- |
| `current` | Match the verified bundle. |
| `expired` | Report coverage loss and keep matching the last verified bundle. |
| `stale_source` | Report aged source data and keep matching the verified bundle. |
| `not_synced` | Report that no sync has succeeded. |
| `missing_from_manifest` | Report the missing ecosystem and stop new alerts for it. |
| `verify_failed` | Report the verification failure and stop new alerts for that bundle. |
| `no_bundle_for_release` | Report the unsupported distro release. |

A bad replacement signature leaves the cache intact. The affected bundle stops producing new matches. An expired previously verified bundle can still match, with a coverage finding to make the age visible.

Every non-current selected bundle contributes to `advisory-data` coverage. Coverage findings open after ten minutes of presence within fifteen minutes of agent running time, clear after one clean hour, and have a twenty-four-hour reopening guard. `sudo shld doctor` reports each selected bundle's state.

## Freshness and history

The default source-lag budget is 12 hours from the producer's fetch time. A later upstream publication timestamp remains informational. The producer can retain a failed ecosystem's previous bundle and source times, which leads hosts to report `stale_source` rather than treating the missing refresh as clean data.

The agent uses a direct delta only when its size is at most half the full bundle. It falls back to a full bundle after a missing or invalid delta, then verifies the merged content before activation.

## Limits

Signature verification establishes data integrity under the feed key. It does not establish source completeness or prove that a package is safe. Expired and stale-source matching preserves the last verified evidence with an explicit coverage gap.

## Related

- [How shld decides to email](/docs/alerts)
- [Supported systems](/docs/supported-systems)
- [What leaves your server](/docs/data-handling)
- [Limits and coverage](/limits)
