@shieldaai/security-watch 1.1.1 → 1.2.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 +36 -0
- package/README.md +5 -5
- package/SECURITY.md +2 -1
- package/dist/assessment.js +54 -0
- package/dist/cli.js +6 -3
- package/dist/config.d.ts +4 -0
- package/dist/config.js +4 -0
- package/dist/delivery.js +43 -1
- package/dist/engine.js +54 -5
- package/dist/epss.d.ts +37 -0
- package/dist/epss.js +166 -0
- package/dist/heartbeat.js +4 -1
- package/dist/index.d.ts +1 -1
- package/dist/inventory.js +1 -1
- package/dist/manifests.js +23 -13
- package/dist/matching.d.ts +6 -0
- package/dist/matching.js +7 -1
- package/dist/news-signals.d.ts +29 -0
- package/dist/news-signals.js +271 -0
- package/dist/operations.js +2 -1
- package/dist/store.js +26 -9
- package/dist/types.d.ts +55 -0
- package/docs/configuration.md +31 -1
- package/docs/offline-advisory-preview.md +2 -2
- package/docs/sbom.md +4 -4
- package/package.json +1 -1
package/dist/store.js
CHANGED
|
@@ -7,6 +7,9 @@ import { decide } from './assessment.js';
|
|
|
7
7
|
import { aggregatePilotReport, validatePilotWindow, PilotReportError, } from './pilot-report.js';
|
|
8
8
|
import { validateRetentionPolicy, } from './maintenance.js';
|
|
9
9
|
export const SCHEMA_VERSION = 7;
|
|
10
|
+
/** A queued notification held back while its finding waits for a new analysis. */
|
|
11
|
+
const HELD = 'Held for reassessment';
|
|
12
|
+
const OPEN = `(status='pending' OR (status='failed' AND last_error='${HELD}'))`;
|
|
10
13
|
function verifyFile(path) {
|
|
11
14
|
// Closing any descriptor for a live SQLite inode releases this process's POSIX locks.
|
|
12
15
|
// Inspect existing files without opening them, including when another Store is already open.
|
|
@@ -388,7 +391,8 @@ export class Store {
|
|
|
388
391
|
: [];
|
|
389
392
|
// Where the finding lives (inventory names and notes) is shown to the reader; it is not part
|
|
390
393
|
// of the conclusion a reviewer approves, so editing a note does not ask for a new review.
|
|
391
|
-
|
|
394
|
+
// EPSS changes daily and is shown only: it is not part of the conclusion either.
|
|
395
|
+
const { updated_at: _updated, location: _location, epss: _epss, ...reviewedAssessment } = assessment;
|
|
392
396
|
// Ordinary alert deduplication stays semantic. A human review instead binds the exact
|
|
393
397
|
// supplied conclusion, source content and host inventory/model context, excluding scan time.
|
|
394
398
|
const signature = decision.review
|
|
@@ -423,14 +427,14 @@ export class Store {
|
|
|
423
427
|
.run(assessment.id, revision, decision.review, JSON.stringify(references), now);
|
|
424
428
|
if (changed)
|
|
425
429
|
this.#db
|
|
426
|
-
.prepare(
|
|
430
|
+
.prepare(`UPDATE notifications SET status='failed',last_error='Superseded by a newer assessment' WHERE finding_id=? AND ${OPEN}`)
|
|
427
431
|
.run(assessment.id);
|
|
428
432
|
// A changed routing configuration can stop a pending delivery without creating a duplicate in retained channels.
|
|
429
433
|
const channels = decision.action === 'record' ? [] : [...new Set(decision.channels)];
|
|
430
434
|
for (const channel of ['slack', 'email'])
|
|
431
435
|
if (!channels.includes(channel)) {
|
|
432
436
|
this.#db
|
|
433
|
-
.prepare(
|
|
437
|
+
.prepare(`UPDATE notifications SET status='failed',last_error='Notification policy no longer selects this destination' WHERE finding_id=? AND channel=? AND ${OPEN}`)
|
|
434
438
|
.run(assessment.id, channel);
|
|
435
439
|
}
|
|
436
440
|
const payload = JSON.stringify({ assessment, reason: decision.reason, mode: decision.action });
|
|
@@ -448,8 +452,9 @@ export class Store {
|
|
|
448
452
|
this.#db
|
|
449
453
|
.prepare(`INSERT INTO notifications(id,finding_id,revision,channel,payload,status,available_at)
|
|
450
454
|
VALUES(?,?,?,?,?,'pending',?) ON CONFLICT(finding_id,revision,channel) DO UPDATE SET
|
|
451
|
-
payload=excluded.payload,status='pending',available_at=
|
|
452
|
-
|
|
455
|
+
payload=excluded.payload,status='pending',last_error=NULL,available_at=CASE WHEN notifications.last_error='${HELD}'
|
|
456
|
+
THEN notifications.available_at ELSE MAX(notifications.available_at,excluded.available_at) END
|
|
457
|
+
WHERE notifications.status='failed' AND notifications.last_error IN ('Notification policy no longer selects this destination','${HELD}')`)
|
|
453
458
|
.run(randomUUID(), assessment.id, revision, channel, payload, availableAt);
|
|
454
459
|
});
|
|
455
460
|
}
|
|
@@ -616,7 +621,7 @@ export class Store {
|
|
|
616
621
|
.prepare(`SELECT
|
|
617
622
|
SUM(CASE WHEN n.status='failed' AND COALESCE(n.last_error,'') NOT IN (
|
|
618
623
|
'Notification policy no longer selects this destination', 'Notification urgency changed under the current policy',
|
|
619
|
-
'Finding is no longer active', 'Superseded by a newer assessment', 'Finding acknowledged before delivery') THEN 1 ELSE 0 END) AS failed,
|
|
624
|
+
'Finding is no longer active', 'Superseded by a newer assessment', 'Finding acknowledged before delivery', '${HELD}') THEN 1 ELSE 0 END) AS failed,
|
|
620
625
|
SUM(CASE WHEN n.status='unknown' THEN 1 ELSE 0 END) AS unknown,
|
|
621
626
|
SUM(CASE WHEN n.status='pending' AND MAX(n.available_at,CASE WHEN n.channel='slack' THEN ? ELSE 0 END)<=? THEN 1 ELSE 0 END) AS overdue_pending
|
|
622
627
|
FROM notifications n JOIN findings f ON f.id=n.finding_id
|
|
@@ -739,6 +744,16 @@ export class Store {
|
|
|
739
744
|
.run(now, id);
|
|
740
745
|
});
|
|
741
746
|
}
|
|
747
|
+
/**
|
|
748
|
+
* Keep a finding's queued notifications from being sent until it is saved again. Saving the same
|
|
749
|
+
* revision queues them again with their schedule; a new revision supersedes them.
|
|
750
|
+
* @internal Used by the scan worker; not part of the public API.
|
|
751
|
+
*/
|
|
752
|
+
holdPending(findingId) {
|
|
753
|
+
this.#db
|
|
754
|
+
.prepare(`UPDATE notifications SET status='failed',last_error=? WHERE finding_id=? AND status='pending'`)
|
|
755
|
+
.run(HELD, findingId);
|
|
756
|
+
}
|
|
742
757
|
/** @internal Used by the scan and delivery workers; not part of the public API. */
|
|
743
758
|
recoverSending(now = Date.now()) {
|
|
744
759
|
this.#db
|
|
@@ -781,13 +796,15 @@ export class Store {
|
|
|
781
796
|
if (!Number.isSafeInteger(until) || until <= Date.now() || !reason.trim())
|
|
782
797
|
throw new Error('Suppression needs a future expiry and a reason');
|
|
783
798
|
this.#transaction(() => {
|
|
799
|
+
// A delivery held until an earlier expiry follows the new one, also when it is shorter.
|
|
800
|
+
this.#db
|
|
801
|
+
.prepare(`UPDATE notifications SET available_at=MAX(?,CASE WHEN available_at=(SELECT suppressed_until FROM findings WHERE id=?)
|
|
802
|
+
THEN 0 ELSE available_at END) WHERE finding_id=? AND status='pending'`)
|
|
803
|
+
.run(until, id, id);
|
|
784
804
|
if (!this.#db
|
|
785
805
|
.prepare('UPDATE findings SET suppressed_until=?,suppression_reason=? WHERE id=?')
|
|
786
806
|
.run(until, reason.trim(), id).changes)
|
|
787
807
|
throw new Error('Finding not found');
|
|
788
|
-
this.#db
|
|
789
|
-
.prepare("UPDATE notifications SET available_at=MAX(available_at,?) WHERE finding_id=? AND status='pending'")
|
|
790
|
-
.run(until, id);
|
|
791
808
|
});
|
|
792
809
|
}
|
|
793
810
|
/** @internal Used by the scan and delivery workers; not part of the public API. */
|
package/dist/types.d.ts
CHANGED
|
@@ -69,6 +69,20 @@ export interface Product {
|
|
|
69
69
|
/** Operator's pointer to where this product runs. Shown in notifications; never sent to models or sources. */
|
|
70
70
|
note?: string;
|
|
71
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* FIRST's EPSS for a finding's CVE: the estimated probability of exploitation in the next 30 days,
|
|
74
|
+
* and its rank among all scored CVEs. Shown only; not part of a finding's revision or review.
|
|
75
|
+
*/
|
|
76
|
+
export interface EpssScore {
|
|
77
|
+
/** The CVE it is for: the finding's event, or a CVE alias of its advisory when the event is a GHSA. */
|
|
78
|
+
cve: string;
|
|
79
|
+
/** 0 to 1. */
|
|
80
|
+
probability: number;
|
|
81
|
+
/** 0 to 1: the share of scored CVEs with a lower probability. */
|
|
82
|
+
percentile: number;
|
|
83
|
+
/** The day FIRST computed it, YYYY-MM-DD. */
|
|
84
|
+
date: string;
|
|
85
|
+
}
|
|
72
86
|
/** Where a reader should look to confirm a finding. Copied from the inventory; not security evidence. */
|
|
73
87
|
export interface FindingLocation {
|
|
74
88
|
system: string;
|
|
@@ -171,6 +185,8 @@ export interface Config {
|
|
|
171
185
|
kev: boolean;
|
|
172
186
|
feeds: string[];
|
|
173
187
|
vendor_feeds?: ('nodejs' | 'python' | 'php')[];
|
|
188
|
+
/** Look up FIRST's EPSS for the CVEs of current findings (CVE identifiers only). Default false. */
|
|
189
|
+
epss?: boolean;
|
|
174
190
|
};
|
|
175
191
|
models: {
|
|
176
192
|
enabled: boolean;
|
|
@@ -194,6 +210,11 @@ export interface Config {
|
|
|
194
210
|
ai_dismissals?: 'review' | 'record';
|
|
195
211
|
/** Deprecated configuration alias; true maps to review, false to record. */
|
|
196
212
|
review_before_news_suppression?: boolean;
|
|
213
|
+
/**
|
|
214
|
+
* Read stated CVSS scores, vendor ratings and exploitation reports from news to raise the
|
|
215
|
+
* priority of findings without an advisory severity. Default true.
|
|
216
|
+
*/
|
|
217
|
+
news_signals?: boolean;
|
|
197
218
|
health_channels: Channel[];
|
|
198
219
|
};
|
|
199
220
|
notifications: {
|
|
@@ -255,6 +276,8 @@ export interface Assessment {
|
|
|
255
276
|
remediation?: RemediationEvidence;
|
|
256
277
|
/** Inventory names and notes for the reader of a notification. Not part of alert deduplication. */
|
|
257
278
|
location?: FindingLocation;
|
|
279
|
+
/** EPSS for the finding's CVE when `sources.epss` is on. Shown only; changes nothing. */
|
|
280
|
+
epss?: EpssScore;
|
|
258
281
|
/** News-only or generic product context without deterministic package applicability. */
|
|
259
282
|
news_candidate?: boolean;
|
|
260
283
|
/**
|
|
@@ -284,6 +307,8 @@ export interface Assessment {
|
|
|
284
307
|
relevance?: 'relevant' | 'irrelevant' | 'unknown';
|
|
285
308
|
/** Model assessment of the article, separate from version-range applicability. */
|
|
286
309
|
news_analysis?: NewsAnalysis;
|
|
310
|
+
/** What articles state about a finding that has no advisory severity, read without a model. */
|
|
311
|
+
news_signals?: NewsSignals;
|
|
287
312
|
ai?: {
|
|
288
313
|
model: string;
|
|
289
314
|
provider: string;
|
|
@@ -291,6 +316,36 @@ export interface Assessment {
|
|
|
291
316
|
status: 'complete' | 'unavailable' | 'conflicting';
|
|
292
317
|
};
|
|
293
318
|
}
|
|
319
|
+
/** One statement an article makes about a finding's subject, with the sentence it was read from. */
|
|
320
|
+
export interface NewsStatement {
|
|
321
|
+
/** The identifier or inventory name the statement is tied to. */
|
|
322
|
+
subject: string;
|
|
323
|
+
/** The sentence, shortened. Untrusted article text. */
|
|
324
|
+
excerpt: string;
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* What news articles state about a finding without an advisory severity, read without a model.
|
|
328
|
+
* Signals only raise priority; see the configuration guide for what is read.
|
|
329
|
+
*/
|
|
330
|
+
export interface NewsSignals {
|
|
331
|
+
/** The highest CVSS base score stated for the subject. */
|
|
332
|
+
cvss?: NewsStatement & {
|
|
333
|
+
score: number;
|
|
334
|
+
version?: string;
|
|
335
|
+
level: Severity;
|
|
336
|
+
};
|
|
337
|
+
/** A vendor's word rating ("Severity: moderate", "rated Important"). */
|
|
338
|
+
rating?: NewsStatement & {
|
|
339
|
+
level: Severity;
|
|
340
|
+
word: string;
|
|
341
|
+
};
|
|
342
|
+
/** The article reports exploitation. Not a known-exploited catalog entry. */
|
|
343
|
+
exploitation?: NewsStatement;
|
|
344
|
+
/** The article says no exploitation is known. Shown only. */
|
|
345
|
+
no_known_exploitation?: NewsStatement;
|
|
346
|
+
/** The article reports public exploit code. Shown only. */
|
|
347
|
+
public_exploit?: NewsStatement;
|
|
348
|
+
}
|
|
294
349
|
export type AiReviewReason = 'ai_general_news' | 'ai_not_affected' | 'ai_irrelevant';
|
|
295
350
|
export interface AiReview {
|
|
296
351
|
finding_id: string;
|
package/docs/configuration.md
CHANGED
|
@@ -215,6 +215,7 @@ npm affected ranges and a documented PyPI final-release subset are evaluated loc
|
|
|
215
215
|
| `sources.github_token_env` | `GITHUB_TOKEN`; optional authentication for the GitHub API |
|
|
216
216
|
| `sources.kev` | `false`; optional matching-CVE enrichment with CISA known-exploitation evidence; KEV alone does not invent a product finding |
|
|
217
217
|
| `sources.vendor_feeds` | `[]`; opt-in official Node.js, Python and PHP feeds with bounded article extraction |
|
|
218
|
+
| `sources.epss` | `false`; FIRST's EPSS score for the CVE of each current finding, shown in alerts and `explain`; sends CVE identifiers only, see [EPSS](#epss) |
|
|
218
219
|
| `sources.feeds` | `[]`; up to 30 selected public HTTPS RSS 2.0/Atom URLs, without URL credentials |
|
|
219
220
|
|
|
220
221
|
Collection is designed to keep making progress. cve.now records that match a package on your list are re-read at every scan, the longest unread first. At most 4,000 records other than new ones from the listing are read in one scan (records named by the package lookups and cited CVEs included), so that 1,000 requests always stay for the listing; a lookup whose records did not all fit is sent first on the next scan; each request takes about 1.1 seconds, so 2,000 such records add about 37 minutes to a scan. With more than about 8,000 records for your packages, each is re-read less often than every second scan, and exclusions resting on those waiting their turn become `unknown` (and go to the review digest) until they are read again; records kept only because a declared product or keyword appears in their text, or because a stored news story cites them, are re-read in turn, 200 per scan, longest unread first. When cve.now or GitHub lists more new records than one scan reads (5,000), the oldest are collected, the scan is reported as incomplete, and the next scan continues from where this one stopped; any request left out by that limit is reported the same way. A package name in a source record that this application cannot normalise is kept as published and matches nothing; it no longer discards the rest of the record. A stored OSV record that the service no longer serves keeps its last known content and counts as checked at that scan, as a cve.now record does. A stored GitHub record for one of your packages that is not among the records modified since its last reading is unchanged, and counts as checked at each complete GitHub scan, also after a catch-up over more updates than one scan reads. Stored OSV records are re-read only while their package is in the inventory. A GitHub record that cannot be read is reported and remembered by its identifier, as GitHub wrote it (up to 10,000; beyond that, those first met more than a day ago are given up on first, then the newest, so the checkpoint can always move), and the checkpoint moves on. Later scans ask GitHub for it by identifier, the longest waiting first: two per scan without a token (GitHub allows 60 requests an hour without one), ten with one; a refusal for this client (403 or 429) ends those requests and is reported. Its stored copy is not confirmed as current meanwhile, so an exclusion resting on it becomes `unknown` and goes to the review digest; other records are confirmed as usual. It is given up on, with a report, only after three failed reads (an unreadable answer or 404) in scans whose listing could read something, and a day after it was first met. A scan whose listing has records but can read none of them is a format outage while any of those records was first met within the last day (with new records arriving, that can last as long as the outage): no attempt is counted and the checkpoint waits, so the whole window is listed again when GitHub serves the usual format; after a day they count as records that cannot be read. Listing a long window again costs one request per 100 records: without a token, GitHub's 60 requests an hour can run out during a long outage, so set `github_token_env` if you enable GitHub; once a record is read again by identifier, the listing is read again from the oldest record still remembered. A stored copy of a record that was given up on is not confirmed again until GitHub serves it readably; such records are kept as long as their stored copy exists. When a scan has request budget left, records that were given up on are asked for again in turn: with two requests to spare, one goes to the next record that has a stored copy and one to the next record in turn, so neither kind can keep the other from its turns; with one to spare, they simply take turns. A record lost to a long partial format change is so found again once GitHub serves it readably. A row whose `ghsa_id` is missing or reshaped is read by the identifier its own links end with. A row with no identifier at all is reported and cannot be asked for by name; stored records for those packages (every stored record, if it names none) read before the row was first seen (GitHub may list a row late) and older than the row's own update are not confirmed as current until each is read again by identifier. Scans do that in turn, from the same scan on, with the request budget left after the records above (one request is kept for them), longest unread first; one that cannot be read is remembered like any other. Such a row updated within the last day also holds the listing: later scans list again from the earliest of them, so a row that regains its identifier within a day of its update is read; not in a scan that reaches the page limit, and without a token not when the scan listed more than 300 records. While they wait, exclusions resting on them become `unknown` once not read for two poll intervals, as above, and go to the review digest. A listing that can read nothing while such a row was updated within the last day, or carries no update time, is a format outage, as above. An answer to a request by identifier that carries no identifier is a failed read of the record asked for. A stored cve.now record that the service no longer serves keeps its last known content and counts as checked at that scan; nothing is reported, and a finding that rests on it stays as it was. A stored record that the service serves in a form that cannot be used (a status this application does not know, such as a supersession) is reported as a failed request when it concerns one of your packages, and the exclusion resting on that record becomes `unknown` once it has not been read for two poll intervals; any other stored record keeps its last content. A new cve.now record whose request fails is not lost and cannot hold the source back. On the scan in which it first fails, the scan is reported as incomplete and its checkpoint stays where it was, as for any failed collection, unless that scan listed more than 200 records, counting the one-hour overlap (a first scan, or a catch-up after downtime): then the checkpoint moves at once, so that the next scan does not read the same records again. From then on the record is remembered by its identifier and the checkpoint moves on; the record is asked for again on every scan, after the records that have not failed and before the stored records re-read in turn, the ones tried least first. A listed record that is already stored (the checkpoint's one-hour overlap) is not read again. Records left unasked because a scan ended early are remembered the same way. Up to 2,000 records are remembered, the oldest first; when there are more, the checkpoint stops just before the first one that is not, and the next scan finds it in the listing. It is given up on, with a report, once its requests have failed three times and, since its first failure, one day has passed when the service answers with a refusal (such as HTTP 404) or with content that cannot be used, or three days when the request itself fails (a transport error, HTTP 5xx or "too many requests"). A record that waited without being asked for is not given up on. A record named by a package lookup whose request fails is reported, and the lookups that named it are sent first on the next scan. A record whose request failed without an answer (a transport error, HTTP 5xx or "too many requests") is given up on only in a scan in which other records were read: while none can be read, it is an outage, not a bad record. A record that was given up on is always reported, also when the listing request of that scan failed. A listing entry with no usable identifier cannot be asked for by name: it holds the checkpoint for at most one day from when it was first seen and is reported during that time. A checkpoint that lies ahead of the clock (the clock was set back) is treated like a new installation's: the scan looks back one day. A CVE that a stored news story cites and cve.now does not have is asked for again once a day; when it is published it also appears in the listing.
|
|
@@ -242,9 +243,15 @@ A release is written with at most three parts in prose ("Rails 7.0.8"); a four-p
|
|
|
242
243
|
|
|
243
244
|
`hacker_news` means **The Hacker News** at `thehackernews.com`, the cybersecurity publication, not Y Combinator's Hacker News. Its feed is [The Hacker News RSS](https://feeds.feedburner.com/TheHackersNews). The bot fetches bounded article text only from allowed The Hacker News hosts, without executing scripts: at most 50 articles per scan, four concurrently, with a 2 MB HTML response cap and 16,000 characters of extracted text per article. Evidence records whether full article content, a feed excerpt or unavailable content was used. A failed or capped article fetch retains the feed excerpt and cannot support a new confident AI-only dismissal. Incomplete articles relevant to the inventory create a `hacker_news:articles` monitoring-health finding; the successful RSS collection and its checkpoint are still retained.
|
|
244
245
|
|
|
246
|
+
### EPSS
|
|
247
|
+
|
|
248
|
+
`sources.epss: true` looks up [FIRST's EPSS](https://www.first.org/epss/) for the CVEs of every current finding (its event when that is a CVE, and the CVE aliases of its advisory and known-exploited records, since a library finding is often keyed by its GHSA identifier; not the CVEs a news story cites): the estimated probability that the CVE is exploited in the next 30 days, and how it ranks among all scored CVEs. When a finding has several CVEs, the highest score is shown with the CVE it is for. Alerts and digests show it on one line (`EPSS for CVE-2026-1234: 1.6% chance of exploitation in the next 30 days; higher than 76% of scored CVEs (FIRST, 2026-11-18)`), and `explain`, `findings` and the scan report carry it as `epss`.
|
|
249
|
+
|
|
250
|
+
It is shown only. It changes no priority, rule or decision, and it is not part of what makes a new finding revision, reopens a review or asks a model for a new analysis, so a score that FIRST updates daily never re-sends an alert. Only CVE identifiers are sent, to `https://api.first.org/data/v1/epss`, in batches of 50, at most ten requests a scan. A score is refreshed once a day, the longest unrefreshed first. A CVE that FIRST has not scored yet (usually one published in the last day or two) is asked for again the next day. GHSA and other identifiers have no EPSS. When a lookup fails, the scan reports a notice, not degraded monitoring, and findings keep the score of the last successful lookup. The cache holds the CVEs of current findings, and keeps others for 30 days after their last lookup, so a scan without findings does not throw the scores away. A score FIRST leaves out of one answer is kept while its date is within a week. A retired finding no longer shows a score. The notice of a failed lookup is in that scan's report (`scan`), not in `status`.
|
|
251
|
+
|
|
245
252
|
Set `sources.vendor_feeds: [nodejs, python, php]`, or choose those names with `init --vendor-feeds`, to enable the official Node.js vulnerability feed, Python release blog and PHP announcements. Each adapter fetches at most 20 eligible articles per scan from its fixed vendor origin, with bounded HTML parsing and 16,000-character text limits. Unsupported links or failed extraction retain an excerpt; relevant incomplete articles produce a health warning. PHP announcements are extracted by their feed anchor so unrelated releases do not become one article. Vendor release dates and later advisory-index publication dates do not prove first vulnerability disclosure.
|
|
246
253
|
|
|
247
|
-
Additional `feeds` supply titles and summaries/content present in their RSS/Atom response; their article links are not fetched. The bot does not search the web or obtain paywalled content. Choose feed URLs deliberately. Public destinations, DNS results, redirects, response sizes and request durations are checked; a failing source retains its previous checkpoint and cached evidence and produces degraded status.
|
|
254
|
+
Additional `feeds` supply titles and summaries/content present in their RSS/Atom response; their article links are not fetched. A feed that carries the whole article is therefore worth more than one that carries a headline and a few sentences. Feeds checked in November 2026 that carry full text with scores or exploitation reports: Rapid7's blog (`https://www.rapid7.com/blog/rss/`), Tenable's blog (`https://www.tenable.com/blog/feed`), The Register's security section (`https://www.theregister.com/security/headlines.atom`), Security Affairs (`https://securityaffairs.com/feed`), and the Zero Day Initiative's published advisories (`https://www.zerodayinitiative.com/rss/published/`), which state a CVSS rating for every advisory, including 0-day advisories published before a vendor fix or a CVE exists. oss-security (`https://seclists.org/rss/oss-sec.rss`) carries open-source disclosures as excerpts. BleepingComputer, SecurityWeek and Dark Reading feeds carry a headline and a few hundred characters. The bot does not search the web or obtain paywalled content. Choose feed URLs deliberately. Public destinations, DNS results, redirects, response sizes and request durations are checked; a failing source retains its previous checkpoint and cached evidence and produces degraded status.
|
|
248
255
|
|
|
249
256
|
Malformed individual records are skipped while valid neighboring records continue through collection and assessment. Incomplete collection keeps the previous checkpoint, including when valid records have already been saved; cve.now and GitHub instead remember the records they could not read by identifier and move their checkpoints on, as described above. Authentication failures, rate limits, invalid pagination and request bounds can stop the affected source; other sources and notification delivery continue. Cancellation stops further requests.
|
|
250
257
|
|
|
@@ -416,6 +423,7 @@ Each `library`, `product` and `news` rule has `levels`, `basis` and `channels`.
|
|
|
416
423
|
- Confirmed exclusions and all-source withdrawals are retained without new vulnerability notifications. Withdrawal alone does not prove a system safe. Withdrawal disagreement remains conflicting.
|
|
417
424
|
- AI distinguishes noncritical system news from vulnerability reports and evaluates claimed system impact before routing; general news and supported AI-only exclusions enter a durable local review queue by default, with a digest when channels are configured. Generic product reports with linked CVEs use this analysis too. Uncertain analysis goes to review. AI cannot suppress source-critical news, an enabled exploitation override or deterministic package urgency by declaring it irrelevant. Advisory-linked package news uses library policy. Multi-advisory articles retain unmatched CVE/GHSA subjects separately until authoritative alias evidence joins them.
|
|
418
425
|
- `policy.ai_dismissals: review` is the default. Both complete `general_news/not_applicable` and model-only `not_affected` conclusions require local review, including legacy AI-only irrelevant news. `record` is an explicit opt-out. Deterministic package exclusions, source-critical and enabled exploitation overrides take precedence. See the local review workflow below.
|
|
426
|
+
- `news_signals: true` (the default) reads what news articles state about a finding that has no advisory severity yet, without a model; see [News signals](#news-signals) below. `false` turns it off.
|
|
419
427
|
- `health_channels` routes monitoring failures independently from vulnerability thresholds. If every destination fails, inspect local status/logs; the bot cannot notify through an unavailable channel.
|
|
420
428
|
|
|
421
429
|
`poll_interval_minutes` is an integer from 1 to 1,440, default 15. `inventory_stale_days` is 1–365, default 7; timestamps more than five minutes in the future are also invalid for assessment. `digest_interval_hours` is an integer from 1 to 168, default 24. Digest boundaries are aligned to the Unix epoch in UTC, not a user's timezone. Each Slack/email digest contains at most five findings; additional groups are sent separately.
|
|
@@ -428,6 +436,28 @@ Slack digest groups also respect the message size limit. Entries that do not fit
|
|
|
428
436
|
|
|
429
437
|
Acknowledgement applies to the current finding revision. Material changes create a new revision. Pass the revision you read, `security-watch acknowledge FINDING_ID --revision N`, to have the command refuse when a newer revision has appeared in the meantime; without `--revision` the current revision is acknowledged and its number is printed. Suppression requires a reason and expiry and remains active until that expiry. `explain FINDING_ID` shows the current policy decision together with acknowledgement and suppression controls, so policy eligibility can be distinguished from an active operator hold. Existing pending deliveries are superseded when the assessment or policy changes. Ordinary alerts keep semantic deduplication. AI dismissal reviews additionally bind the exact reviewed conclusion, evidence content and inventory/model context; changes to that basis create a new review revision. Scan timestamps, unchanged evidence refreshes and JSON object key order do not reopen a review. Rare new advisory aliases can change canonical finding identity; this release does not migrate historical identities automatically.
|
|
430
438
|
|
|
439
|
+
### News signals
|
|
440
|
+
|
|
441
|
+
A news story often comes before the advisory record that carries a severity: a zero-day with no CVE yet, a CVE that is reserved but not published, a vendor bulletin. Such a finding has source severity `unknown`. With `policy.news_signals: true` (the default), Security Watch reads the articles of that finding for four statements, without a model:
|
|
442
|
+
|
|
443
|
+
| Statement | Read from | Effect |
|
|
444
|
+
| ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
445
|
+
| A CVSS score | `CVE-2026-1234 (CVSS score: 9.8)`, `a CVSS v3.1 score of 7.5`, `9.2 out of 10 on CVSS 4.0`, `The ZDI has assigned a CVSS rating of 7.6` | Priority at least the score's level (9.0 critical, 7.0 high, 4.0 medium); the highest stated score counts |
|
|
446
|
+
| A vendor's word rating | `Severity: moderate` (Apache advisories), `rated the vulnerability Important` | Priority at least that level (important = high, moderate = medium) |
|
|
447
|
+
| A report of exploitation | `is being actively exploited in the wild`, `under active exploitation`, `attackers are exploiting`, `exploitation attempts`, `added ... to its Known Exploited Vulnerabilities catalog` | Priority critical. With `urgent_unknown: true` the finding is sent at once as possibly critical; `exploited` stays false, since an article is not a known-exploited catalog |
|
|
448
|
+
| Public exploit code, or a denial of exploitation | `published a proof-of-concept`, `no evidence ... has been exploited` | Shown only |
|
|
449
|
+
|
|
450
|
+
The same internet-exposed, business-critical context rule as for advisories applies to a stated score or rating. Signals only raise: a missing, denied or uncertain statement lowers nothing and dismisses nothing, the source severity keeps meaning what advisory sources said, and a model's `not_affected` answer still goes to [local review](#reviewing-ai-dismissals-locally). As soon as an advisory record with a severity joins the finding, signals are no longer read for it.
|
|
451
|
+
|
|
452
|
+
A statement counts only when it is tied to the finding's subject:
|
|
453
|
+
|
|
454
|
+
- A score or rating: the nearest CVE or GHSA identifier before it in the same sentence is the finding's (`CVE-A (CVSS score: 9.3) - text` in a list); or, when the sentence cites no identifier, the product, package or keyword the finding matched is named in the same clause and the article cites no other identifier; or the article is about the subject alone (it cites one identifier, the finding's, or none and its title names the product).
|
|
455
|
+
- A report of exploitation, a denial or exploit code: an identifier in the same clause. A clause ends at `;`, at `, but`, `, and`, `while` and similar. In "attackers are exploiting CVE-A" and "CISA added CVE-A to its KEV catalog" that is the identifier after the report; in "CVE-A is being actively exploited" the one before it. So in "CVE-B was patched in March, but attackers are now exploiting CVE-A" only CVE-A is reported as exploited. When the sentence cites no identifier, a product, package or keyword named in the same clause, if the article cites no other identifier.
|
|
456
|
+
|
|
457
|
+
A negation before a report in its clause ("no evidence that", "not aware of", "neither ... nor ... report") makes it a denial. "No patch is available" or "without authentication" after a report does not. A hedge just before a report ("could be exploited", "suspected to be exploiting") voids it. "Zero-day" alone and "can exploit" are not reports. A whole number next to "CVSS" counts as a score only after "score", "rating" or a colon, and never as a threshold ("a CVSS score of 7 or higher", "CVSS 9.0+"). So "10 CVSS critical flaws" and "CVSS v4 metrics" are not scores. Not read: group statements ("It scores all five 9.2"), a score in another sentence of an article about several flaws ("The flaw has a CVSS score of 9.8"), CVSS vectors without a score, adjectives such as "critical flaw" or "high-severity", and tables (CISA ICS advisories). The excerpt each statement was read from is kept in the finding (`explain`); alerts print only the score, the rating word and the subject, never article text.
|
|
458
|
+
|
|
459
|
+
This is text matching: an article can be wrong, out of date or misleading, and a feed you add is trusted to write what it means. It was measured on one week of articles from The Hacker News, Rapid7, Tenable, The Register, Security Affairs, ZDI, seclists.org and CISA (256 items): every score and every report it read was correct, and it read no report from the ten articles that denied exploitation; it misses statements it cannot tie, which is the intended trade-off. Against a 20-product inventory that week it raised five findings and sent one more immediate alert, because cve.now usually has a severity already.
|
|
460
|
+
|
|
431
461
|
### Reviewing AI dismissals locally
|
|
432
462
|
|
|
433
463
|
```yaml
|
|
@@ -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.
|
|
7
|
+
This example uses `@shieldaai/security-watch@1.2.1`, 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.
|
|
19
|
+
npm install --ignore-scripts --save-exact @shieldaai/security-watch@1.2.1
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
## Run the fictional inventory
|
package/docs/sbom.md
CHANGED
|
@@ -41,7 +41,7 @@ Then add the Slack address and start, as in the [README](../README.md#get-starte
|
|
|
41
41
|
|
|
42
42
|
The whole folder is searched, up to 12 levels deep. Folders that hold installed or generated copies (`node_modules`, `vendor`, `.venv`, `target`, `dist`, `build` and similar), test data (`fixtures`, `testdata`) and hidden folders are skipped. Symbolic links are not followed.
|
|
43
43
|
|
|
44
|
-
Where a lockfile and a manifest of the same ecosystem sit in one folder, only the lockfile is read. A manifest below a folder with a lockfile (a workspace member) adds only packages the lockfile does not already have. A package that is known only by name is watched by name: Security Watch can find advisories for it, but cannot say whether your version is affected. Commit lockfiles for exact versions.
|
|
44
|
+
Where a lockfile and a manifest of the same ecosystem sit in one folder, only the lockfile is read. A manifest below a folder with a lockfile (a workspace member) adds only packages the lockfile does not already have, as does a `pyproject.toml` beside `requirements*.txt` files, which often list only some packages. A package that is known only by name is watched by name: Security Watch can find advisories for it, but cannot say whether your version is affected. Commit lockfiles for exact versions.
|
|
45
45
|
|
|
46
46
|
Development-only dependencies are included and marked `scope: optional`, because a malicious build tool reaches your pipeline even if it never ships. Add `--production` to leave them out where the file says which they are: `package-lock.json`, `package.json`, `pnpm-lock.yaml` 5 and 6, `poetry.lock` (older `category = "dev"`), Poetry dev groups and PEP 735 dependency groups in `pyproject.toml`, `Pipfile.lock`, `composer.lock`, `composer.json`, `pubspec.lock`, `pubspec.yaml`, Maven `test` scope and Gradle test configurations.
|
|
47
47
|
|
|
@@ -127,7 +127,7 @@ jobs:
|
|
|
127
127
|
steps:
|
|
128
128
|
- uses: actions/checkout@v7
|
|
129
129
|
- id: sbom
|
|
130
|
-
uses: ShieldaAI/security-watch@v1.
|
|
130
|
+
uses: ShieldaAI/security-watch@v1.2.1
|
|
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.
|
|
146
|
+
- uses: ShieldaAI/security-watch@v1.2.1
|
|
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.
|
|
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
|
|
164
164
|
artifacts:
|
|
165
165
|
paths: [security-watch.cdx.json]
|
|
166
166
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shieldaai/security-watch",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "Self-hosted security alerts for the software you run: reads your lockfiles (npm, Python, Go, Rust, Java and 7 more ecosystems) or any SBOM, watches new advisories and security news, and alerts you on Slack or email.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|