@shieldaai/security-watch 1.2.1 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,113 @@
1
+ # Security Watch with Shirudo
2
+
3
+ [Shirudo](https://shirudo.dev), an open-source project from OpenAI and Cisco announced in November 2026, blocks one vulnerable code path on running Linux machines with signed eBPF programs it calls upatches (shields), without a restart, while the real fix is prepared. Its documented shield types are for the kernel and for Java (JVM) applications. It is pre-release, and production machines need its kernel patches and a TPM 2.0.
4
+
5
+ The two do different jobs:
6
+
7
+ - **Security Watch** finds out early that something you run is affected: advisories, the known-exploited catalog, news before a CVE exists, and who has to act.
8
+ - **Shirudo** knows which machines run which image, and whether a shield covers them.
9
+
10
+ ```text
11
+ Advisories, news, KEV, EPSS ──┐
12
+ ├──► Security Watch ──► alert to the owner (Slack, email)
13
+ Shirudo's SBOM store ─────────┘ │ ▲
14
+ (shirudo-sboms) │ └── Shirudo's node_vulns export (mitigations)
15
+ ▼
16
+ shield-candidates: critical or exploited findings,
17
+ with what is known for writing a shield
18
+ │
19
+ ┌───────────────────────┴───────────────────────┐
20
+ ▼ ▼
21
+ Person or agent writes and tests a shield The real fix, started at once
22
+ ▼ │
23
+ Approval, signing, Shirudo trial run, then block ▼
24
+ │ Fix deployed, new SBOM
25
+ └──► status back in alerts ◄────────────────────┘
26
+ (mitigated, waiting, exposed) finding gone, shield withdrawn
27
+ ```
28
+
29
+ Security Watch does not write, sign or load shields, and does not connect to Shirudo: it reads files. Setup takes three steps.
30
+
31
+ ## 1. Watch your images: `shirudo-sboms`
32
+
33
+ Shirudo's backend keeps one CycloneDX SBOM per image build in an SBOM store, at `<image_id>/<image_version>/<root>/sbom.cdx.json`. `shirudo-sboms` copies them into Security Watch's [SBOM folder](sbom.md#the-sbom-folder), one file per image:
34
+
35
+ ```sh
36
+ # For an s3:// store, first copy it to a folder: aws s3 sync s3://fleet-sboms ./sbom-store
37
+ security-watch shirudo-sboms --store ./sbom-store --directory ./watch/sboms --running ./watch/shirudo/node-vulns.jsonl
38
+ security-watch shirudo-sboms --store ./sbom-store --directory ./watch/sboms --running ./watch/shirudo/node-vulns.jsonl --config ./watch/security-watch.yaml --apply
39
+ ```
40
+
41
+ The first command prints what it would do and writes nothing; `--apply` writes it. Run the second on the same timer as the export below.
42
+
43
+ - **The system ID is the image ID**, so it stays the same when a new version rolls out, and a finding is not reported again for every version.
44
+ - **With `--running`** (the export of step 3), only images that machines run are watched, with the versions they run. When several versions run at once (a rolling upgrade, a canary), their SBOMs are merged into one, so the old version stays watched until no machine runs it. The note on the system says which versions run on how many hosts. A running version whose SBOM is not in the store yet is named in the plan; the other versions are still watched.
45
+ - **Without `--running`**, the newest version of every image in the store is taken (natural order: 2026.11.10 is newer than 2026.11.9).
46
+ - **The file's time is the time of the sync**, refreshed at least daily even when nothing changed: the store (and the export) confirm the list is current, so a stable image does not turn stale seven days after it was built. Run the sync on a timer.
47
+ - **When a version has several builds** (roots), the most recently stored one is used, and the plan says so.
48
+ - **It writes only its own files.** Each file it writes is marked with a property; a file of the same name that it did not write is never replaced, and is reported. An image whose ID another SBOM in the folder already uses as its system ID is not written; with `--config`, the systems described by hand in the inventory are checked too. Files are written compactly under a hidden temporary name and renamed into place, so a scan never reads half of one, and one that would be larger than the 20 MiB a scan reads is not written.
49
+ - **It removes a file only when its image is gone**: no machine in a complete export runs it, or, without an export, it is no longer in the store. When an image's SBOMs cannot be read, the store holds no image (not mounted, a failed copy), the export is empty, or a row of the export is unusable, every file is kept as it was, so a scan never loses a system because the sync could not see it. When a running version's SBOM is missing or unreadable, an earlier list is kept rather than replaced by one without that version. A run that would remove more than half of the images it watches removes nothing unless `--allow-removals` is given. Rows of machines bound to no image are skipped without a problem.
50
+ - Links (symbolic links) in the store are not followed (an image replaced by one keeps its file), names that are not Shirudo image IDs are ignored, an image ID too long for a file name is reported, and the SBOM folder and the store must be separate folders, neither inside the other. The plan's `problems` list everything left out or kept, and the command then exits with code 2.
51
+
52
+ Security Watch does not match operating-system packages (deb, rpm, apk); Shirudo's own scan covers those. What it adds for an image is the application libraries inside it, such as the JARs of a Java service, which are also what Shirudo's JVM shields protect. Add owners and notes for these systems by hand if you want them in alerts, in `systems.yaml` beside the folder.
53
+
54
+ ## 2. List the shield candidates
55
+
56
+ ```sh
57
+ security-watch shield-candidates --config ./watch/security-watch.yaml --unmitigated --omit-location
58
+ ```
59
+
60
+ The list, its readiness levels and the privacy options are described in [shield candidates](mitigations.md#shield-candidates). `fix_known` candidates carry the fix commit, the best input for writing a shield, by hand or with an agent such as Codex. A shield still goes through Shirudo's approval, signing and trial run.
61
+
62
+ ## 3. Show Shirudo's status in Security Watch
63
+
64
+ Shirudo's backend keeps a `shirudo.node_vulns` table in ClickHouse: one row per machine and finding, with an `exposure` value. Export it to a file on a timer, with the credentials you already use:
65
+
66
+ ```sh
67
+ # Every 5 to 15 minutes, from cron or a systemd timer.
68
+ clickhouse-client --query "
69
+ SELECT node_id, host_name, toString(status) AS status, image_id, image_version, toString(source) AS source,
70
+ vuln_id, package, installed, fixed, toString(exposure) AS exposure, upatch_id
71
+ FROM shirudo.node_vulns
72
+ FORMAT JSONEachRow" > ./watch/shirudo/node-vulns.jsonl.tmp \
73
+ && mv ./watch/shirudo/node-vulns.jsonl.tmp ./watch/shirudo/node-vulns.jsonl
74
+ ```
75
+
76
+ ```yaml
77
+ # watch/security-watch.yaml
78
+ mitigations:
79
+ - format: shirudo
80
+ file: ./shirudo/node-vulns.jsonl # relative to this file
81
+ # max_age_minutes: 120 (default)
82
+ # systems: { fleet-os: web-shop } (only if an image is watched under another system ID)
83
+ ```
84
+
85
+ The same export feeds `shirudo-sboms --running`. Shirudo's words are shown in the shared [mitigation status](mitigations.md#mitigation-status) words:
86
+
87
+ | Shirudo `exposure` | Shown as |
88
+ | ---------------------- | ---------------------------------------------------- |
89
+ | `shielded` | mitigated |
90
+ | `shield_pending` | mitigation waiting to load |
91
+ | `shield_module_absent` | mitigation failed to load |
92
+ | `shield_excludes_node` | mitigation excludes the host |
93
+ | `shield_withdrawn` | mitigation withdrawn |
94
+ | `exposed_no_shield` | not mitigated |
95
+ | `none` | (a machine with no finding, counted among the hosts) |
96
+ | anything else | status unknown |
97
+
98
+ ```text
99
+ Shirudo: mitigated on 3 of 4 hosts; 1 not mitigated. (export 2026-11-24 11:55 UTC; a mitigation is temporary and does not close the finding) In place: parser-deser-guard
100
+ ```
101
+
102
+ A machine whose `status` is `stale` (it stopped reporting) proves nothing about its shields: its rows count as status unknown. Rows of machines bound to no image (an empty `image_id`) belong to no system and are left out without a warning. When the machines running an image have no row for a finding at all, the status says that Shirudo lists no such finding there. That is common for findings Security Watch learned from news or from an advisory that Shirudo's scanner does not have yet. Link a shield to it in Shirudo's `upatch_fixes` table, or add the kernel advisory to `kernel_vulns`, as its documentation describes.
103
+
104
+ `doctor` checks the export: that it can be read, how old it is, and which image IDs match no system.
105
+
106
+ ## Limits
107
+
108
+ - Built from Shirudo's documentation of November 2026 and tested against files in that format, not against a running Shirudo deployment. Shirudo is pre-release and its tables and store layout may change.
109
+ - `shirudo-sboms` reads a store in a folder (`file://`); copy an `s3://` store first. It does not read `image.json`, whose fields are not documented.
110
+ - Rows are matched to library findings by package name, so Shirudo's `package` column must use the names Security Watch uses (Maven `group:artifact`, as Trivy reports them). A name written differently makes the status say that Shirudo lists no such finding.
111
+ - Security Watch does not fill Shirudo's `kernel_vulns` or `upatch_fixes`: it has no kernel version-range matching, and those tables are Shirudo's to change.
112
+ - Fix links and exploit entries are only as complete as the advisories. Many have neither.
113
+ - `readiness` describes the information available, not whether a shield is possible or safe.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shieldaai/security-watch",
3
- "version": "1.2.1",
3
+ "version": "1.3.0",
4
4
  "description": "Self-hosted security alerts for the software you run: reads your lockfiles (npm, Python, Go, Rust, Java and 7 more ecosystems) or any SBOM, watches new advisories and security news, and alerts you on Slack or email.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",