@shieldaai/security-watch 0.0.0-stage → 0.1.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/CONTRIBUTING.md +90 -0
  2. package/LICENSE +202 -0
  3. package/README.md +269 -2
  4. package/SECURITY.md +47 -0
  5. package/dist/assessment.d.ts +5 -0
  6. package/dist/assessment.js +398 -0
  7. package/dist/cli.d.ts +2 -0
  8. package/dist/cli.js +792 -0
  9. package/dist/config.d.ts +242 -0
  10. package/dist/config.js +298 -0
  11. package/dist/cve-now.d.ts +5 -0
  12. package/dist/cve-now.js +413 -0
  13. package/dist/delivery.d.ts +26 -0
  14. package/dist/delivery.js +394 -0
  15. package/dist/ecosystems.d.ts +25 -0
  16. package/dist/ecosystems.js +254 -0
  17. package/dist/engine.d.ts +26 -0
  18. package/dist/engine.js +307 -0
  19. package/dist/health.d.ts +17 -0
  20. package/dist/health.js +70 -0
  21. package/dist/heartbeat.d.ts +13 -0
  22. package/dist/heartbeat.js +74 -0
  23. package/dist/http.d.ts +8 -0
  24. package/dist/http.js +251 -0
  25. package/dist/index.d.ts +18 -0
  26. package/dist/index.js +15 -0
  27. package/dist/inventory.d.ts +3 -0
  28. package/dist/inventory.js +143 -0
  29. package/dist/lock.d.ts +3 -0
  30. package/dist/lock.js +112 -0
  31. package/dist/maintenance.d.ts +43 -0
  32. package/dist/maintenance.js +227 -0
  33. package/dist/models.d.ts +20 -0
  34. package/dist/models.js +602 -0
  35. package/dist/operations.d.ts +17 -0
  36. package/dist/operations.js +117 -0
  37. package/dist/providers.d.ts +209 -0
  38. package/dist/providers.js +459 -0
  39. package/dist/setup.d.ts +113 -0
  40. package/dist/setup.js +100 -0
  41. package/dist/source-error.d.ts +22 -0
  42. package/dist/source-error.js +56 -0
  43. package/dist/sources.d.ts +3 -0
  44. package/dist/sources.js +1071 -0
  45. package/dist/store.d.ts +71 -0
  46. package/dist/store.js +651 -0
  47. package/dist/types.d.ts +247 -0
  48. package/dist/types.js +1 -0
  49. package/dist/util.d.ts +6 -0
  50. package/dist/util.js +14 -0
  51. package/dist/vendor-sources.d.ts +24 -0
  52. package/dist/vendor-sources.js +56 -0
  53. package/docs/configuration.md +406 -0
  54. package/docs/quality-review.md +104 -0
  55. package/examples/advisories.json +17 -0
  56. package/examples/common-systems.yaml +243 -0
  57. package/examples/libraries.example.txt +16 -0
  58. package/examples/libraries.example.yaml +38 -0
  59. package/examples/library-watch.example.yaml +27 -0
  60. package/examples/security-watch.example.yaml +86 -0
  61. package/examples/systems.example.yaml +31 -0
  62. package/package.json +69 -4
@@ -0,0 +1,243 @@
1
+ # Sample monitoring list, not a record of installed software.
2
+ # Add installed versions and deployment context before assessing impact.
3
+ # Go is shorter than the matcher minimum; its longer aliases are used for discovery.
4
+ systems:
5
+ - id: nodejs
6
+ name: Node.js
7
+ environment: sample inventory
8
+ exposure: unknown
9
+ criticality: unknown
10
+ updated_at: 2026-10-24T15:13:17.645Z
11
+ products:
12
+ - name: Node.js
13
+ keywords:
14
+ - NodeJS
15
+ - Node JS
16
+ - id: python
17
+ name: Python
18
+ environment: sample inventory
19
+ exposure: unknown
20
+ criticality: unknown
21
+ updated_at: 2026-10-24T15:13:17.645Z
22
+ products:
23
+ - name: Python
24
+ keywords:
25
+ - CPython
26
+ - id: java
27
+ name: Java
28
+ environment: sample inventory
29
+ exposure: unknown
30
+ criticality: unknown
31
+ updated_at: 2026-10-24T15:13:17.645Z
32
+ products:
33
+ - name: Java
34
+ keywords:
35
+ - OpenJDK
36
+ - JDK
37
+ - JRE
38
+ - id: go
39
+ name: Go
40
+ environment: sample inventory
41
+ exposure: unknown
42
+ criticality: unknown
43
+ updated_at: 2026-10-24T15:13:17.645Z
44
+ products:
45
+ - name: Go
46
+ keywords:
47
+ - Golang
48
+ - Go programming language
49
+ - Go standard library
50
+ - id: rust
51
+ name: Rust
52
+ environment: sample inventory
53
+ exposure: unknown
54
+ criticality: unknown
55
+ updated_at: 2026-10-24T15:13:17.645Z
56
+ products:
57
+ - name: Rust
58
+ keywords:
59
+ - rustc
60
+ - Cargo
61
+ - id: php
62
+ name: PHP
63
+ environment: sample inventory
64
+ exposure: unknown
65
+ criticality: unknown
66
+ updated_at: 2026-10-24T15:13:17.645Z
67
+ products:
68
+ - name: PHP
69
+ keywords: []
70
+ - id: ruby
71
+ name: Ruby
72
+ environment: sample inventory
73
+ exposure: unknown
74
+ criticality: unknown
75
+ updated_at: 2026-10-24T15:13:17.645Z
76
+ products:
77
+ - name: Ruby
78
+ keywords:
79
+ - Ruby on Rails
80
+ - id: dotnet
81
+ name: .NET
82
+ environment: sample inventory
83
+ exposure: unknown
84
+ criticality: unknown
85
+ updated_at: 2026-10-24T15:13:17.645Z
86
+ products:
87
+ - name: .NET
88
+ keywords:
89
+ - ASP.NET
90
+ - .NET Core
91
+ - id: linux
92
+ name: Linux
93
+ environment: sample inventory
94
+ exposure: unknown
95
+ criticality: unknown
96
+ updated_at: 2026-10-24T15:13:17.645Z
97
+ products:
98
+ - name: Linux
99
+ keywords:
100
+ - Linux kernel
101
+ - id: windows
102
+ name: Windows
103
+ environment: sample inventory
104
+ exposure: unknown
105
+ criticality: unknown
106
+ updated_at: 2026-10-24T15:13:17.645Z
107
+ products:
108
+ - name: Windows
109
+ keywords:
110
+ - Windows Server
111
+ - id: docker
112
+ name: Docker
113
+ environment: sample inventory
114
+ exposure: unknown
115
+ criticality: unknown
116
+ updated_at: 2026-10-24T15:13:17.645Z
117
+ products:
118
+ - name: Docker
119
+ keywords:
120
+ - Docker Engine
121
+ - Docker Desktop
122
+ - Moby
123
+ - id: kubernetes
124
+ name: Kubernetes
125
+ environment: sample inventory
126
+ exposure: unknown
127
+ criticality: unknown
128
+ updated_at: 2026-10-24T15:13:17.645Z
129
+ products:
130
+ - name: Kubernetes
131
+ keywords:
132
+ - kubelet
133
+ - kube-apiserver
134
+ - id: nginx
135
+ name: NGINX
136
+ environment: sample inventory
137
+ exposure: unknown
138
+ criticality: unknown
139
+ updated_at: 2026-10-24T15:13:17.645Z
140
+ products:
141
+ - name: NGINX
142
+ keywords: []
143
+ - id: apache-http
144
+ name: Apache HTTP Server
145
+ environment: sample inventory
146
+ exposure: unknown
147
+ criticality: unknown
148
+ updated_at: 2026-10-24T15:13:17.645Z
149
+ products:
150
+ - name: Apache HTTP Server
151
+ keywords:
152
+ - Apache httpd
153
+ - id: openssl
154
+ name: OpenSSL
155
+ environment: sample inventory
156
+ exposure: unknown
157
+ criticality: unknown
158
+ updated_at: 2026-10-24T15:13:17.645Z
159
+ products:
160
+ - name: OpenSSL
161
+ keywords: []
162
+ - id: openssh
163
+ name: OpenSSH
164
+ environment: sample inventory
165
+ exposure: unknown
166
+ criticality: unknown
167
+ updated_at: 2026-10-24T15:13:17.645Z
168
+ products:
169
+ - name: OpenSSH
170
+ keywords: []
171
+ - id: postgresql
172
+ name: PostgreSQL
173
+ environment: sample inventory
174
+ exposure: unknown
175
+ criticality: unknown
176
+ updated_at: 2026-10-24T15:13:17.645Z
177
+ products:
178
+ - name: PostgreSQL
179
+ keywords:
180
+ - Postgres
181
+ - id: mysql
182
+ name: MySQL
183
+ environment: sample inventory
184
+ exposure: unknown
185
+ criticality: unknown
186
+ updated_at: 2026-10-24T15:13:17.645Z
187
+ products:
188
+ - name: MySQL
189
+ keywords: []
190
+ - id: redis
191
+ name: Redis
192
+ environment: sample inventory
193
+ exposure: unknown
194
+ criticality: unknown
195
+ updated_at: 2026-10-24T15:13:17.645Z
196
+ products:
197
+ - name: Redis
198
+ keywords: []
199
+ - id: mongodb
200
+ name: MongoDB
201
+ environment: sample inventory
202
+ exposure: unknown
203
+ criticality: unknown
204
+ updated_at: 2026-10-24T15:13:17.645Z
205
+ products:
206
+ - name: MongoDB
207
+ keywords: []
208
+ - id: git
209
+ name: Git
210
+ environment: sample inventory
211
+ exposure: unknown
212
+ criticality: unknown
213
+ updated_at: 2026-10-24T15:13:17.645Z
214
+ products:
215
+ - name: Git
216
+ keywords: []
217
+ - id: jenkins
218
+ name: Jenkins
219
+ environment: sample inventory
220
+ exposure: unknown
221
+ criticality: unknown
222
+ updated_at: 2026-10-24T15:13:17.645Z
223
+ products:
224
+ - name: Jenkins
225
+ keywords: []
226
+ - id: elasticsearch
227
+ name: Elasticsearch
228
+ environment: sample inventory
229
+ exposure: unknown
230
+ criticality: unknown
231
+ updated_at: 2026-10-24T15:13:17.645Z
232
+ products:
233
+ - name: Elasticsearch
234
+ keywords: []
235
+ - id: sqlite
236
+ name: SQLite
237
+ environment: sample inventory
238
+ exposure: unknown
239
+ criticality: unknown
240
+ updated_at: 2026-10-24T15:13:17.645Z
241
+ products:
242
+ - name: SQLite
243
+ keywords: []
@@ -0,0 +1,16 @@
1
+ # Example package identities, not a claim about what is installed.
2
+ # Versions are optional. Replace the illustrated versions with deployed values.
3
+ npm:express
4
+ npm:@types/node
5
+ python:requests
6
+ python:urllib3==2.2.3
7
+ php:symfony/http-foundation@6.4.0
8
+ go:golang.org/x/net
9
+ maven:org.apache.logging.log4j:log4j-core
10
+ rust:serde
11
+ ruby:rails
12
+ dotnet:Newtonsoft.Json
13
+ elixir:phoenix
14
+ dart:http
15
+ haskell:aeson
16
+ swift:https://github.com/apple/swift-nio.git
@@ -0,0 +1,38 @@
1
+ # Example package identities. Replace this inventory and update its timestamp.
2
+ # A missing version stays unknown; the sample versions are not upgrade recommendations.
3
+ systems:
4
+ - id: example-application
5
+ name: Example application
6
+ environment: unknown
7
+ exposure: unknown
8
+ criticality: unknown
9
+ updated_at: '2026-10-24T12:00:00Z'
10
+ libraries:
11
+ npm:
12
+ - express
13
+ - '@types/node'
14
+ python:
15
+ - requests
16
+ - name: urllib3
17
+ version: '2.2.3'
18
+ php:
19
+ - name: symfony/http-foundation
20
+ version: '6.4.0'
21
+ go:
22
+ - golang.org/x/net
23
+ maven:
24
+ - org.apache.logging.log4j:log4j-core
25
+ rust:
26
+ - serde
27
+ ruby:
28
+ - rails
29
+ dotnet:
30
+ - Newtonsoft.Json
31
+ elixir:
32
+ - phoenix
33
+ dart:
34
+ - http
35
+ haskell:
36
+ - aeson
37
+ swift:
38
+ - https://github.com/apple/swift-nio.git
@@ -0,0 +1,27 @@
1
+ version: 1
2
+ inventory: ./libraries.example.yaml
3
+ database: ./data/libraries.db
4
+ poll_interval_minutes: 30
5
+
6
+ # Structured package checks work without a model or model credentials.
7
+ sources:
8
+ cve_now: false
9
+ hacker_news: false
10
+ osv: true
11
+ github: false
12
+ kev: false
13
+ feeds: []
14
+ vendor_feeds: []
15
+ models:
16
+ enabled: false
17
+
18
+ policy:
19
+ library:
20
+ levels: [critical]
21
+ basis: source_severity
22
+ channels: [] # Set [slack] or [email], and configure that destination below.
23
+ health_channels: []
24
+ notifications:
25
+ max_attempts: 3
26
+ # slack:
27
+ # webhook_url_env: SLACK_WEBHOOK_URL
@@ -0,0 +1,86 @@
1
+ version: 1
2
+ inventory: ./systems.example.yaml
3
+ database: ./data/watch.db
4
+ poll_interval_minutes: 30
5
+ news_lookback_minutes: 40
6
+ inventory_stale_days: 7
7
+ digest_interval_hours: 24
8
+
9
+ sources:
10
+ cve_now: true
11
+ hacker_news: true # The Hacker News security publication, not Hacker News/Y Combinator.
12
+ osv: false # Enable for library queries across the supported ecosystems.
13
+ github: false
14
+ github_token_env: GITHUB_TOKEN
15
+ kev: false
16
+ feeds: [] # Optional additional public HTTPS RSS/Atom feeds.
17
+ vendor_feeds: [] # Optional official news: [nodejs, python, php].
18
+
19
+ models:
20
+ enabled: false
21
+ daily_request_limit: 100
22
+ daily_token_limit: 100000
23
+ max_input_chars: 12000
24
+ max_output_tokens: 1500
25
+ timeout_seconds: 45
26
+ # Enable AI to distinguish an impacted system from general news about it.
27
+ # Set enabled: true, provide credentials, and configure your exact model ID:
28
+ # analysis:
29
+ # provider: openai
30
+ # model: YOUR_MODEL_ID
31
+ # api_key_env: OPENAI_API_KEY
32
+ # verification:
33
+ # provider: anthropic
34
+ # model: YOUR_REVIEW_MODEL_ID
35
+ # api_key_env: ANTHROPIC_API_KEY
36
+ # daily_budget_usd requires input_usd_per_million and output_usd_per_million
37
+ # on each model. Without prices, only request and token limits are enforced.
38
+
39
+ policy:
40
+ library:
41
+ levels: [critical]
42
+ basis: source_severity
43
+ channels: [] # Choose [slack], [email], or [slack, email] and configure below.
44
+ product:
45
+ levels: [high, critical]
46
+ basis: priority
47
+ channels: []
48
+ news:
49
+ levels: [high, critical]
50
+ basis: priority
51
+ channels: []
52
+ urgent_unknown: true
53
+ exploited_override: true
54
+ malware_override: true
55
+ health_channels: [] # Recommended: a working channel for monitoring failures.
56
+
57
+ notifications:
58
+ max_attempts: 3
59
+ # slack:
60
+ # webhook_url_env: SLACK_WEBHOOK_URL
61
+ # email:
62
+ # smtp_url_env: SMTP_URL
63
+ # from: security-watch@example.com
64
+ # to: [security@example.com]
65
+
66
+ # Optional external success pings. Configure the receiver to alert on missed pings.
67
+ # monitoring:
68
+ # heartbeat_url_env: HEARTBEAT_URL
69
+ # interval_seconds: 60
70
+ # allow_private_endpoint: false
71
+
72
+ # Optional automatic maintenance. Preview with `security-watch prune` before starting.
73
+ # maintenance:
74
+ # interval_hours: 24
75
+ # retention:
76
+ # analysis_cache_days: 30
77
+ # evidence_history_days: 180
78
+ # finding_history_days: 180
79
+ # accepted_delivery_days: 180
80
+ # inactive_findings_days: 365
81
+ # unreferenced_evidence_days: 365
82
+ # batch_size: 1000
83
+ # backup:
84
+ # directory: ./backups
85
+ # keep: 7
86
+ # max_bytes: 536870912
@@ -0,0 +1,31 @@
1
+ # Fictional demonstration data. Replace it and update updated_at before real monitoring.
2
+ systems:
3
+ - id: payments-production
4
+ name: Payments API
5
+ environment: production
6
+ owner: payments-team
7
+ exposure: internet
8
+ criticality: critical
9
+ updated_at: '2026-10-23T00:00:00Z'
10
+ components:
11
+ - id: example-parser
12
+ ecosystem: npm
13
+ name: example-parser
14
+ version: 1.2.0
15
+ # lockfile: ../application/package-lock.json
16
+ products:
17
+ - name: Example Database
18
+ version: '4.2'
19
+ keywords: [Example Database Server]
20
+ keywords: [Example Cloud]
21
+ - id: payments-staging
22
+ name: Payments staging
23
+ environment: staging
24
+ exposure: internal
25
+ criticality: medium
26
+ updated_at: '2026-10-23T00:00:00Z'
27
+ components:
28
+ - id: example-parser
29
+ ecosystem: npm
30
+ name: example-parser
31
+ version: 1.3.0
package/package.json CHANGED
@@ -1,6 +1,71 @@
1
1
  {
2
2
  "name": "@shieldaai/security-watch",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0-alpha.0",
4
+ "description": "Evidence-led security advisory and news monitoring for your systems",
5
+ "type": "module",
6
+ "license": "Apache-2.0",
7
+ "engines": {
8
+ "node": ">=24.0.0"
9
+ },
10
+ "bin": {
11
+ "security-watch": "dist/cli.js"
12
+ },
13
+ "exports": {
14
+ ".": {
15
+ "types": "./dist/index.d.ts",
16
+ "import": "./dist/index.js"
17
+ }
18
+ },
19
+ "files": [
20
+ "dist",
21
+ "examples",
22
+ "docs",
23
+ "README.md",
24
+ "LICENSE",
25
+ "SECURITY.md",
26
+ "CONTRIBUTING.md"
27
+ ],
28
+ "scripts": {
29
+ "build": "node scripts/build.mjs",
30
+ "test": "npm run build && node --test test/*.test.mjs",
31
+ "check": "npm run format:check && npm test && node scripts/check-package.mjs",
32
+ "check:package": "node scripts/check-package.mjs",
33
+ "check:models": "npm run build && node scripts/check-models.mjs",
34
+ "evaluate:models": "npm run build && node scripts/evaluate-models.mjs",
35
+ "start": "node dist/cli.js start",
36
+ "prepublishOnly": "node scripts/release-check.mjs",
37
+ "demo": "npm run build && node scripts/demo.mjs",
38
+ "check:docker": "node scripts/check-docker.mjs",
39
+ "format": "prettier --write .",
40
+ "format:check": "prettier --check .",
41
+ "prepack": "npm run build"
42
+ },
43
+ "dependencies": {
44
+ "fast-xml-parser": "5.11.2",
45
+ "ipaddr.js": "2.5.0",
46
+ "nodemailer": "10.2.1",
47
+ "parse5": "8.0.1",
48
+ "semver": "7.8.5",
49
+ "yaml": "2.9.1",
50
+ "zod": "4.6.7"
51
+ },
52
+ "devDependencies": {
53
+ "@types/node": "24.10.1",
54
+ "@types/nodemailer": "7.0.4",
55
+ "@types/semver": "7.7.1",
56
+ "prettier": "3.9.10",
57
+ "typescript": "7.0.2"
58
+ },
59
+ "publishConfig": {
60
+ "access": "public",
61
+ "tag": "alpha"
62
+ },
63
+ "repository": {
64
+ "type": "git",
65
+ "url": "git+https://github.com/ShieldaAI/security-watch.git"
66
+ },
67
+ "bugs": {
68
+ "url": "https://github.com/ShieldaAI/security-watch/issues"
69
+ },
70
+ "homepage": "https://github.com/ShieldaAI/security-watch#readme"
71
+ }