sbom-vulnerability-scanner 0.0.0-stage → 9.7.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 +274 -0
- package/CONTRIBUTING.md +57 -0
- package/LICENSE +176 -0
- package/README.ja.md +310 -0
- package/README.md +314 -2
- package/bin/mcp-server.js +7 -0
- package/bin/sbom-scanner.js +16 -0
- package/dist/THIRD_PARTY_NOTICES.txt +1107 -0
- package/dist/extension.js +34809 -0
- package/dist/extension.js.LEGAL.txt +21 -0
- package/docs/TROUBLESHOOTING.ja.md +24 -0
- package/docs/USER_GUIDE.ja.md +338 -0
- package/extension.js +216 -0
- package/l10n/bundle.l10n.ja.json +13 -0
- package/l10n/cli.en.json +18 -0
- package/l10n/cli.ja.json +18 -0
- package/l10n/compliance.en.json +42 -0
- package/l10n/compliance.ja.json +42 -0
- package/l10n/report.en.json +199 -0
- package/l10n/report.ja.json +199 -0
- package/lib/application/analysisService.js +18 -0
- package/lib/application/analysisWorkflow.js +12 -0
- package/lib/application/documentExplorerService.js +22 -0
- package/lib/application/headlessScanService.js +78 -0
- package/lib/application/monorepoWorkflow.js +54 -0
- package/lib/application/operationRunner.js +27 -0
- package/lib/application/reportService.js +42 -0
- package/lib/application/toolInstallationService.js +32 -0
- package/lib/cli/arguments.js +49 -0
- package/lib/cli/headlessCli.js +94 -0
- package/lib/common.js +166 -0
- package/lib/compliance/checks.js +101 -0
- package/lib/compliance/engine.js +60 -0
- package/lib/compliance/syntax.js +120 -0
- package/lib/compliance/validators/bsi.js +50 -0
- package/lib/compliance/validators/cisa.js +39 -0
- package/lib/compliance/validators/cra.js +34 -0
- package/lib/compliance/validators/fda.js +29 -0
- package/lib/config/constants.js +205 -0
- package/lib/config/settings.js +6 -0
- package/lib/config/toolSetupCatalog.js +23 -0
- package/lib/dashboardView.js +147 -0
- package/lib/data/spdxLicenseList.json +835 -0
- package/lib/i18n.js +274 -0
- package/lib/mcp/mcpServer.js +416 -0
- package/lib/model/analysisSnapshot.js +35 -0
- package/lib/model/monorepoSummary.js +19 -0
- package/lib/policy/policyEvaluator.js +235 -0
- package/lib/policy/policyLoader.js +58 -0
- package/lib/profile/profileLoader.js +47 -0
- package/lib/report/analysisPanel.js +71 -0
- package/lib/report/artifacts.js +104 -0
- package/lib/report/builder.js +362 -0
- package/lib/report/dependencyTree.js +50 -0
- package/lib/report/docx.js +26 -0
- package/lib/report/docxContent.js +165 -0
- package/lib/report/docxDocument.js +13 -0
- package/lib/report/docxFrontMatter.js +60 -0
- package/lib/report/docxLayout.js +48 -0
- package/lib/report/inventoryExport.js +16 -0
- package/lib/report/labels.js +8 -0
- package/lib/report/monorepo.js +55 -0
- package/lib/report/monorepoDocx.js +34 -0
- package/lib/report/projectCheck.js +32 -0
- package/lib/report/sarifExporter.js +183 -0
- package/lib/report/sbomExplorer.js +970 -0
- package/lib/report/sbomLens.js +9 -0
- package/lib/report/store.js +68 -0
- package/lib/report/styles.js +416 -0
- package/lib/reportViewer.js +42 -0
- package/lib/sbom/craAuditor.js +204 -0
- package/lib/sbom/diff.js +328 -0
- package/lib/sbom/documentCollection.js +71 -0
- package/lib/sbom/documentQuality.js +27 -0
- package/lib/sbom/enricher.js +267 -0
- package/lib/sbom/exporter.js +109 -0
- package/lib/sbom/generator.js +133 -0
- package/lib/sbom/inventory.js +63 -0
- package/lib/sbom/licenseClassifier.js +124 -0
- package/lib/sbom/manifestReader.js +15 -0
- package/lib/sbom/normalizer.js +509 -0
- package/lib/sbom/workspaceLock.js +41 -0
- package/lib/scanner.js +8 -0
- package/lib/tool/environment.js +21 -0
- package/lib/tool/executor.js +93 -0
- package/lib/tool/projectDiscovery.js +63 -0
- package/lib/tool/sbomDocumentReader.js +22 -0
- package/lib/tool/setupAdapter.js +8 -0
- package/lib/tool/workspaceContext.js +6 -0
- package/lib/ui/analysisCommands.js +122 -0
- package/lib/ui/chatParticipant.js +252 -0
- package/lib/ui/dashboardState.js +71 -0
- package/lib/ui/dashboardStyles.js +101 -0
- package/lib/ui/diagnostics.js +121 -0
- package/lib/ui/explorerPanel.js +18 -0
- package/lib/ui/importSbom.js +24 -0
- package/lib/ui/inventoryExport.js +17 -0
- package/lib/ui/languageModelTools.js +137 -0
- package/lib/ui/results.js +101 -0
- package/lib/ui/settingsCommands.js +32 -0
- package/lib/ui/toolSetup.js +57 -0
- package/lib/ui/workspace.js +39 -0
- package/lib/vex/vexEngine.js +314 -0
- package/lib/vex/vexLoader.js +44 -0
- package/lib/vulnerability/epss.js +225 -0
- package/lib/vulnerability/manifestDiagnostics.js +72 -0
- package/lib/vulnerability/npmAudit.js +162 -0
- package/lib/vulnerability/parser.js +280 -0
- package/lib/vulnerability/scanning.js +72 -0
- package/lib/vulnerability/suppression.js +129 -0
- package/lib/vulnerability/triageClassifier.js +154 -0
- package/media/icon.png +0 -0
- package/media/icon.svg +30 -0
- package/media/logo.svg +10 -0
- package/media/marketplace/inspection-detail.en.png +0 -0
- package/media/marketplace/inspection-detail.ja.png +0 -0
- package/media/marketplace/inspection-inventory.en.png +0 -0
- package/media/marketplace/inspection-inventory.ja.png +0 -0
- package/media/marketplace/inspection-tree.en.png +0 -0
- package/media/marketplace/inspection-tree.ja.png +0 -0
- package/media/marketplace/reports.png +0 -0
- package/media/marketplace/reports.svg +8 -0
- package/media/marketplace/workflow.png +0 -0
- package/media/marketplace/workflow.svg +9 -0
- package/media/sbom.svg +1 -0
- package/media/yuna.svg +30 -0
- package/package.json +377 -4
- package/package.nls.ja.json +38 -0
- package/package.nls.json +38 -0
package/README.md
CHANGED
|
@@ -1,3 +1,315 @@
|
|
|
1
|
-
#
|
|
1
|
+
# SBOM Vulnerability Scanner
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://marketplace.visualstudio.com/items?itemName=masahirocom.sbom-vulnerability-scanner)
|
|
4
|
+
[](https://open-vsx.org/extension/masahirocom/sbom-vulnerability-scanner)
|
|
5
|
+
[](https://marketplace.visualstudio.com/items?itemName=masahirocom.sbom-vulnerability-scanner)
|
|
6
|
+
[](https://marketplace.visualstudio.com/items?itemName=masahirocom.sbom-vulnerability-scanner)
|
|
7
|
+
[](https://www.bestpractices.dev/projects/15672)
|
|
8
|
+
[](LICENSE)
|
|
9
|
+
|
|
10
|
+
**What problem does it solve?** Modern projects depend on hundreds of third-party packages, and any of them may contain known security holes or licenses you cannot use. This extension lists everything your project depends on and tells you which packages are risky and how to fix them, without leaving VS Code.
|
|
11
|
+
|
|
12
|
+
Generate software dependency inventories (SBOM), audit known vulnerabilities, perform license compliance checks, triage actively exploited threats (CISA KEV), fix issues with 1-click Quick Fix, and share results as HTML, JSON or Word (DOCX) documents directly from VS Code.
|
|
13
|
+
|
|
14
|
+
[Install from Marketplace](https://marketplace.visualstudio.com/items?itemName=masahirocom.sbom-vulnerability-scanner) · [Open VSX Registry](https://open-vsx.org/extension/masahirocom/sbom-vulnerability-scanner) · [日本語](README.ja.md) · [Report an issue](https://github.com/masahiroid/sbom-vulnerability-scanner/issues)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## Walk through a real inspection
|
|
18
|
+
|
|
19
|
+
These screenshots show this repository at v9.0.0, analyzed from `package-lock.json` with the built-in manifest generator and checked with `npm audit`, using the extension's actual SBOM Explorer (captured October 20, 2026). This inspection found 306 components: 8 direct and 298 indirect dependencies, with 0 known vulnerabilities at the time of the scan.
|
|
20
|
+
|
|
21
|
+

|
|
22
|
+
|
|
23
|
+
1. **Follow the dependency tree on the left.** Expand or collapse branches with the arrows. Direct and transitive badges explain how packages relate to the project. The hierarchy represents SBOM dependencies, rather than filesystem directories.
|
|
24
|
+
2. **Select a package to inspect it on the right.** Review its version, PURL, license, hashes, missing metadata, vulnerabilities, and parent/child relationships. A compliance gap badge indicates missing SBOM fields such as supplier information.
|
|
25
|
+
3. **Search and filter above the tree.** Search by name, license, or CVE, or filter for vulnerable packages, copyleft licenses, and compliance gaps. Matching packages keep their ancestor branches so you can trace where they came from.
|
|
26
|
+
|
|
27
|
+

|
|
28
|
+
|
|
29
|
+
This example filters for `eslint` while keeping the hierarchy beside the package details. To use this view, open your project in VS Code, generate its SBOM, and open **SBOM Explorer**.
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
## Start with your project
|
|
33
|
+
|
|
34
|
+
1. Install the extension in VS Code 1.90 or newer and open your project folder. Scanning requires a trusted, local workspace.
|
|
35
|
+
2. Open **SBOM Scanner** in the Activity Bar and check the current project.
|
|
36
|
+
3. For an npm project, choose **manifest** and **npm-audit** in Settings. Install Node.js/npm and use an existing `package-lock.json`. This route needs no Syft or Trivy.
|
|
37
|
+
4. For other ecosystems, select **Set Up Syft and Trivy**, then choose automatic installation if available.
|
|
38
|
+
5. Select **Generate HTML, JSON and Word Reports**. Inspect the scan status and coverage before interpreting the findings. Open the output folder to find the Word document.
|
|
39
|
+
|
|
40
|
+
The workflow described here is available in the 1.1.0 build. Marketplace users on earlier versions can generate and scan, then export DOCX separately where supported.
|
|
41
|
+
|
|
42
|
+
## Key Features
|
|
43
|
+
|
|
44
|
+
### 🔍 Interactive SBOM Explorer
|
|
45
|
+
Inspect and explore your complete software bill of materials through an interactive, graphical tree & list visualizer:
|
|
46
|
+
- **Real-Time Incremental Search**: Filter components instantly across names, versions, licenses, PURLs, and CVE identifiers.
|
|
47
|
+
- **Dependency Tree & List**: Switch between a flat list and expandable package dependency branches with direct/transitive badges.
|
|
48
|
+
- **1-Click Quick Filter Pills**: Filter with a single click by `All`, `🎯 Direct Only`, `⛓️ Transitive Only`, `⚠️ Copyleft / GPL`, `🚨 Vulnerable`, or `🇪🇺 CRA Gaps`.
|
|
49
|
+
- **Component Inspector**: Click any package to view deep metadata: exact PURL, declared supplier, cryptographic hashes, license compliance status, linked CVE vulnerabilities with suggested fix versions, and upstream/downstream dependency relationships.
|
|
50
|
+
- **Zero External Dependencies**: Operates 100% locally with zero CDN or external network requests—completely offline-ready and secure.
|
|
51
|
+
|
|
52
|
+
### 📦 Sortable inventory, licenses and version conflicts
|
|
53
|
+
|
|
54
|
+
Expand **Inventory · Licenses · Conflicts · Documents** in Explorer and choose a dataset. Click column headings to sort ascending or descending. Inventory, license and conflict views share the search and filters above the tree.
|
|
55
|
+
|
|
56
|
+
- **Inventory** lists component name, version, PURL, license, source document, scope and supplier.
|
|
57
|
+
- **Licenses** checks identifiers against the bundled SPDX License List 3.29.0, distinguishing listed, deprecated, custom LicenseRef, unlisted and exception identifiers. It includes declared/concluded counts, packages and documents. This checks identifiers; it does not determine license obligations or validate an entire expression.
|
|
58
|
+
- **Version conflicts** groups multiple versions of the same PURL identity with their occurrences. Packages without a PURL are grouped by name; unknown versions alone do not establish a conflict.
|
|
59
|
+
- **CSV / JSON / Markdown export** opens a native save dialog in VS Code or downloads a file when viewing the HTML in a browser. Export follows the current search, filters and sort order. CSV output protects cells that could otherwise be treated as spreadsheet formulas.
|
|
60
|
+
|
|
61
|
+

|
|
62
|
+
|
|
63
|
+
### 📂 Open multiple external SBOM documents
|
|
64
|
+
|
|
65
|
+
Use **Open SBOM Documents (JSON)** in the command palette to select SPDX 2.x JSON or CycloneDX 1.x JSON files together. Component identifiers are isolated by source document, with a combined inventory and dependency tree retaining document names. External SPDX dependency references use the recorded checksum first, or the document namespace when no checksum is present. CycloneDX BOM-Links in dependency references resolve by serial number, document version and component ID.
|
|
66
|
+
|
|
67
|
+
Missing, ambiguous or checksum-mismatched references are listed as unresolved. Documents are not fetched automatically from the network. Limits are 64 documents, 50 MB per document and 100 MB combined; import can be cancelled from its progress notification. Importing documents does not run a vulnerability scan and explicitly displays “Vulnerability scan not run.”
|
|
68
|
+
|
|
69
|
+
**Document field coverage** shows present/total counts for names, versions, suppliers, PURL/CPE identifiers, licenses, hashes, timestamps, authors, document identifiers and relationships. **Specification notes (hashes)** checks hexadecimal content and length for supported hashes. Both views export as CSV, JSON or Markdown. These are generic information checks, rather than dedicated profiles validating every clause of the standards below.
|
|
70
|
+
|
|
71
|
+
### 🔄 Release and run differences
|
|
72
|
+
|
|
73
|
+
When a previous SBOM exists in the same output location, the current SBOM is compared with it for added, removed and changed components, including version, license, supplier and hash changes. Identical versions with different hashes are highlighted too. Differences are saved as `sbom-diff-*.json` and `sbom-diff-*.md`, and Markdown can be copied from Explorer.
|
|
74
|
+
|
|
75
|
+
### 🌐 SBOM field coverage checks
|
|
76
|
+
|
|
77
|
+
Built-in profiles named CRA, NTIA, FDA, METI and BSI count the presence of component names, versions, identifiers, suppliers, licenses, dependency scope, document timestamps and generator identity. HTML/Word reports show coverage scores and grades A–D. Checks include heuristics such as inferring a supplier from a PURL; they do not verify every clause of a particular standard edition or certify regulatory conformity. The Explorer detail pane also shows hash presence.
|
|
78
|
+
|
|
79
|
+
| Feature or standard | Current scope |
|
|
80
|
+
| --- | --- |
|
|
81
|
+
| Inventory | Column sorting, search, filters, combined inventory across selected JSON documents and CSV/JSON/Markdown export |
|
|
82
|
+
| License inventory | SPDX membership/deprecation facts, declared/concluded counts, package/document occurrences and CSV/JSON/Markdown export |
|
|
83
|
+
| Version conflicts and release differences | Multiple-version detection within/across selected documents and previous-run differences. No UI to choose two arbitrary document collections for comparison |
|
|
84
|
+
| Document loading and map | Multiple SPDX 2.x / CycloneDX 1.x JSON imports and dependency-reference resolution. No XML/YAML/tag-value, SPDX 3 JSON-LD, document map or custom editor |
|
|
85
|
+
| Custom quality profiles | No import of user-defined field rules/coverage thresholds or Markdown quality-report export |
|
|
86
|
+
| VEX (OpenVEX & CycloneDX VEX) | Standard OpenVEX and CycloneDX 1.5 VEX generation, input loading (.sbom-vex.json), justification tracking and artifact export |
|
|
87
|
+
| Specification findings and field help | Length/hexadecimal checks for supported hashes. No comprehensive vocabulary/expression-grammar validation or per-field specification tooltips |
|
|
88
|
+
| NTIA minimum elements (2021) | Basic counts of related fields; not a complete per-document quality profile validating every requirement |
|
|
89
|
+
| [CISA 2026 minimum elements](https://www.cisa.gov/resources-tools/resources/2026-minimum-elements-software-bill-materials-sbom) | No dedicated profile. CISA KEV vulnerability matching is a separate feature |
|
|
90
|
+
| [BSI TR-03183-2](https://www.bsi.bund.de/dok/TR-03183) | Generic field-presence checks only; no edition/clause-specific coverage validation or section 6.1 license checks |
|
|
91
|
+
| [OpenChain Automotive SBOM v1.1](https://github.com/OpenChain-Project/Automotive-SBOM) | No dedicated mandatory-field profile |
|
|
92
|
+
| [FDA 524B guidance (February 2026)](https://www.fda.gov/regulatory-information/search-fda-guidance-documents/cybersecurity-medical-devices-quality-management-system-considerations-and-content-premarket) | Generic fields under an FDA-named profile; no dedicated profile including level of support and end-of-support dates |
|
|
93
|
+
| [G7 SBOM for AI minimum elements](https://www.bsi.bund.de/SharedDocs/Downloads/EN/BSI/KI/SBOM-for-AI_minimum-elements.html) | No model/dataset-scoped quality metrics |
|
|
94
|
+
| CycloneDX CBOM and cryptographic inventory | No dedicated model or quality checks for algorithms, keys, certificates and protocols. Package integrity hashes are a separate feature |
|
|
95
|
+
| EU PQC roadmap, DORA certificate register, PCI DSS 12.3.3 and BSI TR-02102-1 (2026-01) | No dedicated cryptographic-inventory validation or parameter-table checks |
|
|
96
|
+
|
|
97
|
+
### 🤖 GitHub Copilot Chat (`@sbom`) & Language Model Tools
|
|
98
|
+
Interact seamlessly with SBOM generation, vulnerability triage, and compliance auditing from GitHub Copilot Chat:
|
|
99
|
+
- **`@sbom /scan`**: Trigger SBOM generation and vulnerability scans with instant conversational summaries and quick report open buttons.
|
|
100
|
+
- **`@sbom /triage`**: Request intelligent vulnerability prioritization combining FIRST.org EPSS real-world exploitation probabilities and CISA KEV actively exploited catalogs.
|
|
101
|
+
- **`@sbom /policy`**: Check project compliance against custom rules in `.sbom-policy.json`.
|
|
102
|
+
- **`@sbom /vex`**: Draft standard OpenVEX statements to formally mark non-affecting vulnerabilities.
|
|
103
|
+
- **Autonomous Language Model Tools**: Exposes `sbom_scan_workspace`, `sbom_evaluate_policy`, and `sbom_get_vulnerabilities` so Copilot and language models can query inventory directly.
|
|
104
|
+
|
|
105
|
+
### 🔌 Model Context Protocol (MCP) Server
|
|
106
|
+
Integrate with any AI assistant supporting Anthropic's Model Context Protocol (Claude Desktop, Claude Code, Cursor, Codex, and Antigravity):
|
|
107
|
+
- Run directly via stdio:
|
|
108
|
+
```json
|
|
109
|
+
{
|
|
110
|
+
"mcpServers": {
|
|
111
|
+
"sbom-scanner": {
|
|
112
|
+
"command": "npx",
|
|
113
|
+
"args": ["sbom-scanner-mcp"]
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
- Exposes tools: `scan_workspace`, `evaluate_policy`, `query_epss`, `record_vex`, and `get_sbom`.
|
|
119
|
+
|
|
120
|
+
### 🧾 SARIF 2.1.0 & CI/CD Gate (Headless CLI)
|
|
121
|
+
- Every scan now also writes `security-scan-<timestamp>.sarif` (OASIS SARIF 2.1.0) containing vulnerabilities and `.sbom-policy.json` violations, ready for GitHub Code Scanning.
|
|
122
|
+
- Run without VS Code: `sbom-scanner scan [path] [--policy] [--format sarif|json] [--out <file>] [--scanner auto|trivy|npm-audit]`.
|
|
123
|
+
- Exit codes: `0` passed, `1` policy violation, `2` scan failed or skipped (never treated as clean), `3` invalid arguments.
|
|
124
|
+
- GitHub Actions example:
|
|
125
|
+
```yaml
|
|
126
|
+
permissions:
|
|
127
|
+
contents: read
|
|
128
|
+
security-events: write
|
|
129
|
+
steps:
|
|
130
|
+
- uses: actions/checkout@v4
|
|
131
|
+
- run: npm ci
|
|
132
|
+
- run: npx --package sbom-vulnerability-scanner sbom-scanner scan . --policy --out security-scan.sarif
|
|
133
|
+
- if: always()
|
|
134
|
+
uses: github/codeql-action/upload-sarif@v3
|
|
135
|
+
with:
|
|
136
|
+
sarif_file: security-scan.sarif
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### 📏 Standards Validation (CLI)
|
|
140
|
+
Check an SBOM against specific requirements. Each finding cites its clause and appears in SARIF as `sbom-compliance/<standard>/<check>`.
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
sbom-scanner scan . --standard cisa,cra,bsi,fda --profile .sbom-profile.json
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
| ID | Basis | Note |
|
|
147
|
+
|---|---|---|
|
|
148
|
+
| `cisa` | CISA 2026 SBOM Minimum Elements (July 29, 2026) | Signatures, hashes, generation context, tool and SBOM versions, and format issues are warnings |
|
|
149
|
+
| `cra` | Regulation (EU) 2024/2847 Annex I Part II, Annex II | Contacts need not be in the SBOM, so they are warnings and can be set in the profile |
|
|
150
|
+
| `bsi` | BSI TR-03183-2 v2.1.0 | New SBOMs need CycloneDX 1.6+ or SPDX 3.0.1+; SPDX 3 files cannot be read yet, and SBOMs generated by this tool do not pass yet |
|
|
151
|
+
| `fda` | FD&C Act section 524B(b)(3), FDA guidance (February 2026) | Support data may be in an addendum, so its absence from the SBOM is a warning |
|
|
152
|
+
|
|
153
|
+
These checks are an engineering aid and are not a legal or certification opinion.
|
|
154
|
+
|
|
155
|
+
```json
|
|
156
|
+
{
|
|
157
|
+
"standards": ["cra", "bsi"],
|
|
158
|
+
"requireFields": ["supplier", "identifier"],
|
|
159
|
+
"requireHashAlgorithms": ["SHA-512"],
|
|
160
|
+
"vulnerabilityContact": "security@example.com",
|
|
161
|
+
"productContact": "https://example.com/contact",
|
|
162
|
+
"supportProperties": { "level": "support-level", "endOfSupport": "end-of-support" }
|
|
163
|
+
}
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### 🛡️ Standard VEX (OpenVEX & CycloneDX VEX) Statements
|
|
167
|
+
Formally document and communicate non-exploitable vulnerabilities without editing source code:
|
|
168
|
+
- Document false positives or non-reachable execution paths in `.sbom-vex.json`.
|
|
169
|
+
- Automatically outputs both standard **OpenVEX** (`openvex.json`) and **CycloneDX 1.5 VEX** (`cyclonedx-vex.json`).
|
|
170
|
+
- Suppressed CVEs are clearly tagged as `Not Affected` in SBOM Explorer and security reports with full justifications.
|
|
171
|
+
|
|
172
|
+
### ⚡ FIRST.org EPSS & Smart Triage Priority
|
|
173
|
+
- Connects directly with the FIRST.org Exploit Prediction Scoring System (EPSS) to predict 30-day real-world exploitation likelihood.
|
|
174
|
+
- Dynamically assigns Smart Triage Priorities (`IMMEDIATE`, `HIGH`, `MEDIUM`, `LOW`, `INFO`) based on CVSS severity, EPSS scores, and CISA KEV exploit status.
|
|
175
|
+
|
|
176
|
+
### 📋 Project Security Policy Engine (`.sbom-policy.json`)
|
|
177
|
+
Enforce compliance gates and guardrails on your software supply chain:
|
|
178
|
+
- Configure license restrictions (`denyLicenses`, `allowLicenses`), max allowable severity (`maxSeverity`), CISA KEV bans (`failOnKev`), EPSS score limits (`maxEpss`), and minimum CRA readiness scores (`minCraScore`).
|
|
179
|
+
- Evaluated automatically in SBOM Explorer and exportable as `policy-report.json`.
|
|
180
|
+
|
|
181
|
+
### 💡 In-Editor Diagnostics & 1-Click Quick Fix
|
|
182
|
+
|
|
183
|
+
After running a vulnerability scan, issues found in dependencies are highlighted directly inside your `package.json` with squiggly warnings:
|
|
184
|
+
- **Instant visibility**: Hover over flagged dependencies to inspect severity, CVE identifiers, descriptions, and available fixes.
|
|
185
|
+
- **1-Click Quick Fix**: Click the lightbulb (💡) or press `Cmd+.` / `Ctrl+.` on any vulnerable line to automatically upgrade the dependency expression to the safe fixed version.
|
|
186
|
+
|
|
187
|
+
### 🚨 CISA KEV Prioritization (Actively Exploited Threats)
|
|
188
|
+
Vulnerabilities listed in the **CISA Known Exploited Vulnerabilities (KEV)** catalog are flagged with prominent `[🚨 Actively Exploited (CISA KEV)]` notices:
|
|
189
|
+
- **Triage made easy**: Immediately distinguish actively weaponized CVEs (such as Log4Shell, Spring4Shell, and XZ Utils) from theoretical risks.
|
|
190
|
+
- **High-visibility warnings**: Highlighted in editor diagnostics and accompanied by an urgent security banner in both HTML and Word reports.
|
|
191
|
+
|
|
192
|
+
### ⚖️ License Classification & Copyleft Review
|
|
193
|
+
Every generated SBOM includes automatic software license classification across your dependency tree:
|
|
194
|
+
- **Categories**: Permissive (MIT, Apache-2.0, BSD), Weak Copyleft (LGPL, MPL), and Strong Copyleft (GPL, AGPL).
|
|
195
|
+
- **Compliance alerts**: Visual warning banners alert teams to reciprocal/copyleft obligations (e.g. GPL source disclosure requirements) before release.
|
|
196
|
+
|
|
197
|
+
### 🛡️ Vulnerability Suppression (`.sbom-ignore.json`)
|
|
198
|
+
Manage false positives, accepted risks, and grace periods without modifying upstream reports:
|
|
199
|
+
- Create a `.sbom-ignore.json` in your workspace root:
|
|
200
|
+
```json
|
|
201
|
+
{
|
|
202
|
+
"suppressions": [
|
|
203
|
+
{
|
|
204
|
+
"cveId": "CVE-2023-12345",
|
|
205
|
+
"reason": "Vulnerable feature is not exposed in production build",
|
|
206
|
+
"expires": "2026-12-31"
|
|
207
|
+
}
|
|
208
|
+
]
|
|
209
|
+
}
|
|
210
|
+
```
|
|
211
|
+
- **Auditable transparency**: Suppressed items are excluded from active counts but recorded under the *Suppressed Findings* audit table in HTML and Word exports with full rationale.
|
|
212
|
+
|
|
213
|
+
## Monorepo reports
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
When multiple npm projects are detected, **All detected projects** generates an overall HTML/JSON/Word summary and a separate set of detailed reports for each project. A single-project selection limits both SBOM generation and vulnerability scanning to that project.
|
|
217
|
+
|
|
218
|
+
The output folder contains `monorepo-report-*.html` and `monorepo-report-*.json`, plus the overall `security-report-*.docx`. Individual reports are under `monorepo-<timestamp>/projects/`. Expand a project in the HTML summary to review findings and inventory, or use **Open Output Folder** for the separate reports. **Export DOCX** exports the latest overall summary after a batch run.
|
|
219
|
+
|
|
220
|
+
Projects are analyzed sequentially. Failed/skipped projects and restricted fallback coverage remain visible in the summary; cancellation stops the batch. Counts sum project occurrences, so shared dependencies can be counted more than once. Directory scanners can also include nested projects.
|
|
221
|
+
|
|
222
|
+
For npm workspaces sharing a root lockfile, use **Auto** or **manifest** for SBOM generation and **Auto** or **npm-audit** for scanning. The built-in generator follows each project's reachable dependencies, and npm audit uses the selected workspace in the shared lockfile. Explicit Syft/Trivy selections report unsupported shared-lock scopes as failures rather than implying complete coverage. pnpm/Yarn workspace declarations and non-npm projects are not automatically discovered; open those project folders separately with suitable tools.
|
|
223
|
+
|
|
224
|
+
## Automatic tool setup
|
|
225
|
+
|
|
226
|
+
Setup checks the available tools and installs only missing Syft/Trivy after you choose the automatic option. Progress can be cancelled, and the extension checks tool availability again before reporting completion.
|
|
227
|
+
|
|
228
|
+
| Environment | Automatic installation prerequisite |
|
|
229
|
+
|---|---|
|
|
230
|
+
| macOS / Linux | Homebrew already installed and available to VS Code |
|
|
231
|
+
| Windows | WinGet already installed and available to VS Code |
|
|
232
|
+
| Other environments / unavailable manager | Use the provided terminal choices or official installation guides |
|
|
233
|
+
|
|
234
|
+
Package managers, Node.js and npm are not installed automatically. If installation needs interactive privileges or agreement acceptance, use the guided terminal method. Restart VS Code when a newly installed tool is not visible in PATH. Tools are installed in the environment hosting the extension; remote SSH/containers require their own tooling.
|
|
235
|
+
|
|
236
|
+
Official instructions: [Syft](https://oss.anchore.com/docs/installation/syft/) and [Trivy](https://trivy.dev/latest/getting-started/installation/).
|
|
237
|
+
|
|
238
|
+
## Reports you can share
|
|
239
|
+
|
|
240
|
+

|
|
241
|
+
|
|
242
|
+
**Generate HTML, JSON and Word Reports** performs SBOM generation and vulnerability scanning, saves their matching snapshot, and exports a DOCX document. **Export Latest Results as DOCX** can re-export a saved analysis without running the scanners again. Word reports include the target, time, tools, status, counts, findings and dependency inventory, with English or Japanese labels. DOCX includes a cover page, severity-sorted findings tables, red critical/high cells and page numbers. Set optional `sbomTool.reportCustomer` and `sbomTool.reportAuthor` in VS Code Settings to add recipient and author names to the cover.
|
|
243
|
+
|
|
244
|
+
The dashboard displays the installed version and reports folder. Tool preparation appears only while Syft/Trivy are missing; **Maintenance and recovery** at the bottom offers reinstallation.
|
|
245
|
+
|
|
246
|
+
Default output location: `SBOM-Reports/` inside the project. An explicit `sbomTool.outputDirectory` setting takes precedence. Previous `.sbom-tool/` results are kept in place; change the setting to that folder to reopen them.
|
|
247
|
+
|
|
248
|
+
| File | Purpose |
|
|
249
|
+
|---|---|
|
|
250
|
+
| `sbom-report-*.html` | Browse the dependency inventory |
|
|
251
|
+
| `vulnerability-report-*.html` / `*.json` | Read findings or process them with another tool |
|
|
252
|
+
| `sbom-cyclonedx-*.json` / `sbom-spdx-*` | SBOM export; SPDX encoding depends on the generator |
|
|
253
|
+
| `security-report-*.docx` | Word report for sharing and review |
|
|
254
|
+
| `analysis-*.json` | Matching run snapshot used for later DOCX export |
|
|
255
|
+
| `sbom-raw-*.json` | Extension-normalized data, not a standard SBOM |
|
|
256
|
+
| `project-check-*.md` | Project/tool availability check |
|
|
257
|
+
|
|
258
|
+
The images above illustrate the workflow and output formats. Actual report content depends on the project and tool results. A failed or skipped scan can still produce a report describing its failure; it is not a clean bill of health. Review documents before sharing, as they contain dependency names and target paths. Exclude `SBOM-Reports/` from your project’s Git repository.
|
|
259
|
+
|
|
260
|
+
## Choose tools and scope
|
|
261
|
+
|
|
262
|
+
- **SBOM auto**: tries Syft, then Trivy, then the built-in npm manifest reader.
|
|
263
|
+
- **Scanner auto**: tries Trivy, then npm audit. Falling back to npm reduces coverage to the selected npm project.
|
|
264
|
+
- **Manifest**: reads npm `package.json` and lockfiles v1–v3. Without a lockfile, versions are estimates.
|
|
265
|
+
- **npm audit**: requires Node.js/npm, a lockfile and registry access. For monorepos, select all detected projects or a single project. Discovery covers the root, `apps/*`, `packages/*`, and declared npm workspaces using literal paths, `*` and `**` (up to eight directory levels).
|
|
266
|
+
- **Syft / Trivy**: ecosystem coverage depends on the installed CLI version. SBOM generation and scanning independently inspect the source directory; this extension does not scan the generated SBOM file directly.
|
|
267
|
+
|
|
268
|
+
npm audit sends dependency information to the configured registry. Trivy uses network access for database updates. The extension does not automatically update dependencies or create a lockfile. CLI execution has a ten-minute timeout; analysis offers cancellation and prevents duplicate runs on the same folder.
|
|
269
|
+
|
|
270
|
+
## Settings and commands
|
|
271
|
+
|
|
272
|
+
| Setting | Default | Options |
|
|
273
|
+
|---|---|---|
|
|
274
|
+
| `sbomTool.sbomGenerator` | `auto` | auto, syft, trivy, manifest |
|
|
275
|
+
| `sbomTool.vulnerabilityScanner` | `auto` | auto, trivy, npm-audit |
|
|
276
|
+
| `sbomTool.defaultSbomFormat` | `cyclonedx-json` | cyclonedx-json, spdx |
|
|
277
|
+
| `sbomTool.outputDirectory` | `SBOM-Reports` | Workspace-relative or absolute path |
|
|
278
|
+
| `sbomTool.uiLanguage` | `auto` | auto, en, ja |
|
|
279
|
+
| `sbomTool.resultOpenMode` | `vscode` | vscode, external |
|
|
280
|
+
| `sbomTool.reportCustomer` | Empty | Optional Word cover recipient |
|
|
281
|
+
| `sbomTool.reportAuthor` | Empty | Optional Word cover author/company |
|
|
282
|
+
|
|
283
|
+
Use the dashboard or search **SBOM Vulnerability Scanner** in the Command Palette to generate reports, run individual operations, export DOCX, open saved results, clean old results, view execution logs or open the bundled user guide. Settings and individual actions are in expandable dashboard sections.
|
|
284
|
+
|
|
285
|
+
## Troubleshooting
|
|
286
|
+
|
|
287
|
+
- **No report button?** Open **SBOM Scanner**. The older `masahirocom.sbom-tool` extension has its own **SBOM Tool** view. The new view/commands have separate identifiers to avoid collisions; existing `sbomTool.*` settings remain supported.
|
|
288
|
+
- **Updated VSIX but old UI?** Use Extensions → menu → **Install from VSIX**, select the latest file, then reload the window.
|
|
289
|
+
- **ENOLOCK / scan failed?** Create the lockfile using your project’s normal dependency setup, check connectivity and select the correct npm target. A zero count with `failed` or `skipped` does not mean no vulnerabilities.
|
|
290
|
+
- **DOCX unavailable?** Run analysis with this build first. Independent older result files are not mixed into a new report. DOCX structure/content have automated tests, and Japanese and English samples were visually checked with the bundled LibreOffice renderer. Pagination can differ between Word applications and installed fonts.
|
|
291
|
+
- **Tool not found?** Check PATH in the extension host, restart VS Code or use manifest/npm-audit for an npm project.
|
|
292
|
+
|
|
293
|
+
See the bundled [Japanese user guide](docs/USER_GUIDE.ja.md) and [troubleshooting guide](docs/TROUBLESHOOTING.ja.md). This is a development build, not a guarantee of complete vulnerability detection or licence compliance.
|
|
294
|
+
|
|
295
|
+
## Companion Extension: Codes Doctor
|
|
296
|
+
|
|
297
|
+
Enhance both your source code health and supply chain security:
|
|
298
|
+
- **[Codes Doctor](https://marketplace.visualstudio.com/items?itemName=masahirocom.codes-doctor)**: AI-assisted static analysis and automatic refactoring tool. While **SBOM Vulnerability Scanner** audits third-party libraries, license compliance, and security vulnerabilities, **Codes Doctor** analyzes the source code you write to identify defects, code smells, and performance bottlenecks with 1-click automated fixes.
|
|
299
|
+
|
|
300
|
+
## Feedback and contributing
|
|
301
|
+
|
|
302
|
+
- **Get it**: install from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=masahirocom.sbom-vulnerability-scanner) or [Open VSX](https://open-vsx.org/extension/masahirocom/sbom-vulnerability-scanner), or build from source below.
|
|
303
|
+
- **Report bugs or request features**: open a [GitHub issue](https://github.com/masahiroid/sbom-vulnerability-scanner/issues). Include your OS, VS Code version, extension version and the steps to reproduce.
|
|
304
|
+
- **Contribute code**: fork the repository and open a pull request against `develop`. Read [CONTRIBUTING.md](CONTRIBUTING.md) for the coding standards and checks a contribution must pass.
|
|
305
|
+
|
|
306
|
+
## Build from source
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
```sh
|
|
311
|
+
npm ci
|
|
312
|
+
npm run package:release
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
The versioned VSIX and `releases/sbom-vulnerability-scanner-latest.vsix` are generated locally. Source: [masahiroid/sbom-vulnerability-scanner](https://github.com/masahiroid/sbom-vulnerability-scanner). License: Apache-2.0.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const manifest = require('../package.json');
|
|
3
|
+
const { runCli } = require('../lib/cli/headlessCli');
|
|
4
|
+
|
|
5
|
+
const controller = new AbortController();
|
|
6
|
+
process.once('SIGINT', () => controller.abort());
|
|
7
|
+
process.once('SIGTERM', () => controller.abort());
|
|
8
|
+
|
|
9
|
+
runCli(process.argv.slice(2), {
|
|
10
|
+
stdout: process.stdout,
|
|
11
|
+
stderr: process.stderr,
|
|
12
|
+
cwd: process.cwd(),
|
|
13
|
+
env: process.env,
|
|
14
|
+
toolVersion: manifest.version,
|
|
15
|
+
signal: controller.signal,
|
|
16
|
+
}).then(code => { process.exitCode = code; });
|