@shieldaai/security-watch 1.2.1 → 1.4.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.
Files changed (47) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/CONTRIBUTING.md +2 -0
  3. package/README.md +69 -42
  4. package/SECURITY.md +4 -1
  5. package/dist/check.d.ts +193 -0
  6. package/dist/check.js +1000 -0
  7. package/dist/cli.js +301 -6
  8. package/dist/config.d.ts +22 -0
  9. package/dist/config.js +32 -0
  10. package/dist/cve-now.js +2 -0
  11. package/dist/delivery.js +30 -0
  12. package/dist/engine.d.ts +25 -0
  13. package/dist/engine.js +64 -4
  14. package/dist/index.d.ts +8 -1
  15. package/dist/index.js +3 -0
  16. package/dist/inventory.d.ts +2 -1
  17. package/dist/inventory.js +2 -3
  18. package/dist/manifests.d.ts +7 -0
  19. package/dist/manifests.js +16 -0
  20. package/dist/mcp-server.d.ts +256 -0
  21. package/dist/mcp-server.js +755 -0
  22. package/dist/mitigations.d.ts +137 -0
  23. package/dist/mitigations.js +426 -0
  24. package/dist/rehearsal.d.ts +25 -0
  25. package/dist/rehearsal.js +2 -0
  26. package/dist/sbom.d.ts +12 -1
  27. package/dist/sbom.js +37 -7
  28. package/dist/shield-candidates.d.ts +97 -0
  29. package/dist/shield-candidates.js +251 -0
  30. package/dist/shield-inputs.d.ts +49 -0
  31. package/dist/shield-inputs.js +297 -0
  32. package/dist/shirudo-sboms.d.ts +62 -0
  33. package/dist/shirudo-sboms.js +598 -0
  34. package/dist/sources.d.ts +2 -0
  35. package/dist/sources.js +14 -0
  36. package/dist/store.js +6 -4
  37. package/dist/types.d.ts +31 -0
  38. package/dist/vex.d.ts +62 -0
  39. package/dist/vex.js +246 -0
  40. package/docs/agents.md +139 -0
  41. package/docs/configuration.md +20 -1
  42. package/docs/mitigations.md +139 -0
  43. package/docs/offline-advisory-preview.md +2 -2
  44. package/docs/sbom.md +4 -4
  45. package/docs/shirudo.md +113 -0
  46. package/npm-shrinkwrap.json +237 -0
  47. package/package.json +10 -5
@@ -0,0 +1,139 @@
1
+ # Temporary mitigations: shields, policies and VEX
2
+
3
+ A fix takes time to test and roll out. In the meantime a temporary mitigation can block the attack: a runtime shield that blocks one code path ([Shirudo](shirudo.md)), an eBPF policy (Tetragon, KubeArmor), a firewall rule in front of the service, or a live kernel patch. Security Watch does not write, sign or load any of these. It runs nothing on your machines and needs no privileges there, and a mitigation that blocks the wrong thing can take production down. It helps in three ways:
4
+
5
+ 1. **`shield-candidates`** lists the findings worth a mitigation, with what is known for writing one and what is missing.
6
+ 2. **Mitigation status** shows, in alerts and reports, how many of the hosts running an affected system are covered, read from a file your mitigation tool writes.
7
+ 3. **`vex`** writes an OpenVEX document so that other scanners know what Security Watch knows.
8
+
9
+ A mitigation is temporary. Security Watch never closes a finding because of one: the finding stays open until the fix is deployed and the next inventory shows the fixed version.
10
+
11
+ ## What a mitigation needs
12
+
13
+ A shield or a narrow policy blocks one code path or one kind of request, so someone has to find it first. These help, best first:
14
+
15
+ 1. **The fix itself**: a fix commit or patch link. Its diff shows the vulnerable function.
16
+ 2. **The package, the installed version and the fixed version.** The difference between the two releases contains the fix, with more noise.
17
+ 3. **Public exploit code**, to test that the mitigation stops the attack and nothing else.
18
+ 4. **The weakness type** (CWE) and the conditions for exploitation, to keep it narrow.
19
+
20
+ A news story that says something is being exploited usually has none of the first three. News alone is therefore never enough: such a finding is listed as `news_only`, with "wait for an advisory".
21
+
22
+ Security Watch keeps these inputs from the sources it already reads: links with their type from OSV and GitHub advisories (code changes such as commits, pull requests and patches are marked `fix`), fix commits from OSV, CWE identifiers from OSV and GitHub, and Exploit-DB, Metasploit, Nuclei and GitHub proof-of-concept entries from cve.now. Only https links without credentials are kept, at most 40 links, 20 commits and 20 weaknesses per advisory. A link to an advisory database (GitHub's, PyPA's, RustSec, the Go and CVE lists) is never a fix. They are not sent to models and are not part of an advisory's revision, so upgrading creates no new revisions, alerts or analyses. OSV advisories gain them at the next scan; GitHub and cve.now advisories when the source next sends them. `explain` shows them per advisory.
23
+
24
+ ## Shield candidates
25
+
26
+ ```sh
27
+ security-watch shield-candidates --config ./watch/security-watch.yaml
28
+ ```
29
+
30
+ The command reads the database and changes nothing. By default it lists active findings that are critical, or known or reported to be exploited, and leaves out suppressed ones. A malicious package is never listed: it is removed, not mitigated.
31
+
32
+ | Option | Does |
33
+ | ------------------- | ------------------------------------------------------------------------------------------ |
34
+ | `--all` | Every finding that may affect you, suppressed ones included. |
35
+ | `--unmitigated` | Leaves out findings that a current (not out-of-date) status shows mitigated on every host. |
36
+ | `--omit-location` | Leaves out what identifies your systems; use it before handing the list to anyone outside. |
37
+ | `--output NEW.json` | Writes the list to a new private file; never replaces one. |
38
+
39
+ Each candidate has a `readiness`, most ready first:
40
+
41
+ | Readiness | Means |
42
+ | --------------------- | ---------------------------------------------------------------------------------------------------- |
43
+ | `fix_known` | The installed version is affected, and an advisory links the fix commit or patch. |
44
+ | `fixed_version_known` | The installed version is affected and a fixed version is published, but no fix link. |
45
+ | `advisory_only` | An advisory exists, but the installed version is not confirmed affected (no version, product match). |
46
+ | `news_only` | Only news so far. Wait for an advisory or a vendor bulletin. |
47
+
48
+ `missing` lists in plain words what is not known yet, for example that no public exploit code is reported, so the mitigation has to be tested against the fix instead. A candidate also carries its identifiers, the package with its installed and fixed versions, `fix_links`, `fix_commits`, other `references`, `weaknesses`, `public_exploit`, EPSS, the advisories it rests on, its `mitigations` status and where to look.
49
+
50
+ ```json
51
+ {
52
+ "finding_id": "1e35fbcd…",
53
+ "readiness": "fix_known",
54
+ "missing": [
55
+ "No public exploit code reported by the sources read, so a shield cannot be tested against a real attack; test it against the fix instead."
56
+ ],
57
+ "identifiers": ["CVE-2026-20001", "GHSA-aaaa-bbbb-cccc"],
58
+ "package": { "ecosystem": "Maven", "name": "org.example:parser", "installed": "2.4.1", "fixed": "2.4.2" },
59
+ "fix_links": ["https://github.com/example/parser/commit/abcdef1234"],
60
+ "weaknesses": ["CWE-502"],
61
+ "exploited": true,
62
+ "mitigations": [{ "source": "Shirudo", "summary": "Shirudo: mitigated on 0 of 4 hosts; 4 not mitigated." }]
63
+ }
64
+ ```
65
+
66
+ **Before you hand the list to an agent or a service outside your network**, add `--omit-location`. Without it the list includes system IDs, names, owners and the notes from your inventory, package URLs with their qualifiers (which can name a private registry), and links to news articles (a feed can be internal). With it, those are left out and a candidate is known by its `finding_id`; advisory identifiers, package names and versions stay, because a mitigation is written from them.
67
+
68
+ When the inventory cannot be read, a package and its installed version are shown only where an advisory matched exactly one package by version.
69
+
70
+ ## Mitigation status
71
+
72
+ Each mitigation tool writes a [JSON Lines](https://jsonlines.org/) file on a timer (one JSON object per line), and Security Watch reads it at every scan. Up to ten sources:
73
+
74
+ ```yaml
75
+ # watch/security-watch.yaml
76
+ mitigations:
77
+ - format: shirudo # Shirudo's node_vulns export; see the Shirudo guide
78
+ file: ./shirudo/node-vulns.jsonl # relative to this file
79
+ - format: generic # anything else
80
+ name: Edge WAF # shown in alerts; default Shirudo or Mitigations; each source needs its own
81
+ file: ./waf/mitigations.jsonl
82
+ max_age_minutes: 60 # 5 to 10080, default 120: an older file is reported, and its status marked out of date
83
+ systems: # optional: the file's system key -> Security Watch system ID
84
+ shop-frontend: web-shop # without an entry, the key is the system ID
85
+ ```
86
+
87
+ The generic format has one row per host and finding, and one `none` row for a host with nothing to report, so that it is counted:
88
+
89
+ ```json
90
+ {"system_id": "web-shop", "host": "web-1", "identifier": "CVE-2026-20001", "package": "org.example:parser", "status": "mitigated", "mitigation": "waf-rule-42", "expires_at": "2026-12-01T00:00:00Z"}
91
+ {"system_id": "web-shop", "host": "web-2", "identifier": "CVE-2026-20001", "package": "org.example:parser", "status": "unmitigated"}
92
+ {"system_id": "web-shop", "host": "web-3", "status": "none"}
93
+ ```
94
+
95
+ | Field | Required | Meaning |
96
+ | ------------ | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
97
+ | `system_id` | yes | The system, or a key that `systems` maps to one. |
98
+ | `host` | yes | A host, node or instance. The same name in two systems is two hosts. |
99
+ | `identifier` | unless `none` | The CVE, GHSA or other advisory identifier. |
100
+ | `package` | no | Needed for a library finding: the package name as Security Watch writes it (Maven `group:artifact`); compared without case, and for PyPI also without `-`, `_`, `.` differences. One CVE can name several packages, so a row without a package applies only to findings without one (products, news, kernel). |
101
+ | `kernel` | no | `true` for a kernel row: it matches by identifier alone. |
102
+ | `status` | yes | `mitigated`, `pending`, `failed`, `excluded`, `withdrawn`, `expired`, `unmitigated`, `unknown` or `none`. Any other value is `unknown`. |
103
+ | `mitigation` | no | The rule, policy, shield or patch, named in alerts while it is in place or waiting to load. |
104
+ | `expires_at` | no | An ISO time. A `mitigated` or `pending` row past it counts as `expired`. |
105
+
106
+ Write the file under a temporary name and rename it into place (`mv`), so that a scan never reads half of it: its modification time is the export time.
107
+
108
+ At each scan, rows are matched to findings by system, by identifier (the finding's own, or a CVE or GHSA alias of one of its current advisories, not one a news article cites) and, for a library, by package name. A status or exposure value this release does not know is read as `unknown` and reported, in case the tool added one. Each host counts once, by its worst row (not mitigated, expired, withdrawn, excluded, failed, unknown, pending, mitigated). Alerts and digests show up to three sources, and `explain`, `findings` and `shield-candidates` show all:
109
+
110
+ ```text
111
+ Edge WAF: 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: waf-rule-42
112
+ ```
113
+
114
+ When the hosts of a system have no row for a finding, the status says the source lists no such finding there, so nothing is linked to it. That is the most useful line for whoever runs the tool: Security Watch knows of a problem the tool does not.
115
+
116
+ **The status is shown only.** It does not change applicability, priority or routing. A change in it creates no new revision, re-sends nothing and asks no model for a new analysis. A missing, unreadable or empty file is a monitoring-health error, as a failed source is, and findings then show no status from it rather than an old one. A file older than `max_age_minutes`, or dated in the future, is reported the same way, and its status is marked out of date. Lines that cannot be read are skipped, counted and reported; the rest are used. `doctor` reads every file and names system keys that match no system. Rehearsal (`rehearse`) never reads these files.
117
+
118
+ Files are limited to 64 MiB and 500,000 rows. Fields are single-line text of at most 512 characters.
119
+
120
+ ## VEX for other tools
121
+
122
+ ```sh
123
+ security-watch vex --config ./watch/security-watch.yaml --output security-watch.vex.json
124
+ ```
125
+
126
+ `vex` writes an [OpenVEX](https://github.com/openvex/spec) 0.2.0 document for library findings that name an exact package version, so that scanners which read VEX (Trivy, Grype, Docker Scout) and the people reading their reports know what Security Watch knows. It reads the database and the inventory and changes nothing.
127
+
128
+ | Finding | Statement |
129
+ | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
130
+ | Affected | `affected`, with the action: update to the fixed version, or follow the advisory; plus, when a current source shows hosts mitigated, how many, by which source and as of when. |
131
+ | Malicious package | `affected`, action: remove it. |
132
+ | Unknown or conflicting | `under_investigation`. |
133
+ | Not affected (version outside the published ranges) | Only with `--include-not-affected`: `not_affected`, `vulnerable_code_not_present`. |
134
+
135
+ A scanner that reads `not_affected` hides the vulnerability from its own report. Security Watch reaches that conclusion from published version ranges, which can be wrong, so it is left out unless you ask for it.
136
+
137
+ The product is the package URL from your inventory, published with only descriptive qualifiers (`classifier`, `type`, `arch`, `distro`, `os`, `epoch`; others, such as `repository_url`, can name a private registry) and the component's version, or one built from the ecosystem, name and version when the inventory's cannot be read. A package URL whose version is not the component's is left out. The mitigation part of an action names your tool and host counts; `--omit-mitigations` leaves it out. News, product and health findings have no package to point at and are left out; with `--output`, the command says how many were left out and why. `--system ID` limits the document to one system, `--author TEXT` names who stands behind it (default `Security Watch`). The document identifier depends only on the statements, so an unchanged state gives the same identifier on every run. A mitigation never changes a status: a mitigated finding is still `affected`. Checked with Trivy 0.71.2: `trivy sbom --vex security-watch.vex.json your.cdx.json` hides the `not_affected` vulnerabilities and keeps the others.
138
+
139
+ Statuses are saved at each scan and judged again whenever they are read: `findings`, `explain`, `shield-candidates` and `vex` mark a status out of date (`stale_reason`) when its export is now older than `max_age_minutes`, its source is no longer configured, or a mitigation it counted has expired, so an old status is never shown as current after scans stop.
@@ -4,7 +4,7 @@ Security Watch compares a system inventory with advisory evidence and records
4
4
  why a finding applies. Begin with its published fictional inventory and advisory
5
5
  fixture, then inspect the result before configuring real monitoring.
6
6
 
7
- This example uses `@shieldaai/security-watch@1.2.1`, an in-memory database,
7
+ This example uses `@shieldaai/security-watch@1.4.0`, an in-memory database,
8
8
  no provider credentials and no notification delivery. It is a fixture check of
9
9
  matching behavior, not an audit of real dependencies.
10
10
 
@@ -16,7 +16,7 @@ Use Node.js 24.10 or newer in a new directory:
16
16
  mkdir watch-demo
17
17
  cd watch-demo
18
18
  npm init -y
19
- npm install --ignore-scripts --save-exact @shieldaai/security-watch@1.2.1
19
+ npm install --ignore-scripts --save-exact @shieldaai/security-watch@1.4.0
20
20
  ```
21
21
 
22
22
  ## Run the fictional inventory
package/docs/sbom.md CHANGED
@@ -103,7 +103,7 @@ systems: [] # systems you describe by hand can sit beside them
103
103
  - **A file that cannot be read** is reported as an import warning (`doctor`, and a monitoring-health finding at scan time) and left out; the other systems are still watched.
104
104
  - **Operating-system packages** (deb, rpm, apk and similar, found in container-image SBOMs) are not matched against advisories. They are listed once as a notice, which does not degrade monitoring. Use your image scanner for them.
105
105
 
106
- CycloneDX JSON 1.4 to 1.6 and SPDX JSON 2.2 and 2.3 are accepted, including GitHub's REST response (`{"sbom": {...}}`). Each file is bounded to 20 MiB and 20,000 packages, and the folder to 1,000 files. For Docker, mount the folder read-only beside the inventory, for example `--mount type=bind,src="$(pwd)/watch/sboms",dst=/config/sboms,readonly`.
106
+ CycloneDX JSON 1.2 to 1.7 and SPDX JSON 2.2 and 2.3 are accepted; a later CycloneDX 1.x is read by the 1.7 rules and named once as a notice, and 2.x is refused. `security-watch sbom` writes 1.6, which more tools read. GitHub's REST response is accepted too (`{"sbom": {...}}`). Each file is bounded to 20 MiB and 20,000 packages, and the folder to 1,000 files. For Docker, mount the folder read-only beside the inventory, for example `--mount type=bind,src="$(pwd)/watch/sboms",dst=/config/sboms,readonly`.
107
107
 
108
108
  ## From a CI pipeline
109
109
 
@@ -127,7 +127,7 @@ jobs:
127
127
  steps:
128
128
  - uses: actions/checkout@v7
129
129
  - id: sbom
130
- uses: ShieldaAI/security-watch@v1.2.1
130
+ uses: ShieldaAI/security-watch@v1.4.0
131
131
  with:
132
132
  system-id: checkout-api
133
133
  owner: Dana, platform team
@@ -143,7 +143,7 @@ To use an SBOM made by another tool, pass it as `sbom-file`; the action checks t
143
143
 
144
144
  ```yaml
145
145
  - run: trivy image --format cyclonedx --output image.cdx.json "$IMAGE"
146
- - uses: ShieldaAI/security-watch@v1.2.1
146
+ - uses: ShieldaAI/security-watch@v1.4.0
147
147
  with:
148
148
  sbom-file: image.cdx.json
149
149
  system-id: checkout-image
@@ -160,7 +160,7 @@ Any job with Node.js 24.10 or newer can run the command:
160
160
  security-watch-sbom:
161
161
  image: node:24-slim
162
162
  script:
163
- - npx --yes @shieldaai/security-watch@1.2.1 sbom --system-id checkout-api --output security-watch.cdx.json --upload https://watch.example.com:8787
163
+ - npx --yes @shieldaai/security-watch@1.4.0 sbom --system-id checkout-api --output security-watch.cdx.json --upload https://watch.example.com:8787
164
164
  artifacts:
165
165
  paths: [security-watch.cdx.json]
166
166
  ```
@@ -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.
@@ -0,0 +1,237 @@
1
+ {
2
+ "name": "@shieldaai/security-watch",
3
+ "version": "1.4.0",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "@shieldaai/security-watch",
9
+ "version": "1.4.0",
10
+ "license": "Apache-2.0",
11
+ "dependencies": {
12
+ "@renovatebot/pep440": "6.0.0",
13
+ "fast-xml-parser": "5.12.1",
14
+ "ipaddr.js": "2.5.0",
15
+ "nodemailer": "10.2.1",
16
+ "parse5": "8.0.1",
17
+ "semver": "7.8.5",
18
+ "yaml": "2.9.1",
19
+ "zod": "4.6.7"
20
+ },
21
+ "bin": {
22
+ "security-watch": "dist/cli.js"
23
+ },
24
+ "engines": {
25
+ "node": ">=24.10.0"
26
+ }
27
+ },
28
+ "node_modules/@nodable/entities": {
29
+ "version": "3.1.0",
30
+ "resolved": "https://registry.npmjs.org/@nodable/entities/-/entities-3.1.0.tgz",
31
+ "integrity": "sha512-LsS/DjHr+uDM647Gru/cA8+J3a3HfhttwCKLyuoyN7yXTFCxKBtSgMQBvrW9yNPa2/zDRUNuGPaH5QUFoa4arQ==",
32
+ "funding": [
33
+ {
34
+ "type": "github",
35
+ "url": "https://github.com/sponsors/nodable"
36
+ }
37
+ ],
38
+ "license": "MIT"
39
+ },
40
+ "node_modules/@renovatebot/pep440": {
41
+ "version": "6.0.0",
42
+ "resolved": "https://registry.npmjs.org/@renovatebot/pep440/-/pep440-6.0.0.tgz",
43
+ "integrity": "sha512-L/HtOYInkZGLJCe9h/gpsm2Gig0JWzyvWajrEVK+pP6BGfRl1eFzg7jyVcis7tmht7hvpau/+pMzF60geiLq6w==",
44
+ "license": "Apache-2.0",
45
+ "engines": {
46
+ "node": ">=24.10.0",
47
+ "pnpm": ">=10.0.0"
48
+ }
49
+ },
50
+ "node_modules/anynum": {
51
+ "version": "1.0.1",
52
+ "resolved": "https://registry.npmjs.org/anynum/-/anynum-1.0.1.tgz",
53
+ "integrity": "sha512-N6//FLET/tXYNM/F6ABca1oH6fWB+KlTt909Le28WMDBk8oaT4vY17DCrwg2MvmuqUKt3Ni4N5dGJ/EoBgcO6A==",
54
+ "funding": [
55
+ {
56
+ "type": "github",
57
+ "url": "https://github.com/sponsors/NaturalIntelligence"
58
+ }
59
+ ],
60
+ "license": "MIT"
61
+ },
62
+ "node_modules/entities": {
63
+ "version": "8.1.0",
64
+ "resolved": "https://registry.npmjs.org/entities/-/entities-8.1.0.tgz",
65
+ "integrity": "sha512-kxL7msIffSuh9aaFAMD7rxAIuTRMAHMeBtgHW2yUdWw732ZNh4MehkF2gdjvtdmikkaIP9bFDDJOPlsvm7avrA==",
66
+ "license": "BSD-2-Clause",
67
+ "engines": {
68
+ "node": ">=20.19.0"
69
+ },
70
+ "funding": {
71
+ "url": "https://github.com/fb55/entities?sponsor=1"
72
+ }
73
+ },
74
+ "node_modules/fast-xml-builder": {
75
+ "version": "1.3.2",
76
+ "resolved": "https://registry.npmjs.org/fast-xml-builder/-/fast-xml-builder-1.3.2.tgz",
77
+ "integrity": "sha512-OX91VSlShLPDgRZV7tk/YQ4l8tT75QziF5Ixg8g4PFbCVPjuTWwN+yQfAxLJ0dufJpprdOd6HlM74Jhd39TcBQ==",
78
+ "funding": [
79
+ {
80
+ "type": "github",
81
+ "url": "https://github.com/sponsors/NaturalIntelligence"
82
+ }
83
+ ],
84
+ "license": "MIT",
85
+ "dependencies": {
86
+ "path-expression-matcher": "^1.6.2",
87
+ "xml-naming": "^0.3.0"
88
+ }
89
+ },
90
+ "node_modules/fast-xml-parser": {
91
+ "version": "5.12.1",
92
+ "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.12.1.tgz",
93
+ "integrity": "sha512-wR8dO/fx+z8C5exuem1e7BKOWvjsuzvjS/tvA/Xu3Z1zQqJGcXrPzXbcAiaMgp2KjreEROcTkmnnisrcmJ2hYQ==",
94
+ "funding": [
95
+ {
96
+ "type": "github",
97
+ "url": "https://github.com/sponsors/NaturalIntelligence"
98
+ }
99
+ ],
100
+ "license": "MIT",
101
+ "dependencies": {
102
+ "@nodable/entities": "^3.1.0",
103
+ "fast-xml-builder": "^1.3.2",
104
+ "is-unsafe": "^2.0.3",
105
+ "path-expression-matcher": "^1.6.2",
106
+ "strnum": "^2.5.1",
107
+ "xml-naming": "^0.3.0"
108
+ },
109
+ "bin": {
110
+ "fxparser": "src/cli/cli.js"
111
+ }
112
+ },
113
+ "node_modules/ipaddr.js": {
114
+ "version": "2.5.0",
115
+ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.5.0.tgz",
116
+ "integrity": "sha512-aq+t5NAc+cS6rZQQVWC2x98CPqGtKKTMDd4Gaodv0wShnItdKg/51djkGJ1hqH+Oy0ivDftCbSLCQob8zso01w==",
117
+ "license": "MIT",
118
+ "engines": {
119
+ "node": ">= 10"
120
+ }
121
+ },
122
+ "node_modules/is-unsafe": {
123
+ "version": "2.0.3",
124
+ "resolved": "https://registry.npmjs.org/is-unsafe/-/is-unsafe-2.0.3.tgz",
125
+ "integrity": "sha512-ZBllczCCO267vgdFb6Tq3pv+LhHaCiGMdr+ZsuL+OopruAg7S+3ZDs1vD0RPC0uSrkjzbraxaGjtX1YBxjPeFQ==",
126
+ "funding": [
127
+ {
128
+ "type": "github",
129
+ "url": "https://github.com/sponsors/NaturalIntelligence"
130
+ }
131
+ ],
132
+ "license": "MIT"
133
+ },
134
+ "node_modules/nodemailer": {
135
+ "version": "10.2.1",
136
+ "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-10.2.1.tgz",
137
+ "integrity": "sha512-ZrDNsPFoDMwefNs7sJwrYiEJ/CG4ClJWDZv05iNJsEBWa8GRDry1QJHTJxsuTAY9eDDKjX4k+q3SxslXJOao7w==",
138
+ "license": "MIT-0",
139
+ "engines": {
140
+ "node": ">=20.0.0"
141
+ }
142
+ },
143
+ "node_modules/parse5": {
144
+ "version": "8.0.1",
145
+ "resolved": "https://registry.npmjs.org/parse5/-/parse5-8.0.1.tgz",
146
+ "integrity": "sha512-z1e/HMG90obSGeidlli3hj7cbocou0/wa5HacvI3ASx34PecNjNQeaHNo5WIZpWofN9kgkqV1q5YvXe3F0FoPw==",
147
+ "license": "MIT",
148
+ "dependencies": {
149
+ "entities": "^8.0.0"
150
+ },
151
+ "funding": {
152
+ "url": "https://github.com/inikulin/parse5?sponsor=1"
153
+ }
154
+ },
155
+ "node_modules/path-expression-matcher": {
156
+ "version": "1.6.2",
157
+ "resolved": "https://registry.npmjs.org/path-expression-matcher/-/path-expression-matcher-1.6.2.tgz",
158
+ "integrity": "sha512-enSlaiat05iasnzmgNxRj8reFdj3puY2QpNgP1aPIaVfT6nn9ICuPoFlKHk8EN22HcwewshO+mN2DGbkCEOtqQ==",
159
+ "funding": [
160
+ {
161
+ "type": "github",
162
+ "url": "https://github.com/sponsors/NaturalIntelligence"
163
+ }
164
+ ],
165
+ "license": "MIT",
166
+ "engines": {
167
+ "node": ">=14.0.0"
168
+ }
169
+ },
170
+ "node_modules/semver": {
171
+ "version": "7.8.5",
172
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz",
173
+ "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==",
174
+ "license": "ISC",
175
+ "bin": {
176
+ "semver": "bin/semver.js"
177
+ },
178
+ "engines": {
179
+ "node": ">=10"
180
+ }
181
+ },
182
+ "node_modules/strnum": {
183
+ "version": "2.5.1",
184
+ "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.5.1.tgz",
185
+ "integrity": "sha512-UM4nTLWzQiDBseVxUGxN0wJzIk0UU89Qi7pKXz9qISo+lhviJikTuikBsK/oFRlpvYHvSdz0TVoLyQ+sEpYwxA==",
186
+ "funding": [
187
+ {
188
+ "type": "github",
189
+ "url": "https://github.com/sponsors/NaturalIntelligence"
190
+ }
191
+ ],
192
+ "license": "MIT",
193
+ "dependencies": {
194
+ "anynum": "^1.0.1"
195
+ }
196
+ },
197
+ "node_modules/xml-naming": {
198
+ "version": "0.3.0",
199
+ "resolved": "https://registry.npmjs.org/xml-naming/-/xml-naming-0.3.0.tgz",
200
+ "integrity": "sha512-ghig2TBE/H11aOVgmahA3MhimvkBr6JIYknH/Dhdk10nXwdbIqBJsbfMxpvFPG8bAw77gN29aQWvKpmVoPlvPQ==",
201
+ "funding": [
202
+ {
203
+ "type": "github",
204
+ "url": "https://github.com/sponsors/NaturalIntelligence"
205
+ }
206
+ ],
207
+ "license": "MIT",
208
+ "engines": {
209
+ "node": ">=16.0.0"
210
+ }
211
+ },
212
+ "node_modules/yaml": {
213
+ "version": "2.9.1",
214
+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.1.tgz",
215
+ "integrity": "sha512-3NxN8+78OdzbT7C/WjGsyfPAtJaN3FNDsWxv7Y7mcDsT/oOmgW8BpyQQFFBnvZE3j9Y2Sdz1ULFLezL7Eb2yFw==",
216
+ "license": "ISC",
217
+ "bin": {
218
+ "yaml": "bin.mjs"
219
+ },
220
+ "engines": {
221
+ "node": ">= 14.6"
222
+ },
223
+ "funding": {
224
+ "url": "https://github.com/sponsors/eemeli"
225
+ }
226
+ },
227
+ "node_modules/zod": {
228
+ "version": "4.6.7",
229
+ "resolved": "https://registry.npmjs.org/zod/-/zod-4.6.7.tgz",
230
+ "integrity": "sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg==",
231
+ "license": "MIT",
232
+ "funding": {
233
+ "url": "https://github.com/sponsors/colinhacks"
234
+ }
235
+ }
236
+ }
237
+ }
package/package.json CHANGED
@@ -1,14 +1,16 @@
1
1
  {
2
2
  "name": "@shieldaai/security-watch",
3
- "version": "1.2.1",
3
+ "version": "1.4.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
+ "mcpName": "io.github.ShieldaAI/security-watch",
5
6
  "type": "module",
6
7
  "license": "Apache-2.0",
7
8
  "engines": {
8
9
  "node": ">=24.10.0"
9
10
  },
10
11
  "bin": {
11
- "security-watch": "dist/cli.js"
12
+ "security-watch": "dist/cli.js",
13
+ "security-watch-mcp": "dist/mcp-server.js"
12
14
  },
13
15
  "exports": {
14
16
  ".": {
@@ -24,7 +26,8 @@
24
26
  "CHANGELOG.md",
25
27
  "LICENSE",
26
28
  "SECURITY.md",
27
- "CONTRIBUTING.md"
29
+ "CONTRIBUTING.md",
30
+ "npm-shrinkwrap.json"
28
31
  ],
29
32
  "scripts": {
30
33
  "build": "node scripts/build.mjs",
@@ -41,8 +44,10 @@
41
44
  "check:docker": "node scripts/check-docker.mjs",
42
45
  "format": "prettier --write .",
43
46
  "format:check": "prettier --check .",
44
- "prepack": "npm run build",
45
- "evaluate:outcomes": "npm run build && node scripts/evaluate-alerts.mjs"
47
+ "prepack": "npm run build && node scripts/shrinkwrap.mjs",
48
+ "evaluate:outcomes": "npm run build && node scripts/evaluate-alerts.mjs",
49
+ "postpack": "node scripts/shrinkwrap.mjs --remove",
50
+ "pack:plugins": "node scripts/pack-plugins.mjs"
46
51
  },
47
52
  "dependencies": {
48
53
  "@renovatebot/pep440": "6.0.0",