@shieldaai/security-watch 1.0.1 → 1.1.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,27 @@
2
2
 
3
3
  Versions follow [semantic versioning](https://semver.org/). What counts as a compatible change is defined in the [compatibility policy](docs/compatibility.md).
4
4
 
5
+ ## 1.1.0
6
+
7
+ Start from your code instead of a hand-written inventory, and keep the inventory current from CI. Existing configurations and inventories work unchanged. To be published under the default `latest` tag. The GitHub Action is used as `uses: ShieldaAI/security-watch@v1.1.0`.
8
+
9
+ ### Added
10
+
11
+ - **`security-watch sbom`** reads the lockfiles and manifests in a project and writes a CycloneDX 1.6 SBOM: npm (`package-lock.json` v1 to v3, `yarn.lock` 1 and 2+, `pnpm-lock.yaml` 5 to 9, `package.json`), Python (`poetry.lock`, `uv.lock`, `Pipfile.lock`, `pdm.lock`, `requirements*.txt`, `pyproject.toml`), Go (`go.mod`), Rust (`Cargo.lock`), PHP (`composer.lock`, `composer.json`), Ruby (`Gemfile.lock`, `Gemfile`), Java (`pom.xml`, `gradle.lockfile`), .NET (`packages.lock.json`, project files, `Directory.Packages.props`), Dart, Elixir, Swift and Haskell. It reads files only: no package manager, no symbolic links, no network. Each package records the files it was found in, and alerts show them (`Affected item: npm express 4.21.2 - found in package-lock.json`). `--owner`, `--note`, `--environment`, `--exposure`, `--criticality` and `--system-id` describe the system; in GitHub Actions and GitLab CI the repository address and commit are filled in. `--production` leaves out development-only dependencies. The command exits 1 when it finds no packages.
12
+ - **`init --project PATH`** creates a monitor for one or more projects in one step: an SBOM per project in `sboms/`, an inventory that reads that folder, and OSV turned on when a project has packages outside npm.
13
+ - **SBOM folder.** `sbom_directory` in the inventory makes every `.json` SBOM in a folder a system, read again at every scan. The SBOM's creation time is the system's `updated_at`, so an SBOM that stops arriving is reported as stale. A file that cannot be imported is reported and left out without stopping the other systems. Operating-system packages in container SBOMs (deb, rpm, apk and similar) are listed once as a notice instead of degrading every scan.
14
+ - **SPDX import.** `import-sbom`, the system `sbom` field and the SBOM folder accept SPDX JSON 2.2 and 2.3, including GitHub's dependency-graph export, as well as CycloneDX. SBOMs from Trivy, Syft and cdxgen are accepted as they are.
15
+ - **SBOM receiver.** An `intake` section makes `start` accept `PUT /v1/sboms/SYSTEM_ID` from pipelines, with bearer tokens limited to system IDs (lower case, as `sbom` writes them), TLS (or plain HTTP on loopback, or behind a TLS proxy with `allow_plain_http`), a 20 MiB limit, a slowdown after repeated failed tokens, and an answer a pipeline can act on: the upload is imported before it is written, so an unusable SBOM fails the job at once. `security-watch intake` runs the receiver alone. `security-watch upload` and `sbom --upload URL` send an SBOM, retrying network errors and busy answers; the GitHub Action takes `upload-url` and `upload-token`. An empty SBOM folder is accepted, so a monitor can start before the first upload.
16
+ - **GitHub Action** (`action.yml`): `uses: ShieldaAI/security-watch@v1.1.0` writes the SBOM and uploads it as an artifact, or checks and uploads an SBOM made by another tool (`sbom-file`).
17
+ - [Watch a project from its dependency files](docs/sbom.md): supported files, CI recipes, ways to deliver SBOMs to the monitor, and other generators.
18
+ - Library exports: `generateSbom`, `importSbom`, `DEPENDENCY_FILES`, `startIntake`, `createIntakeHandler`, `uploadSbom`, and the types `SbomOptions`, `GeneratedSbom`, `DependencyFile`, `IntakeUpload`, `IntakeOptions`, `RunningIntake` and `UploadOptions`. `SbomImport.source.format` may be `SPDX`, and `SbomImport.subject` describes the system an SBOM is about.
19
+
20
+ ### Changed
21
+
22
+ - CycloneDX components with `evidence.occurrences` take the listed locations as their note.
23
+ - The inventory's `systems` list may be empty when `sbom_directory` is set; an inventory with no system at all is still refused.
24
+ - The README starts from `init --project`; the npm description and keywords say that lockfiles and SBOMs are read.
25
+
5
26
  ## 1.0.1
6
27
 
7
28
  Package metadata and documentation only; no change to behaviour or to the public API. To be published under the default `latest` tag.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Shielda Security Watch
2
2
 
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.
3
+ Security Watch tells you, within minutes, when a newly reported security problem concerns software you run, and tells you **where to look**. Point it at your code and it reads the lockfiles you already have (or give it a list of your systems by hand). 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
6
 
@@ -12,12 +12,12 @@ There is far more security news than anyone can read, and most of it has nothing
12
12
 
13
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
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.
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: let your CI pipeline send a fresh SBOM on every merge. In the starter setup Security Watch warns when the list has not been updated for a week.
16
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
17
 
18
18
  ## What an alert looks like
19
19
 
20
- This is the message produced by the example list in step 3 below and a fictional advisory:
20
+ This is the message produced by the [hand-written example list](#describe-systems-by-hand) below and a fictional advisory:
21
21
 
22
22
  ```text
23
23
  [CRITICAL] express request smuggling (fictional test record)
@@ -37,7 +37,7 @@ https://example.com/advisory
37
37
 
38
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
39
 
40
- ## Get started in five steps
40
+ ## Get started in four steps
41
41
 
42
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
43
 
@@ -47,42 +47,27 @@ You need a computer that stays on (a small server is enough) and [Node.js](https
47
47
  npm install --global @shieldaai/security-watch
48
48
  ```
49
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.
50
+ 2. **Point it at your code.** Give it the folder of a project you run. It reads the lockfiles and manifests already there (npm, Python, Go, Rust, PHP, Ruby, Java, .NET, Dart, Elixir, Swift and Haskell), writes them as an SBOM and creates a starter configuration. Nothing is installed, run or sent anywhere.
51
51
 
52
52
  ```sh
53
- security-watch init --directory ./watch --yes --notifications slack
53
+ security-watch init --directory ./watch --yes --project ./my-app --notifications slack
54
54
  ```
55
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
56
+ ```text
57
+ my-app: 412 packages (PyPI, npm) from 3 files: package-lock.json, services/billing/requirements.txt, services/billing/pyproject.toml.
58
+ Wrote /home/dana/watch/sboms/my-app.cdx.json.
72
59
  ```
73
60
 
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.
61
+ Repeat `--project` for each project. Every SBOM in `watch/sboms` is one monitored system, and an alert names the file a package was found in. No code at hand? [Describe your systems by hand](#describe-systems-by-hand) instead.
75
62
 
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=`:
63
+ 3. **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
64
 
80
65
  ```sh
81
66
  cp ./watch/.env.example ./watch/.env
82
67
  chmod 600 ./watch/.env
83
68
  ```
84
69
 
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.
70
+ 4. **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
71
 
87
72
  ```sh
88
73
  security-watch doctor --config ./watch/security-watch.yaml --credentials-file ./watch/.env
@@ -90,22 +75,73 @@ You need a computer that stays on (a small server is enough) and [Node.js](https
90
75
  security-watch start --config ./watch/security-watch.yaml --credentials-file ./watch/.env
91
76
  ```
92
77
 
78
+ **Keep it current from CI.** Dependencies change with every merge, and an SBOM older than a week is reported as stale. Let your pipeline send a fresh one. Turn on the receiver in `watch/security-watch.yaml`, put a token made with `openssl rand -hex 32` in `watch/.env` as `SECURITY_WATCH_INTAKE_TOKEN` and in your CI secrets, and restart:
79
+
80
+ ```yaml
81
+ intake:
82
+ listen: 0.0.0.0:8787
83
+ tls_cert_file: ./tls/cert.pem # or allow_plain_http: true behind a TLS proxy
84
+ tls_key_file: ./tls/key.pem
85
+ ```
86
+
87
+ ```yaml
88
+ # GitHub Actions: makes the SBOM and sends it; the job fails if the monitor refuses it
89
+ - uses: ShieldaAI/security-watch@v1.1.0
90
+ with:
91
+ system-id: my-app
92
+ owner: Dana, platform team
93
+ upload-url: https://watch.example.com:8787
94
+ upload-token: ${{ secrets.SECURITY_WATCH_INTAKE_TOKEN }}
95
+ ```
96
+
97
+ ```sh
98
+ # Any other pipeline with Node.js 24 and SECURITY_WATCH_INTAKE_TOKEN set
99
+ npx --yes @shieldaai/security-watch@1.1.0 sbom --system-id my-app --upload https://watch.example.com:8787
100
+ ```
101
+
102
+ [Watch a project from its dependency files](docs/sbom.md) covers the files that are read, GitLab CI, the receiver (tokens limited to some systems, TLS, Docker), other ways to deliver SBOMs, and SBOMs from Trivy, Syft, cdxgen or GitHub's dependency graph, which are accepted as they are.
103
+
104
+ ### Describe systems by hand
105
+
106
+ For products, databases and SaaS, or to add owners and notes yourself, write `watch/systems.yaml` (create the folder with `security-watch init --directory ./watch --yes --notifications slack`, which writes an example):
107
+
108
+ ```yaml
109
+ sbom_directory: ./sboms # optional: SBOMs from step 2 or your pipelines
110
+ systems:
111
+ - id: web-shop
112
+ name: Web shop
113
+ owner: Dana, platform team
114
+ note: runs on cluster eu-1, namespace shop
115
+ updated_at: '2026-11-13T09:00:00Z' # when you last checked this list; older than 7 days counts as stale
116
+ libraries:
117
+ - 'npm:express@4.21.2 # checkout API, repository acme/checkout, file package.json'
118
+ - 'python:requests==2.32.3 # billing worker, services/billing/requirements.txt'
119
+ products:
120
+ - name: PostgreSQL
121
+ version: '16.4'
122
+ note: managed database "shop-prod", owned by the data team
123
+ ```
124
+
125
+ 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.
126
+
127
+ 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. `init --project` does this for you when it finds such packages.
128
+
93
129
  **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
130
 
95
131
  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
132
 
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.
133
+ **Version 1.1.0.** This is `@shieldaai/security-watch` 1.1.0, a minor release of the first stable version (1.0.0) that adds SBOM generation from dependency files, an SBOM folder for pipelines, SPDX import and a GitHub Action. It is published under the default `latest` tag and 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.
98
134
 
99
135
  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.
100
136
 
101
137
  ## Features
102
138
 
103
- - YAML/JSON inventories, library lists across 12 ecosystems, and npm package-lock v2/v3 imports. Names alone are accepted; exact installed versions improve applicability checks.
139
+ - Inventories from your code: `security-watch sbom` and `init --project` read the lockfiles and manifests of 12 ecosystems and write a CycloneDX SBOM; an SBOM folder turns every SBOM your pipelines deliver into a monitored system. A [GitHub Action](docs/sbom.md#github-actions) and a one-line command for other CI are included. Hand-written YAML/JSON inventories and library lists still work. Names alone are accepted; exact installed versions improve applicability checks.
104
140
  - 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.
105
141
  - 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.
106
142
  - Separate alert thresholds for libraries, products and news, plus review digests and configurable overrides for potentially critical findings, known exploitation and malware.
107
143
  - 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).
144
+ - Per-source coverage receipts, bounded CycloneDX and SPDX import (output of Trivy, Syft, cdxgen and GitHub's dependency graph) 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
145
  - 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.
110
146
 
111
147
  | Inventory item | Coverage |
@@ -114,7 +150,7 @@ Related projects: [Agent Guard](https://github.com/ShieldaAI/agent-guard) for to
114
150
  | PyPI package with a final release | Match the documented PEP 440 final-release subset; other forms remain unknown |
115
151
  | Library in another supported ecosystem | Exact positive OSV query or explicitly listed affected version; unsupported version ranges remain unknown |
116
152
  | Library without an installed version | Discover advisory candidates by package identity; applicability remains unknown |
117
- | npm package-lock v2/v3 | Import resolved transitive, development and optional dependency metadata; no installation or lifecycle scripts |
153
+ | Lockfiles and SBOMs | Import resolved transitive, development and optional dependency metadata; no installation or lifecycle scripts |
118
154
  | 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** |
119
155
  | Unknown or stale version | Review required; never infer safety from missing evidence |
120
156
 
@@ -134,10 +170,10 @@ To build and install from a source checkout:
134
170
  npm ci
135
171
  npm run check
136
172
  npm pack
137
- npm install --global ./shieldaai-security-watch-1.0.1.tgz
173
+ npm install --global ./shieldaai-security-watch-1.1.0.tgz
138
174
  ```
139
175
 
140
- Choose one setup command below. For a fictional example with AI disabled:
176
+ Choose one setup command below. To start from your own code, use `init --project` as in [step 2](#get-started-in-four-steps). For a fictional example with AI disabled:
141
177
 
142
178
  ```sh
143
179
  security-watch init --directory ./watch --yes
@@ -213,6 +249,8 @@ To measure when an analyst acknowledged or triaged those incidents, use `pilot-r
213
249
 
214
250
  ## Library inventories
215
251
 
252
+ The quickest inventory is the one generated from your lockfiles with `security-watch sbom` or `init --project` ([guide](docs/sbom.md)). This section covers library lists written by hand.
253
+
216
254
  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
255
 
218
256
  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.
@@ -278,9 +316,9 @@ docker run --rm --name security-watch \
278
316
  shielda-security-watch start --config /config/security-watch.yaml
279
317
  ```
280
318
 
281
- Before running, set `inventory: /config/systems.yaml` and `database: /data/watch.db` in the container's configuration. Create `watch/.env` privately with only the credentials you use; it is not loaded automatically by the npm CLI. Keep configuration, inventory and `.env` readable only by your user, for example with `chmod 600` on those files. The short initialization command assigns the data volume to your UID/GID; the application itself then runs as that user. Your Docker VM must be able to access the configuration/inventory bind mounts. Add a read-only mount for any imported lockfile under `/config` and use the matching path in the inventory.
319
+ Before running, set `inventory: /config/systems.yaml` and `database: /data/watch.db` in the container's configuration. Create `watch/.env` privately with only the credentials you use; it is not loaded automatically by the npm CLI. Keep configuration, inventory and `.env` readable only by your user, for example with `chmod 600` on those files. The short initialization command assigns the data volume to your UID/GID; the application itself then runs as that user. Your Docker VM must be able to access the configuration/inventory bind mounts. Add a read-only mount under `/config` for any imported lockfile or SBOM folder (for example `--mount type=bind,src="$(pwd)/watch/sboms",dst=/config/sboms,readonly`) and use the matching path in the inventory.
282
320
 
283
- SQLite stays on a native Docker volume rather than a desktop VM's shared host filesystem. This avoids depending on host-sharing behavior for database locking and write-ahead logging. Retain `security-watch-data` when recreating the container. The application needs outbound network access and no inbound port.
321
+ SQLite stays on a native Docker volume rather than a desktop VM's shared host filesystem. This avoids depending on host-sharing behavior for database locking and write-ahead logging. Retain `security-watch-data` when recreating the container. The application needs outbound network access, and an inbound port only if you turn on the SBOM receiver (`intake`).
284
322
 
285
323
  The included Compose file uses root-level `security-watch.yaml`, `systems.yaml` and `.env`:
286
324
 
@@ -292,7 +330,7 @@ chmod 600 security-watch.yaml systems.yaml .env
292
330
  export SECURITY_WATCH_UID=$(id -u) SECURITY_WATCH_GID=$(id -g)
293
331
  ```
294
332
 
295
- Edit the copied inventory, notification routes and credentials, and apply the same `/config/systems.yaml` and `/data/watch.db` settings before running `docker compose up --build -d`. Inspect `docker compose logs --follow`. Compose requires the host UID/GID variables and automatically runs a short volume-ownership initializer before the application starts. Its `watch-data` named volume keeps SQLite on Docker's native filesystem, while the private configuration/inventory remain read-only host mounts. You may persist the UID/GID values in the private `.env` file for later Compose invocations. Add an explicit read-only mount if the inventory imports a lockfile. Retain the named volume when recreating containers; `docker compose down --volumes` removes it.
333
+ Edit the copied inventory, notification routes and credentials, and apply the same `/config/systems.yaml` and `/data/watch.db` settings before running `docker compose up --build -d`. Inspect `docker compose logs --follow`. Compose requires the host UID/GID variables and automatically runs a short volume-ownership initializer before the application starts. Its `watch-data` named volume keeps SQLite on Docker's native filesystem, while the private configuration/inventory remain read-only host mounts. You may persist the UID/GID values in the private `.env` file for later Compose invocations. Add an explicit read-only mount if the inventory imports a lockfile or reads an SBOM folder (`- ./sboms:/config/sboms:ro`). Retain the named volume when recreating containers; `docker compose down --volumes` removes it.
296
334
 
297
335
  ## How decisions work
298
336
 
@@ -321,6 +359,9 @@ Commands that operate on a configured monitor accept `--config PATH`; the defaul
321
359
  | `providers` | List supported provider profiles without configuration, credentials or network access |
322
360
  | `templates` | List common system IDs available to `init --systems` |
323
361
  | `ecosystems` | List supported library ecosystems |
362
+ | `sbom [--project PATH] [--output FILE]` | Read a project's lockfiles and manifests and write a CycloneDX SBOM; no network requests ([guide](docs/sbom.md)) |
363
+ | `upload --input FILE --url URL` | Send an SBOM to a monitor's receiver (`intake`); `sbom --upload URL` makes and sends one in a step |
364
+ | `import-sbom --input PATH` | Show what Security Watch reads from a CycloneDX or SPDX SBOM; exits 2 when some packages cannot be watched |
324
365
  | `normalize-libraries --input PATH` | Parse a library list without network requests; optional `--ecosystem` sets the group and `--output` saves a new JSON file |
325
366
  | `scan` | Run once, save evidence/findings and queue notifications; does not deliver by default |
326
367
  | `scan --dry-run` | Use in-memory state, disable model calls and send no notifications; source requests still occur |
@@ -384,11 +425,11 @@ The corpus contains source-derived synthetic scenarios with fictional inventorie
384
425
 
385
426
  ## Boundaries and privacy
386
427
 
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.
428
+ cve.now stack queries disclose deduplicated npm package names and versions; lockfiles, SBOMs and deployment metadata are not uploaded. `security-watch sbom` makes no network requests. 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.
388
429
 
389
430
  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).
390
431
 
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.
432
+ This release has no automatic patching, shell execution from news, hosted dashboard, Slack action buttons, VEX import, operating-system package matching, 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.
392
433
 
393
434
  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.
394
435
 
package/SECURITY.md CHANGED
@@ -14,7 +14,8 @@ Trusted inputs are the operator's configuration, inventory, chosen model/SMTP en
14
14
 
15
15
  Implemented boundaries include:
16
16
 
17
- - Strict configuration/inventory parsing, bounded input sizes and metadata-only lockfile import. No package installation or lifecycle-script execution occurs during monitoring.
17
+ - Strict configuration/inventory parsing, bounded input sizes and metadata-only lockfile and SBOM import. `security-watch sbom` reads dependency files as text: it runs no package manager or build tool, follows no symbolic link and makes no network request, so it is safe on an untrusted checkout. No package installation or lifecycle-script execution occurs during monitoring.
18
+ - The optional SBOM receiver (`intake`) is the only listening socket and is off by default. It listens on loopback unless configured otherwise, refuses to listen beyond loopback without TLS unless `allow_plain_http` is set for use behind a TLS proxy, requires a bearer token of at least 32 characters compared in constant time, limits each token to configured system IDs, slows repeated failures from one address (without refusing a valid token, so bad tokens sent through a shared proxy cannot lock a pipeline out), bounds bodies to 20 MiB and concurrent uploads to four, and writes an upload only after it imports, atomically, under a name built from a validated system ID. An upload cannot change hand-written systems, configuration or other files; it can set the owner and note that alerts show for the systems its token allows. Uploaded SBOMs are untrusted input to the same bounded importer as local ones.
18
19
  - 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
20
  - 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
21
  - 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.
@@ -48,7 +49,7 @@ SQLite stores evidence, finding revisions, model analysis excerpts, caches, budg
48
49
  - 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.
49
50
  - Source requests and model inputs have size and request limits. Incomplete collection or analysis reports degraded monitoring and requires review.
50
51
  - 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.
52
+ - CycloneDX JSON 1.4–1.6 and SPDX JSON 2.2/2.3 package metadata import, and SBOM generation from lockfiles and manifests (`security-watch sbom`), are supported, but not VEX ingestion, operating-system package matching, attestation verification or live deployment discovery. There is no authenticated web crawling, automatic remediation, distributed lock, multi-host worker or independent penetration-test certification.
52
53
  - Notifications are not exactly-once delivery. A timeout can occur after a destination accepts a message. Verify receipt before retrying an `unknown` job.
53
54
 
54
55
  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.