@shieldaai/security-watch 0.1.0-alpha.0 → 1.0.1
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.
- package/CHANGELOG.md +178 -0
- package/CONTRIBUTING.md +4 -2
- package/README.md +173 -48
- package/SECURITY.md +24 -9
- package/dist/assessment.d.ts +12 -1
- package/dist/assessment.js +223 -52
- package/dist/cli.js +340 -27
- package/dist/config.d.ts +62 -2
- package/dist/config.js +88 -5
- package/dist/coverage.d.ts +4 -0
- package/dist/coverage.js +11 -0
- package/dist/cve-now.d.ts +32 -2
- package/dist/cve-now.js +715 -126
- package/dist/cvss4.d.ts +3 -0
- package/dist/cvss4.js +39 -0
- package/dist/delivery.d.ts +34 -2
- package/dist/delivery.js +391 -98
- package/dist/ecosystems.d.ts +23 -0
- package/dist/ecosystems.js +88 -10
- package/dist/engine.d.ts +55 -1
- package/dist/engine.js +101 -20
- package/dist/everyday-words.d.ts +11 -0
- package/dist/everyday-words.js +256 -0
- package/dist/health.d.ts +7 -0
- package/dist/health.js +55 -3
- package/dist/http.d.ts +7 -0
- package/dist/http.js +31 -2
- package/dist/index.d.ts +22 -4
- package/dist/index.js +12 -4
- package/dist/inventory-evidence.d.ts +10 -0
- package/dist/inventory-evidence.js +206 -0
- package/dist/inventory.d.ts +273 -0
- package/dist/inventory.js +210 -17
- package/dist/maintenance.d.ts +5 -0
- package/dist/maintenance.js +73 -5
- package/dist/matching.d.ts +29 -0
- package/dist/matching.js +537 -0
- package/dist/models.d.ts +17 -4
- package/dist/models.js +359 -29
- package/dist/pilot-cases.d.ts +171 -0
- package/dist/pilot-cases.js +330 -0
- package/dist/pilot-input.d.ts +16 -0
- package/dist/pilot-input.js +125 -0
- package/dist/pilot-recall.d.ts +166 -0
- package/dist/pilot-recall.js +231 -0
- package/dist/pilot-report.d.ts +113 -0
- package/dist/pilot-report.js +279 -0
- package/dist/pilot-responses.d.ts +111 -0
- package/dist/pilot-responses.js +159 -0
- package/dist/python-version.d.ts +3 -0
- package/dist/python-version.js +30 -0
- package/dist/rehearsal.d.ts +440 -0
- package/dist/rehearsal.js +372 -0
- package/dist/sbom.d.ts +13 -0
- package/dist/sbom.js +193 -0
- package/dist/source-error.d.ts +17 -1
- package/dist/source-error.js +18 -3
- package/dist/sources.d.ts +2 -2
- package/dist/sources.js +699 -45
- package/dist/store.d.ts +38 -13
- package/dist/store.js +325 -23
- package/dist/types.d.ts +159 -2
- package/dist/util.d.ts +23 -0
- package/dist/util.js +81 -1
- package/dist/vendor/cvss4-reference.d.ts +2 -0
- package/dist/vendor/cvss4-reference.js +789 -0
- package/dist/word-filter.d.ts +3 -0
- package/dist/word-filter.js +3291 -0
- package/docs/alert-outcome-evaluation.md +150 -0
- package/docs/compatibility.md +35 -0
- package/docs/configuration.md +289 -29
- package/docs/cvss-v4-support.md +41 -0
- package/docs/offline-advisory-preview.md +114 -0
- package/docs/offline-rehearsal.md +44 -0
- package/docs/pilot-cases.md +58 -0
- package/docs/pilot-recall.md +124 -0
- package/docs/pilot-report.md +52 -0
- package/docs/validation/alert-outcome-evaluation-2026-11-05.json +2935 -0
- package/docs/validation/cvss-v4-reference-parity-2026-11-05.json +93 -0
- package/docs/validation/rehearsal-accepted-2026-11-05.json +175 -0
- package/docs/validation/rehearsal-unknown-2026-11-05.json +175 -0
- package/docs/vendor/cvss-v4-LICENSE.txt +22 -0
- package/docs/vendor/cvss-v4-provenance.json +38 -0
- package/examples/agent-advisories-2026.json +145 -0
- package/examples/agent-advisory-cases-2026.json +397 -0
- package/examples/libraries.example.txt +4 -2
- package/examples/libraries.example.yaml +2 -0
- package/examples/offline-advisory-preview.mjs +42 -0
- package/examples/rehearsal.json +75 -0
- package/examples/systems.example.yaml +4 -0
- package/package.json +24 -7
- package/docs/quality-review.md +0 -104
package/README.md
CHANGED
|
@@ -1,8 +1,102 @@
|
|
|
1
1
|
# Shielda Security Watch
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Security Watch tells you, within minutes, when a newly reported security problem concerns software you run, and tells you **where to look**. You give it a list of your systems and the libraries they use. It keeps watching public security advisories and security news, compares them with your list, and sends a message to Slack or email when something needs attention.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
It runs on your own server or laptop. Your list of systems stays with you.
|
|
6
|
+
|
|
7
|
+
## The problem
|
|
8
|
+
|
|
9
|
+
There is far more security news than anyone can read, and most of it has nothing to do with you. Waiting for a CVE to be published, or checking once a day, is too late: you need to know quickly what affects _your_ stack. Security Watch does that reading for you. You choose how often it runs and how far back it looks, you set your own risk appetite (which findings alert at once and which wait for a digest), and you add context about your systems. It then sends Slack or email alerts with the evidence and a pointer to the affected system, so you can act right away.
|
|
10
|
+
|
|
11
|
+
## Why a daily check is not enough
|
|
12
|
+
|
|
13
|
+
- **Problems are used by attackers within hours.** A check that runs once a day, or once a week in a build pipeline, leaves most of that day uncovered. In the starter setup Security Watch checks every 30 minutes, and it catches up by itself after downtime.
|
|
14
|
+
- **The CVE entry often arrives late.** A vulnerability is usually discussed in vendor announcements and security news before a complete CVE record with affected versions exists. If you wait for the CVE, you start late. Security Watch reads the news as well as the advisory databases, and raises a "possibly affected, please check" finding as soon as a story names something on your list.
|
|
15
|
+
- **A list that was correct last month is not enough.** A library you already use can become vulnerable tomorrow without any change on your side. The check has to run continuously against the versions you run today, so keep your list current; in the starter setup Security Watch warns when the list has not been updated for a week.
|
|
16
|
+
- **Knowing the library is not knowing the place.** "lodash is vulnerable" does not tell anyone which service, repository or team has to act. Every system and library on your list can carry a short note, and the alert repeats that note.
|
|
17
|
+
|
|
18
|
+
## What an alert looks like
|
|
19
|
+
|
|
20
|
+
This is the message produced by the example list in step 3 below and a fictional advisory:
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
[CRITICAL] express request smuggling (fictional test record)
|
|
24
|
+
Finding: 8aa3f6df3875112d087d95f4ae8b23cd32a81fd24b7fdf01fb1a92720be41bf7
|
|
25
|
+
Delivery: f464faf4-d0e6-4c0f-9ff3-ff008fb808da
|
|
26
|
+
System: web-shop / library:ee5130742729fbc72bd45978
|
|
27
|
+
Where to look: Web shop (owner: Dana, platform team) - runs on cluster eu-1, namespace shop
|
|
28
|
+
Affected item: npm express 4.21.2 - checkout API, repository acme/checkout, file package.json
|
|
29
|
+
Applicability: affected; source severity: critical; priority: critical
|
|
30
|
+
Summary: express@4.21.2 in Web shop: affected.
|
|
31
|
+
• The exact npm identity express and installed version 4.21.2 match affected advisory evidence.
|
|
32
|
+
Fix: 4.22.0
|
|
33
|
+
Rule: Matched library rule at critical severity; source severity remains the minimum.
|
|
34
|
+
Assessment time: 2026-11-13T18:10:42.212Z
|
|
35
|
+
https://example.com/advisory
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The `Where to look` and `Affected item` lines come from your own list: the system's name, owner and note, and the note you wrote beside the library. Whoever receives the alert can go straight to the right place and confirm it. The `Finding` value is what you pass to commands such as `security-watch explain`.
|
|
39
|
+
|
|
40
|
+
## Get started in five steps
|
|
41
|
+
|
|
42
|
+
You need a computer that stays on (a small server is enough) and [Node.js](https://nodejs.org/) version 24.10 or newer. In a terminal:
|
|
43
|
+
|
|
44
|
+
1. **Install it.**
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
npm install --global @shieldaai/security-watch
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
2. **Create a starter folder.** This writes a configuration file, an example list of systems and a template for secrets. Nothing is sent anywhere yet.
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
security-watch init --directory ./watch --yes --notifications slack
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
3. **Describe what you run.** Open `watch/systems.yaml` in a text editor and replace the example with your own systems, libraries and notes:
|
|
57
|
+
|
|
58
|
+
```yaml
|
|
59
|
+
systems:
|
|
60
|
+
- id: web-shop
|
|
61
|
+
name: Web shop
|
|
62
|
+
owner: Dana, platform team
|
|
63
|
+
note: runs on cluster eu-1, namespace shop
|
|
64
|
+
updated_at: '2026-11-13T09:00:00Z' # when you last checked this list; older than 7 days counts as stale
|
|
65
|
+
libraries:
|
|
66
|
+
- 'npm:express@4.21.2 # checkout API, repository acme/checkout, file package.json'
|
|
67
|
+
- 'python:requests==2.32.3 # billing worker, services/billing/requirements.txt'
|
|
68
|
+
products:
|
|
69
|
+
- name: PostgreSQL
|
|
70
|
+
version: '16.4'
|
|
71
|
+
note: managed database "shop-prod", owned by the data team
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Everything after `#` on a library line is the note for that library. Keep the quotes around each library line: without them the note is ignored. Notes are optional, but they are what makes an alert easy to act on.
|
|
75
|
+
|
|
76
|
+
If your list contains libraries that are not npm packages (Python, PHP, Java, Go and so on), also open `watch/security-watch.yaml` and change `osv: false` to `osv: true`. That turns on the advisory database that covers those ecosystems; it receives the library names and versions you list.
|
|
77
|
+
|
|
78
|
+
4. **Add the Slack address.** Copy the secrets template, keep it private, then open `watch/.env` and paste your Slack incoming-webhook address after `SLACK_WEBHOOK_URL=`:
|
|
79
|
+
|
|
80
|
+
```sh
|
|
81
|
+
cp ./watch/.env.example ./watch/.env
|
|
82
|
+
chmod 600 ./watch/.env
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
5. **Check, then start.** The first command verifies your files, the second shows what a scan finds without sending anything, the third keeps watching. The first scan reads the last day of advisories at roughly one request a second, so expect it to take 15 to 20 minutes; later scans usually take a minute or two. You can skip the second command and go straight to the third.
|
|
86
|
+
|
|
87
|
+
```sh
|
|
88
|
+
security-watch doctor --config ./watch/security-watch.yaml --credentials-file ./watch/.env
|
|
89
|
+
security-watch scan --config ./watch/security-watch.yaml --credentials-file ./watch/.env --dry-run
|
|
90
|
+
security-watch start --config ./watch/security-watch.yaml --credentials-file ./watch/.env
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**What gets sent.** With the starter settings you get an immediate message for a critical finding in a library, anything reported as actively exploited, a malicious package, and a possibly critical finding that still needs checking (a critical product or news finding is one of these until it is confirmed). High findings for a product or in the news usually arrive in the daily digest: a product match cannot be confirmed from version ranges, and news is sent at once only when a configured model confirms that it affects you. Less urgent findings that need a look arrive together in one daily digest. Everything else is recorded and shown by `security-watch findings`. The `policy` section of the configuration file changes these thresholds.
|
|
94
|
+
|
|
95
|
+
To try it with no network access and fictional data first, follow the [offline advisory preview](docs/offline-advisory-preview.md). The rest of this page covers the options in detail.
|
|
96
|
+
|
|
97
|
+
**Version 1.0.1.** This is `@shieldaai/security-watch` 1.0.1, a patch release of the first stable version (1.0.0), published under the default `latest` tag. It has no independent security audit. Read the [coverage and security limits](SECURITY.md) before relying on it, the [compatibility policy](docs/compatibility.md) for what stays stable, and the [changelog](CHANGELOG.md) for what changed since the alpha.
|
|
98
|
+
|
|
99
|
+
Related projects: [Agent Guard](https://github.com/ShieldaAI/agent-guard) for tool permissions and approvals, and [SafeCall Node](https://github.com/GuardianMesh/llm-safecall-node) or [SafeCall Python](https://github.com/GuardianMesh/llm-safecall) for model response validation. The [package selection guide](https://github.com/ShieldaAI/agent-guard/blob/main/docs/package-guide.md) explains how they fit together.
|
|
6
100
|
|
|
7
101
|
## Features
|
|
8
102
|
|
|
@@ -10,26 +104,28 @@ An experimental TypeScript bot that compares security advisories and news with y
|
|
|
10
104
|
- cve.now CVE updates and npm stack checks, plus The Hacker News security articles. Optional sources include OSV, GitHub, CISA KEV, official Node.js/Python/PHP feeds and other RSS/Atom feeds.
|
|
11
105
|
- Structured library checks without AI, with optional AI analysis to distinguish new vulnerabilities, updates to known vulnerabilities and general system news. Each finding records source severity, applicability and contextual priority separately.
|
|
12
106
|
- Separate alert thresholds for libraries, products and news, plus review digests and configurable overrides for potentially critical findings, known exploitation and malware.
|
|
13
|
-
- Slack incoming webhooks and SMTP email, backed by a SQLite delivery queue.
|
|
14
|
-
-
|
|
107
|
+
- Slack incoming webhooks and SMTP email, backed by a SQLite delivery queue. An email is retried automatically only when it provably never left. A Slack message is retried when Slack answers HTTP 429 or 5xx or the connection fails before the request is sent; in rare cases Slack may have posted a message it answered 5xx for. Any other uncertain delivery is recorded for manual review and retry.
|
|
108
|
+
- Per-source coverage receipts, bounded CycloneDX import with package URLs and dependency relationships, and inventory drift reports. Optional artifact kinds cover MCP servers/clients, plugins, skills and models; signature, attestation and remediation lifecycle fields record operator-supplied evidence. They do not perform verification or close findings. See [deployment evidence](docs/configuration.md#agent-deployment-evidence-sboms-and-drift).
|
|
109
|
+
- Finding history, revision-bound AI dismissal review, acknowledgement, suppression with an expiry, source checkpoints and model budgets. Optional external heartbeats, bounded retention and verified backups support ongoing operation.
|
|
15
110
|
|
|
16
|
-
| Inventory item |
|
|
111
|
+
| Inventory item | Coverage |
|
|
17
112
|
| -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
18
113
|
| npm package with an exact version | Match supported affected ranges or verified OSV query results; preserve uncertainty and conflicting sources |
|
|
114
|
+
| PyPI package with a final release | Match the documented PEP 440 final-release subset; other forms remain unknown |
|
|
19
115
|
| Library in another supported ecosystem | Exact positive OSV query or explicitly listed affected version; unsupported version ranges remain unknown |
|
|
20
116
|
| Library without an installed version | Discover advisory candidates by package identity; applicability remains unknown |
|
|
21
117
|
| npm package-lock v2/v3 | Import resolved transitive, development and optional dependency metadata; no installation or lifecycle scripts |
|
|
22
118
|
| Product, OS, database or SaaS name | Whole-name/keyword candidates plus AI news/impact assessment; **no general product-version, vendor-backport or SaaS configuration adapter** |
|
|
23
119
|
| Unknown or stale version | Review required; never infer safety from missing evidence |
|
|
24
120
|
|
|
25
|
-
`affected` means the declared package and installed version match supported advisory evidence.
|
|
121
|
+
`affected` means the declared package and installed version match supported advisory evidence. npm and the documented PyPI final-release subset support version-range exclusion; other ecosystems use exact positive OSV query results or explicitly listed affected versions. A missing version or empty search establishes neither affectedness nor safety. Lockfiles describe dependencies; you still need to verify what is deployed and reachable.
|
|
26
122
|
|
|
27
123
|
## Install and preview
|
|
28
124
|
|
|
29
|
-
Use Node.js **24 or newer**. Install
|
|
125
|
+
Use Node.js **24.10.0 or newer**. Install it:
|
|
30
126
|
|
|
31
127
|
```sh
|
|
32
|
-
npm install --global @shieldaai/security-watch
|
|
128
|
+
npm install --global @shieldaai/security-watch
|
|
33
129
|
```
|
|
34
130
|
|
|
35
131
|
To build and install from a source checkout:
|
|
@@ -38,7 +134,7 @@ To build and install from a source checkout:
|
|
|
38
134
|
npm ci
|
|
39
135
|
npm run check
|
|
40
136
|
npm pack
|
|
41
|
-
npm install --global ./shieldaai-security-watch-
|
|
137
|
+
npm install --global ./shieldaai-security-watch-1.0.1.tgz
|
|
42
138
|
```
|
|
43
139
|
|
|
44
140
|
Choose one setup command below. For a fictional example with AI disabled:
|
|
@@ -89,9 +185,9 @@ poll_interval_minutes: 30
|
|
|
89
185
|
news_lookback_minutes: 40
|
|
90
186
|
```
|
|
91
187
|
|
|
92
|
-
Overlapping scans deduplicate findings. After downtime, the worker catches up from the last successful source checkpoint; older tracked advisories and exact package matches remain in scope. See [scan schedules and news windows](docs/configuration.md#scan-schedule-and-news-window).
|
|
188
|
+
Overlapping scans deduplicate findings. After downtime, the worker catches up from the last successful source checkpoint (for cve.now, up to about three months of records; a longer gap is reported); older tracked advisories and exact package matches remain in scope. See [scan schedules and news windows](docs/configuration.md#scan-schedule-and-news-window).
|
|
93
189
|
|
|
94
|
-
`doctor` validates local configuration and required environment variables. It does not contact providers, validate a model by spending tokens, or send test messages. A dry run writes no application state, disables model calls and sends no notifications; public advisory/feed requests still occur. For an offline demonstration, run:
|
|
190
|
+
`doctor` validates local configuration and required environment variables, and lists inventory entries that were left out or will not match as written. It exits with status 2 whenever it prints `ok: false`. It does not contact providers, validate a model by spending tokens, or send test messages. A dry run writes no application state, disables model calls and sends no notifications; public advisory/feed requests still occur. For an offline demonstration, run:
|
|
95
191
|
|
|
96
192
|
```sh
|
|
97
193
|
npm run demo
|
|
@@ -103,10 +199,22 @@ The demo refreshes synthetic inventory timestamps and uses in-memory state, with
|
|
|
103
199
|
security-watch scan --config examples/security-watch.example.yaml --fixture examples/advisories.json --dry-run
|
|
104
200
|
```
|
|
105
201
|
|
|
106
|
-
Fixture mode makes no source or AI requests. Do not combine a fixture with `--notify` unless you intend to send its synthetic findings. To test model analysis, run `security-watch scan --config ./watch/security-watch.yaml --credentials-file ./watch/.env` without `--dry-run` or `--notify`. This saves findings and budget reservations and may incur provider charges; it does not deliver notifications. The checkout also includes an opt-in [synthetic provider check](CONTRIBUTING.md#live-provider-checks).
|
|
202
|
+
Fixture mode makes no source or AI requests and counts the fixture's records as read now; with `--dry-run` it also counts the inventory as current, since it previews matching, not freshness. Do not combine a fixture with `--notify` unless you intend to send its synthetic findings. To test model analysis, run `security-watch scan --config ./watch/security-watch.yaml --credentials-file ./watch/.env` without `--dry-run` or `--notify`. This saves findings and budget reservations and may incur provider charges; it does not deliver notifications. The checkout also includes an opt-in [synthetic provider check](CONTRIBUTING.md#live-provider-checks).
|
|
203
|
+
|
|
204
|
+
Use the packaged [offline rehearsal](docs/offline-rehearsal.md) to exercise policy, outbox receipts and backup/restore in an isolated temporary database. `rehearse --config PATH --input SCENARIO.json --sink accepted --output NEW.json` uses simulated in-process delivery, disables sources/models and exports a sanitized report with per-run opaque references. It never opens the configured live database or loads credentials; `disabled` is the default sink.
|
|
205
|
+
|
|
206
|
+
For an opted-in pilot, `pilot-report --database PATH --from YYYY-MM-DD --until YYYY-MM-DD` reports observed policy workload, review response times and model reservations for complete UTC days. It also counts current queued and ambiguous deliveries using a single read-only database snapshot. Use `--backup PATH` for a standalone backup. [Pilot report guide](docs/pilot-report.md)
|
|
207
|
+
|
|
208
|
+
For independent analyst review, `pilot-cases` builds a private lookup packet from a frozen backup. `pilot-score` compares paired, blinded labels with the retained policy decision for each revision and gives the reviewed denominators. [Review a pilot’s policy decisions](docs/pilot-cases.md)
|
|
209
|
+
|
|
210
|
+
Use `pilot-recall` to measure timely findings, immediate routing decisions and Slack or SMTP acknowledgements against independently enumerated urgent incidents in a frozen backup. The report distinguishes immediate alerts from digest acknowledgements and includes incidents without a matching retained finding. [Measure recall on an incident reference](docs/pilot-recall.md)
|
|
211
|
+
|
|
212
|
+
To measure when an analyst acknowledged or triaged those incidents, use `pilot-response-template` to prepare a private worksheet. A second reviewer fills it from incident records. Score it with `pilot-recall --responses` to see how many met the deadline and how many still lack evidence. [Analyst response workflow](docs/pilot-recall.md)
|
|
107
213
|
|
|
108
214
|
## Library inventories
|
|
109
215
|
|
|
216
|
+
Runtime requirement: Node **24.10.0 or newer**. PyPI final-release range evaluation uses a conservative PEP 440 subset; unsupported forms remain unknown (see [configuration](docs/configuration.md#python-version-range-coverage)).
|
|
217
|
+
|
|
110
218
|
The supported ecosystems are npm, PyPI, Packagist, Go, Maven, crates.io, RubyGems, NuGet, Hex, Pub, Hackage and SwiftURL. Common language names such as `python`, `php` and `rust` are accepted as aliases. Run `security-watch ecosystems` for the canonical names.
|
|
111
219
|
|
|
112
220
|
Start from a file with one library per line:
|
|
@@ -119,7 +227,16 @@ php:symfony/http-foundation@6.4.0
|
|
|
119
227
|
maven:org.apache.logging.log4j:log4j-core
|
|
120
228
|
```
|
|
121
229
|
|
|
122
|
-
|
|
230
|
+
Add a note after `#` to say where a library is used; it appears in every alert about that library:
|
|
231
|
+
|
|
232
|
+
```text
|
|
233
|
+
npm:express@4.21.2 # checkout API, repository acme/checkout, file package.json
|
|
234
|
+
python:requests==2.32.3 # billing worker, services/billing/requirements.txt
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
A line that starts with `#` is still an ordinary comment. When the same library is listed twice with different notes, both notes are kept. Systems and products accept a `note:` field in the inventory file. Notes stay on your machine and in your notifications; they are never sent to advisory sources or AI models. See [notes](docs/configuration.md#notes-telling-readers-where-to-look).
|
|
238
|
+
|
|
239
|
+
These are examples, not version recommendations. Use the registry's published package spelling, especially for NuGet. npm names are lower case and case-sensitive: `npm:Lodash` is kept but matches nothing published as `lodash`, and `doctor` lists it under `name_notices`. Omit a version you have not verified; do not substitute `latest`, a version constraint or a guessed release.
|
|
123
240
|
|
|
124
241
|
```sh
|
|
125
242
|
security-watch normalize-libraries --input ./libraries.txt
|
|
@@ -152,6 +269,8 @@ docker run --rm --user 0 --entrypoint chown \
|
|
|
152
269
|
shielda-security-watch "$(id -u):$(id -g)" /data
|
|
153
270
|
docker run --rm --name security-watch \
|
|
154
271
|
--user "$(id -u):$(id -g)" \
|
|
272
|
+
--read-only --cap-drop ALL --security-opt no-new-privileges \
|
|
273
|
+
--tmpfs /tmp \
|
|
155
274
|
--env-file ./watch/.env \
|
|
156
275
|
--mount type=bind,src="$(pwd)/watch/security-watch.yaml",dst=/config/security-watch.yaml,readonly \
|
|
157
276
|
--mount type=bind,src="$(pwd)/watch/systems.yaml",dst=/config/systems.yaml,readonly \
|
|
@@ -178,14 +297,16 @@ Edit the copied inventory, notification routes and credentials, and apply the sa
|
|
|
178
297
|
## How decisions work
|
|
179
298
|
|
|
180
299
|
1. Collect cve.now responses and The Hacker News articles within configured size and request limits. Preserve source revisions and group advisories that share verified aliases. News mentioning several existing advisories adds context to each finding separately.
|
|
181
|
-
2. Compare each deployment's library identity and declared version. npm
|
|
300
|
+
2. Compare each deployment's library identity and declared version. npm and the PyPI final-release subset support range checks; other ecosystems require exact positive evidence. Generic product matches remain uncertain. Stale inventory cannot support a safe conclusion.
|
|
182
301
|
3. Ask the configured model to classify matched system news and assess the claimed impact on the declared deployment, using article evidence and version context. General news about a system is distinguished from a new vulnerability or an update to a known one. If configured, a second model reviews every news analysis and any critical, exploited, uncertain or conflicting finding. Disagreements remain visible.
|
|
183
302
|
4. Apply the category's notification policy. AI cannot reduce priority below the source severity or suppress a critical library/product finding. News with an advisory identifier and an exact installed package mention uses library policy even before structured advisory data arrives.
|
|
184
303
|
5. Commit finding changes and notification jobs together. Deliver meaningful changes without treating cosmetic article wording or AI phrasing as new events.
|
|
185
304
|
|
|
186
|
-
With the default rules, libraries select critical severity and products/news select high or critical; routes are empty until configured. Unknown/conflicting potentially critical findings notify immediately when `urgent_unknown` is enabled. Lower-priority uncertainty goes to a review digest. Known-exploitation and malicious-package overrides are separately configurable. A category with no channels sends nothing, including overrides.
|
|
305
|
+
With the default rules, libraries select critical severity and products/news select high or critical; routes are empty until configured. Unknown/conflicting potentially critical findings notify immediately when `urgent_unknown` is enabled, except a version exclusion that is `unknown` only because its advisory evidence is out of date: that goes to the review digest, and the source's health finding reports the outage. Lower-priority uncertainty goes to a review digest. Known-exploitation and malicious-package overrides are separately configurable. A category with no channels sends nothing, including overrides.
|
|
187
306
|
|
|
188
|
-
|
|
307
|
+
AI dismissals now require local review by default (`policy.ai_dismissals: review`). Both general-news and model-only `not_affected` conclusions enter a durable queue, even without notification channels. Use `reviews` to inspect items and `review FINDING_ID --revision N --disposition dismiss|investigate --reviewer NAME --reason TEXT` to record a local decision. `record` explicitly opts out; the legacy boolean is normalized as documented in [configuration](docs/configuration.md#reviewing-ai-dismissals-locally).
|
|
308
|
+
|
|
309
|
+
For system news, the model records `new_vulnerability`, `known_vulnerability_update`, `general_news` or `unknown`, alongside its assessment of system impact. General coverage and supported model-only exclusions require review before dismissal; uncertain analysis goes to the review digest. A vulnerability that the model believes affects the system follows your severity policy. These rules also cover product articles linked to collected CVEs. Critical-source severity, configured exploitation overrides and deterministic library matches still take precedence. See [model configuration](docs/configuration.md#model-configuration) for evidence and version requirements.
|
|
189
310
|
|
|
190
311
|
General-news classifications remain in history after a story leaves RSS. Changes to the article, inventory or model settings trigger reassessment. Affected or excluded impact claims require fresh evidence.
|
|
191
312
|
|
|
@@ -193,34 +314,36 @@ Models cannot run tools, change recipients, edit version ranges or establish tha
|
|
|
193
314
|
|
|
194
315
|
## Operate
|
|
195
316
|
|
|
196
|
-
Commands that operate on a configured monitor accept `--config PATH`; the default is `./security-watch.yaml`.
|
|
197
|
-
|
|
198
|
-
| Command
|
|
199
|
-
|
|
|
200
|
-
| `providers`
|
|
201
|
-
| `templates`
|
|
202
|
-
| `ecosystems`
|
|
203
|
-
| `normalize-libraries --input PATH`
|
|
204
|
-
| `scan`
|
|
205
|
-
| `scan --dry-run`
|
|
206
|
-
| `scan --notify`
|
|
207
|
-
| `scan --fixture PATH`
|
|
208
|
-
| `scan --no-ai`
|
|
209
|
-
| `start`
|
|
210
|
-
| `findings`, `status`, `deliveries`, `budget`
|
|
211
|
-
| `health`
|
|
212
|
-
| `health --scan-only`
|
|
213
|
-
| `
|
|
214
|
-
| `
|
|
215
|
-
| `
|
|
216
|
-
| `
|
|
217
|
-
| `
|
|
218
|
-
| `
|
|
219
|
-
| `
|
|
220
|
-
| `
|
|
221
|
-
| `
|
|
222
|
-
| `
|
|
223
|
-
| `
|
|
317
|
+
Commands that operate on a configured monitor accept `--config PATH`; the default is `./security-watch.yaml`. For monitor commands, add `--credentials-file PATH` to load a private dotenv file, or export variables through your service manager. The offline `rehearse` command rejects credential files and uses simulated delivery. Existing environment values take precedence for monitor commands. Files are parsed as data, without shell evaluation; they are never loaded implicitly. `init` uses `--directory` instead. Unsupported flag/command combinations are rejected before activity.
|
|
318
|
+
|
|
319
|
+
| Command | Behavior |
|
|
320
|
+
| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
|
|
321
|
+
| `providers` | List supported provider profiles without configuration, credentials or network access |
|
|
322
|
+
| `templates` | List common system IDs available to `init --systems` |
|
|
323
|
+
| `ecosystems` | List supported library ecosystems |
|
|
324
|
+
| `normalize-libraries --input PATH` | Parse a library list without network requests; optional `--ecosystem` sets the group and `--output` saves a new JSON file |
|
|
325
|
+
| `scan` | Run once, save evidence/findings and queue notifications; does not deliver by default |
|
|
326
|
+
| `scan --dry-run` | Use in-memory state, disable model calls and send no notifications; source requests still occur |
|
|
327
|
+
| `scan --notify` | Save a scan, attempt due delivery and report the remaining backlog; future or rate-limited jobs stay pending |
|
|
328
|
+
| `scan --fixture PATH` | Use local evidence instead of network sources and AI |
|
|
329
|
+
| `scan --no-ai` | Keep structured matching and disable model calls for this invocation |
|
|
330
|
+
| `start` | Run the scheduler and delivery worker in the foreground |
|
|
331
|
+
| `findings`, `status`, `deliveries`, `budget` | Inspect saved assessments, monitoring state, delivery outcomes and budget reservations |
|
|
332
|
+
| `health` | Check worker heartbeat, completed-scan freshness and actionable delivery problems; exits 2 when unhealthy |
|
|
333
|
+
| `health --scan-only` | Check completed scans and delivery without requiring a foreground worker, for external cron schedules |
|
|
334
|
+
| `reviews [--all] [--limit N] [--after CURSOR]` | Inspect the durable local AI dismissal queue and its backlog |
|
|
335
|
+
| `review FINDING_ID --revision N --disposition dismiss\|investigate --reviewer NAME --reason TEXT` | Adjudicate an exact current review locally without sending a notification |
|
|
336
|
+
| `explain FINDING_ID` | Show a finding, its current policy decision and acknowledgement/suppression controls |
|
|
337
|
+
| `history FINDING_ID` | Show saved finding revisions |
|
|
338
|
+
| `acknowledge FINDING_ID` | Acknowledge the current revision, or only revision N with `--revision N` |
|
|
339
|
+
| `suppress FINDING_ID --hours 24 --reason TEXT` | Suppress until an explicit expiry |
|
|
340
|
+
| `retry DELIVERY_ID` | Requeue a failed/uncertain delivery after checking receipt; does not send immediately |
|
|
341
|
+
| `backup --output PATH` | Create a consistent SQLite backup at a new destination and verify a temporary restored copy |
|
|
342
|
+
| `verify-backup --input PATH` | Verify a standalone backup without monitor configuration or replacing a live database |
|
|
343
|
+
| `prune` | Show a read-only plan using configured retention periods |
|
|
344
|
+
| `prune --apply` | Apply one bounded retention batch atomically |
|
|
345
|
+
| `unlock` | Remove stale lock metadata only when no worker owns the SQLite lock |
|
|
346
|
+
| `test-notification --channel slack` | Send an explicit test message; `email` is also supported |
|
|
224
347
|
|
|
225
348
|
Only one scan/scheduler instance may write a given database. Inspection and acknowledgement use SQLite safely alongside the worker. Do not share a database between containers or hosts or put it on a network filesystem. Stop the worker before replacing a database with a backup; retain permissions and move aside stale SQLite sidecar files with the old database.
|
|
226
349
|
|
|
@@ -228,7 +351,7 @@ Digests use fixed UTC epoch-aligned time buckets, defaulting to midnight UTC, wi
|
|
|
228
351
|
|
|
229
352
|
A notification marked `accepted` was accepted by the destination, not necessarily read. Interrupted or ambiguous delivery becomes `unknown`: inspect the destination before `retry`, because it may already have arrived. Automatic retries cover explicit transient rejections and DNS/connection failures known to occur before sending. Slack digests split to fit the message limit, and one malformed queued message does not block healthy messages. Delivery state remains available even when a destination fails.
|
|
230
353
|
|
|
231
|
-
`scan` exits with status 2 for degraded monitoring or failed/uncertain delivery, including an early urgent delivery attempt; setup/command failures use status 1. `health` is read-only, makes no network requests, and reports monitoring health rather than whether systems are secure. The Compose service includes this health check. Check `status`, service logs and delivery state rather than treating an empty findings list as an all-clear.
|
|
354
|
+
`scan` exits with status 2 for degraded monitoring or failed/uncertain delivery (running without an AI model is a supported setup and is reported under `notices`, not as degraded), including an early urgent delivery attempt; setup/command failures use status 1. `health` is read-only, makes no network requests, and reports monitoring health rather than whether systems are secure. The Compose service includes this health check. Check `status`, service logs and delivery state rather than treating an empty findings list as an all-clear.
|
|
232
355
|
|
|
233
356
|
One failed source item, model response or notification does not stop unrelated work. Valid evidence and findings are saved, incomplete sources keep their previous checkpoints, and `start` continues scheduled scans and due deliveries. A one-shot `scan` finishes its work and reports degraded status; it does not stay running. Cancellation and failures that prevent reliable database writes still stop the worker.
|
|
234
357
|
|
|
@@ -255,16 +378,18 @@ Without `--live`, the script makes no provider calls and reports skipped cases.
|
|
|
255
378
|
npm run evaluate:models -- --live --providers openai,anthropic --max-requests 20
|
|
256
379
|
```
|
|
257
380
|
|
|
381
|
+
Run `npm run evaluate:outcomes -- --output alert-evaluation.json` from a checkout for the offline final-outcome regression gate. It compares deterministic matching, one model and verification using production policy and a fresh local outbox, and reports false quiet dismissals, unnecessary immediate alerts and benign digest/review burden. See the [outcome evaluation guide](docs/alert-outcome-evaluation.md) for controls, human-label import and production-readiness limits.
|
|
382
|
+
|
|
258
383
|
The corpus contains source-derived synthetic scenarios with fictional inventories. Its reference labels are marked `pending_human_review`. Reports distinguish output acceptance, coverage, label agreement, false exclusions, rejected outputs and model disagreements. Label agreement is not measured production accuracy. Live runs may incur charges, use a total request cap, and send no notifications; full options are in the script help.
|
|
259
384
|
|
|
260
385
|
## Boundaries and privacy
|
|
261
386
|
|
|
262
|
-
cve.now stack queries disclose deduplicated npm package names and versions; lockfiles and deployment metadata are not uploaded. The Hacker News feed and article servers receive normal HTTP requests. Optional OSV queries also disclose dependency names and versions; optional GitHub, CISA and additional feed sources receive normal HTTP requests. GitHub authentication is optional. The selected model provider receives
|
|
387
|
+
cve.now stack queries disclose deduplicated npm package names and versions; lockfiles and deployment metadata are not uploaded. The Hacker News feed and article servers receive normal HTTP requests. Optional OSV queries also disclose dependency names and versions; optional GitHub, CISA and additional feed sources receive normal HTTP requests. GitHub authentication is optional. The selected model provider receives, under the default `minimal` disclosure profile, the matched package and product names and versions plus selected evidence; the `deployment-context` profile adds environment, exposure, criticality and matching keywords (see [SECURITY.md](SECURITY.md)). Slack/email receive findings and evidence links. Consider these disclosures before monitoring private dependencies.
|
|
263
388
|
|
|
264
389
|
Authentication credentials are read from environment variables. Findings, evidence, quoted model output, budget reservations and history are stored locally. There is no automatic application telemetry. An explicitly configured heartbeat service receives success pings and normal request metadata. Protect the configuration, SQLite database, backups and credentials as operational data. Details are in [SECURITY.md](SECURITY.md).
|
|
265
390
|
|
|
266
|
-
This
|
|
391
|
+
This release has no automatic patching, shell execution from news, hosted dashboard, Slack action buttons, general SBOM import, distributed workers, EPSS integration or independent security audit. CVSS v3.0/v3.1 vectors and supplied severity labels/scores are supported. OSV and GitHub also support [CVSS v4 base-vector scoring](docs/cvss-v4-support.md), with explicit base projection and unsupported-vector diagnostics. Product backports, reachability and exploit prerequisites require human/vendor evidence. cve.now starts from recent entries, revisits tracked/news-cited CVEs and checks exact npm packages through its stack endpoint; this is not an exhaustive historical audit of every product. Existing configurations retain explicitly enabled legacy sources; set `osv`, `github` and `kev` to `false` to switch exclusively to the new defaults.
|
|
267
392
|
|
|
268
|
-
Current evidence and findings are loaded into memory during each scan. Retention is disabled until configured, and protected unresolved records may continue growing even after cleanup is enabled. This
|
|
393
|
+
Current evidence and findings are loaded into memory during each scan. Retention is disabled until configured, and protected unresolved records may continue growing even after cleanup is enabled. This release targets small installations. Plan storage and review retention dry runs before increasing scale.
|
|
269
394
|
|
|
270
395
|
See the [configuration guide](docs/configuration.md), [security policy](SECURITY.md) and [contributing guide](CONTRIBUTING.md). Licensed under Apache-2.0.
|
package/SECURITY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Security policy and boundaries
|
|
2
2
|
|
|
3
|
-
Security Watch is
|
|
3
|
+
Security Watch is a monitoring tool without an independent security audit. Security reports are handled on a best-effort basis by a single maintainer, with no guaranteed response time; fixes are released for the latest 1.x version. Validate findings against your deployment before using them to make remediation decisions.
|
|
4
4
|
|
|
5
5
|
## Report a vulnerability
|
|
6
6
|
|
|
@@ -15,19 +15,25 @@ Trusted inputs are the operator's configuration, inventory, chosen model/SMTP en
|
|
|
15
15
|
Implemented boundaries include:
|
|
16
16
|
|
|
17
17
|
- Strict configuration/inventory parsing, bounded input sizes and metadata-only lockfile import. No package installation or lifecycle-script execution occurs during monitoring.
|
|
18
|
-
- Public HTTPS fetching with checks on the addresses used by the connection, bounded redirects/timeouts/response sizes, and removal of authentication headers on cross-origin redirects. Model and external-heartbeat endpoints may explicitly opt into private addressing; SMTP endpoints are operator-selected.
|
|
18
|
+
- Public HTTPS fetching with checks on the addresses used by the connection, bounded redirects/timeouts/response sizes, and removal of authentication headers on cross-origin redirects. Model and external-heartbeat endpoints may explicitly opt into private addressing; plain HTTP is then allowed only to private or local addresses, checked again on the addresses the connection uses. SMTP endpoints are operator-selected.
|
|
19
19
|
- Models receive no shell, browser, filesystem or notification tools. Output is schema-checked, evidence IDs must exist, and supporting quotes must appear in the supplied evidence.
|
|
20
20
|
- The Hacker News article requests are restricted to its publication hosts and have size limits. Article links to other sites are not crawled. Missing, excerpted, stale or truncated evidence cannot support a new decisive AI impact conclusion. Historical general-news classifications are retained; current affected/excluded claims require fresh evidence.
|
|
21
21
|
- Deterministic package matching and source-severity floors govern library/product decisions. AI cannot rewrite recipients, authoritative version constraints or dependency applicability.
|
|
22
22
|
- AI news classification and claimed system impact are stored separately from authoritative applicability. Evidence-backed general news or an AI-reported exclusion can suppress noncritical news alerts, but cannot override source-critical or enabled known-exploitation safeguards.
|
|
23
|
-
- Slack destinations come only from operator configuration and are restricted to standard `hooks.slack.com` incoming webhooks. SMTP requires TLS. Notification content is rendered as text and cannot enable attachments, filesystem reads or URL-fetching features in the email transport.
|
|
24
|
-
- Findings and their delivery jobs are committed together. Ambiguous delivery is visible and requires a manual receipt check before retrying.
|
|
23
|
+
- Slack destinations come only from operator configuration and are restricted to standard `hooks.slack.com` incoming webhooks. SMTP requires TLS. Notification content is rendered as text and cannot enable attachments, filesystem reads or URL-fetching features in the email transport. Each value from an advisory, a model or the inventory is placed on a single line behind that line's own label, with runs of blank characters reduced to one space, so it cannot add a line that looks like one of the message's own labels; inventory text fields reject control characters and line separators when the inventory is loaded.
|
|
24
|
+
- Findings and their delivery jobs are committed together. Ambiguous delivery is visible and requires a manual receipt check before retrying. An email is retried automatically only when the failure provably came before the message was handed over (before `MAIL FROM`) or the server refused it with a temporary response code; a connection lost after that point is recorded as uncertain.
|
|
25
25
|
|
|
26
26
|
Models can misinterpret sources, feeds can omit important facts, and advisories can be wrong or delayed. Check source failures and uncertain findings during operational review. The bot does not provide a general prompt-injection detector or execution sandbox.
|
|
27
27
|
|
|
28
28
|
## Data handling
|
|
29
29
|
|
|
30
|
-
cve.now stack requests reveal deduplicated npm package names and exact versions through URL query parameters; lockfiles and system/deployment metadata are not uploaded. The Hacker News feed and article servers receive normal HTTP request metadata. Optional OSV requests reveal library ecosystem, package name and the installed version when supplied. Official vendor feeds receive normal request metadata. Other enabled advisory/feed servers receive normal request metadata, and GitHub may receive the configured API token.
|
|
30
|
+
cve.now stack requests reveal deduplicated npm package names and exact versions through URL query parameters; lockfiles and system/deployment metadata are not uploaded. The Hacker News feed and article servers receive normal HTTP request metadata. Optional OSV requests reveal library ecosystem, package name and the installed version when supplied. Official vendor feeds receive normal request metadata. Other enabled advisory/feed servers receive normal request metadata, and GitHub may receive the configured API token.
|
|
31
|
+
|
|
32
|
+
Each configured AI model defaults to the `minimal` disclosure profile. It receives selected relevant package ecosystem/name/version and product name/version, request-local IDs and inventory freshness status, plus target event and selected evidence fields/excerpts. Original inventory IDs, system name/owner, repository URLs, provenance, dependency graphs, verification declarations, remediation records and operator identities are excluded. `deployment-context` opts that specific model into environment/exposure/criticality and evidence-matching keywords, never other inventory metadata. The verifier applies its own profile independently. Allowed names and evidence text are not secret-redacted; do not place private content there unless the endpoint is approved to receive it. Full contracts and migration behavior are in [model disclosure configuration](docs/configuration.md#data-sent-to-models).
|
|
33
|
+
|
|
34
|
+
Inventory notes (the `note` field on systems, libraries and products) are the operator's own pointers to where something runs. They are stored in the local database and shown in notifications together with the system name and owner. They are never sent to advisory sources and are excluded from model requests under both disclosure profiles. Do not put secrets in a note.
|
|
35
|
+
|
|
36
|
+
Notifications disclose formatted finding context, the inventory names and notes above, and source links to Slack or the configured email recipients under separate routing policy; model disclosure settings do not filter notification payloads or public inventory queries. There is no automatic application telemetry. An optional, operator-configured heartbeat endpoint receives bodyless success pings and normal request metadata. It receives no inventory, finding content or logs.
|
|
31
37
|
|
|
32
38
|
Credential values are read from environment variables, not placed in model prompts or intentionally persisted in SQLite. Do not insert keys into model names, feed URLs, inventory text or configuration substitutions. Use your service manager or secret manager to supply credentials; the CLI does not automatically load `.env` files. Do not commit configuration, database files, backups or `.env` files to source control.
|
|
33
39
|
|
|
@@ -35,13 +41,22 @@ SQLite stores evidence, finding revisions, model analysis excerpts, caches, budg
|
|
|
35
41
|
|
|
36
42
|
## Coverage limitations
|
|
37
43
|
|
|
38
|
-
- Library inventory supports 12 ecosystems.
|
|
44
|
+
- Library inventory supports 12 ecosystems. npm names are matched exactly, including letter case: a capitalised name typed by hand is listed as a notice by `doctor` and in every scan report, because it matches only advisories published under that spelling; the notice does not degrade monitoring. npm and a bounded PyPI final-release subset use supported version-range evaluation and exclusions; complex PEP 440 forms remain unknown. Other ecosystems require a positive exact OSV query or an explicitly listed affected version; a missing version, unmatched result or unsupported range stays unknown. Lockfile entries include dependencies that may not be present in production.
|
|
39
45
|
- Generic products, operating systems and SaaS services have name/keyword candidate matching plus optional AI news/impact analysis. AI impact is an evidence-backed opinion, not a deterministic product-version result. Vendor backports, enabled features and exploit reachability are not automatically established.
|
|
40
46
|
- Missing versions, unknown constraints and stale inventory remain uncertain. An empty advisory search does not establish that a system has no vulnerabilities.
|
|
41
|
-
- CVSS v3.0/v3.1 calculation and supplied source labels/scores are supported
|
|
47
|
+
- CVSS v3.0/v3.1 calculation and supplied source labels/scores are supported. For OSV and GitHub records, CVSS v4 base vectors are scored with the pinned FIRST reference calculator; threat and environmental metrics are not applied, and unsupported vectors are counted and left unknown. See [CVSS v4 support](docs/cvss-v4-support.md).
|
|
48
|
+
- A package named only in the prose of a news story is matched by rules, not by understanding: a name that is an English word must be named as a package, carry a release or be written as a name, a scoped package is matched by its full name only, and a Maven library by its coordinates or by an artifact name that is not an English word. Stories about such packages can be missed and, less often, an unrelated story can match; see the [matching rules](docs/configuration.md#sources-and-coverage). Advisories are matched by structured package claims and are not affected.
|
|
42
49
|
- Source requests and model inputs have size and request limits. Incomplete collection or analysis reports degraded monitoring and requires review.
|
|
43
|
-
- Recent cve.now entry collection, tracked/news-cited refreshes and exact npm stack queries do not establish exhaustive historical coverage for every product. The Hacker News may block article access; the feed excerpt remains available for review without a confident impact conclusion.
|
|
44
|
-
-
|
|
50
|
+
- Recent cve.now entry collection, tracked/news-cited refreshes and exact npm stack queries do not establish exhaustive historical coverage for every product. The recent listing is read one week past the checkpoint; a record cve.now ingests more than a week after its publication date is found only through an exact npm match or a news citation. The Hacker News may block article access; the feed excerpt remains available for review without a confident impact conclusion.
|
|
51
|
+
- CycloneDX JSON 1.4–1.6 package metadata import is supported, but not general SBOM/VEX ingestion, attestation verification or live deployment discovery. There is no authenticated web crawling, automatic remediation, distributed lock, multi-host worker or independent penetration-test certification.
|
|
45
52
|
- Notifications are not exactly-once delivery. A timeout can occur after a destination accepts a message. Verify receipt before retrying an `unknown` job.
|
|
46
53
|
|
|
47
54
|
Review `status`, `deliveries`, source-health findings and service logs. Optional external success pings stop when monitoring is unhealthy, but the receiving service must be configured to detect missing pings. Loss of the host or every delivery channel cannot be reported through that same failed infrastructure.
|
|
55
|
+
|
|
56
|
+
Inventory origin, digest, provenance, observation and configuration fields are operator declarations. They do not authenticate artifact origin or establish a deployed fix. Baselines are stored locally for drift comparison; do not include secrets. Coverage receipts describe bounded collection and must not be interpreted as an exhaustive vulnerability scan. Configuration-dependent remediation guidance remains subject to operator verification.
|
|
57
|
+
|
|
58
|
+
## Local AI dismissal review
|
|
59
|
+
|
|
60
|
+
Both AI-only quiet routes require review by default. `policy.ai_dismissals: record` explicitly opts out. Review and notification delivery are separate: sending a digest does not approve a dismissal, and no configured channel is required for the local queue. A human verdict binds the finding revision, reviewed source content and installed/model context. Source changes invalidate stale verdicts even before a scan completes reassessment.
|
|
61
|
+
|
|
62
|
+
CLI review commands rely on private local database/OS access. The reviewer string is an operator-declared audit label, not an identity-provider assertion. Review notes stay local and in backups. Generic retention protects review history and its evidence; review-specific expiry is not implemented. A local dismissal can cancel pending delivery but cannot recall an in-flight message. Review never changes authoritative version applicability.
|
package/dist/assessment.d.ts
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import type { Assessment, Config, Decision, Evidence, Inventory } from './types.js';
|
|
2
|
+
export declare function normalizeEventId(id: string): string;
|
|
2
3
|
/** Assess each deployment independently against package identity and version evidence. */
|
|
3
|
-
export declare function assess(inventory: Inventory, evidence: Evidence[], config: Config, now?: number
|
|
4
|
+
export declare function assess(inventory: Inventory, evidence: Evidence[], config: Config, now?: number,
|
|
5
|
+
/**
|
|
6
|
+
* The time against which the age of advisory evidence is judged; `now` unless given. A scan that
|
|
7
|
+
* reconciles stored evidence before refreshing it passes the time of the last collection, so
|
|
8
|
+
* evidence does not count as stale merely because the refresh has not happened yet.
|
|
9
|
+
*/
|
|
10
|
+
evidenceAsOf?: number,
|
|
11
|
+
/** Event identifiers of findings already reported; an event keeps the one it was reported under. */
|
|
12
|
+
knownEvents?: ReadonlySet<string>,
|
|
13
|
+
/** Identifiers of findings already reported, for an event that merges two reported ones. */
|
|
14
|
+
knownFindings?: ReadonlySet<string>): Assessment[];
|
|
4
15
|
/** The source severity is always a floor; AI-proposed priority reductions cannot suppress it. */
|
|
5
16
|
export declare function decide(assessment: Assessment, config: Config): Decision;
|