relsec 0.1.0 → 0.1.2
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/LICENSE +1 -1
- package/README.md +392 -341
- package/SECURITY.md +36 -36
- package/dist/cli.js +15 -1
- package/dist/cli.js.map +1 -1
- package/dist/report.js +2 -2
- package/dist/report.js.map +1 -1
- package/dist/theme.js +77 -32
- package/dist/theme.js.map +1 -1
- package/dist/version-info.d.ts +1 -1
- package/dist/version-info.js +1 -1
- package/package.json +65 -64
package/README.md
CHANGED
|
@@ -1,185 +1,186 @@
|
|
|
1
|
-
# relevant
|
|
2
|
-
|
|
3
|
-
[](https://github.com/MistanKh/relsec/actions/workflows/ci.yml)
|
|
4
|
-
[](LICENSE)
|
|
5
|
-
[](package.json)
|
|
6
|
-
|
|
7
|
-
Local-first security relevance for CVEs, advisories, IOCs, dependencies, logs, and service exposure.
|
|
8
|
-
|
|
9
|
-
`relevant` helps answer the question most scanners leave to humans:
|
|
10
|
-
|
|
11
|
-
> Does this finding actually matter in this environment?
|
|
12
|
-
|
|
13
|
-
It is an open-source alpha for security engineers, AppSec teams, SOC analysts, platform teams, and curious builders who want evidence-first triage without sending code, logs, or inventories to a hosted service.
|
|
14
|
-
|
|
15
|
-
The package name is `relsec`, and the CLI is exposed as both `relevant` and `relsec`.
|
|
16
|
-
|
|
17
|
-
## The Problem
|
|
18
|
-
|
|
19
|
-
Modern teams receive security findings faster than they can investigate them:
|
|
20
|
-
|
|
21
|
-
- A scanner says a dependency is vulnerable.
|
|
22
|
-
- A vendor advisory says a package needs urgent patching.
|
|
23
|
-
- A threat feed publishes IPs, domains, hashes, or other indicators.
|
|
24
|
-
- A SOC alert references activity that may or may not exist in local logs.
|
|
25
|
-
- A spreadsheet says a service is internet-facing, but nobody is sure which repo owns it.
|
|
26
|
-
|
|
27
|
-
The hard part is not seeing the alert. The hard part is proving whether it matters in your environment.
|
|
28
|
-
|
|
29
|
-
For example, imagine a critical upload-library CVE lands during a release freeze. A scanner flags `multer` somewhere in your monorepo. Before waking up every service owner, you need answers:
|
|
30
|
-
|
|
31
|
-
- Which service actually has the vulnerable version?
|
|
32
|
-
- Is that service internet-facing or internal-only?
|
|
33
|
-
- Is the vulnerable upload API used in source code?
|
|
34
|
-
- What evidence can be pasted into a ticket?
|
|
35
|
-
- What should be done next?
|
|
36
|
-
|
|
37
|
-
`relevant` turns that into a local evidence-gathering workflow instead of a meeting.
|
|
38
|
-
|
|
39
|
-
## What This Tool Does
|
|
40
|
-
|
|
41
|
-
`relevant` reads local files and connects several pieces of security context:
|
|
42
|
-
|
|
43
|
-
| Input | What it uses it for |
|
|
44
|
-
| --- | --- |
|
|
45
|
-
| Dependency manifests | Finds vulnerable package versions in `package-lock.json`, `requirements.txt`, and SBOM files. |
|
|
46
|
-
| Advisory data | Maps CVEs, GHSA IDs, or imported OSV records to affected packages, ranges, and risky symbols. |
|
|
47
|
-
| Service inventory | Understands whether a service is internet-facing, partner-facing, internal, or unknown. |
|
|
48
|
-
| Source code | Searches for vulnerable symbols or APIs that make a package actually reachable. |
|
|
49
|
-
| Logs | Matches IOCs against local log files, including gzip-compressed logs. |
|
|
50
|
-
| Reports | Produces terminal, JSON, JSONL, Markdown, and SARIF output for humans and automation. |
|
|
51
|
-
|
|
52
|
-
It does not try to replace a scanner. It helps explain scanner output with local evidence.
|
|
53
|
-
|
|
54
|
-
## Real-World Examples
|
|
55
|
-
|
|
56
|
-
### Example 1: Triage A Dependency CVE
|
|
57
|
-
|
|
58
|
-
You receive a CVE for a vulnerable upload parser. Your scanner reports that `multer` exists somewhere in the repo.
|
|
59
|
-
|
|
60
|
-
Run:
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
relevant cve CVE-2026-41001 \
|
|
64
|
-
--workspace examples/enterprise \
|
|
65
|
-
--inventory examples/enterprise/security/inventory.json \
|
|
66
|
-
--format markdown
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
`relevant` checks:
|
|
70
|
-
|
|
71
|
-
1. Is there a local advisory record for the CVE?
|
|
72
|
-
2. Which package and version range are affected?
|
|
73
|
-
3. Which services contain the vulnerable package version?
|
|
74
|
-
4. Are those services exposed?
|
|
75
|
-
5. Does source code reference vulnerable symbols such as `upload.single` or `multer(`?
|
|
76
|
-
|
|
77
|
-
Example result:
|
|
78
|
-
|
|
79
|
-
```txt
|
|
80
|
-
CVE-2026-41001: relevant (critical)
|
|
81
|
-
|
|
82
|
-
Evidence:
|
|
83
|
-
- Found multer 1.4.4 in services/checkout-api/package-lock.json.
|
|
84
|
-
- Reachable symbol upload.single in src/uploads.ts.
|
|
85
|
-
- checkout-api has public ingress: https://checkout.example.com/v1/receipts.
|
|
86
|
-
|
|
87
|
-
Recommended actions:
|
|
88
|
-
- Upgrade multer to >=1.4.5-lts.1.
|
|
89
|
-
- Restrict public upload endpoints until patched.
|
|
90
|
-
- Search access logs for unusual multipart upload paths.
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
That output gives AppSec, engineering, and incident response a shared artifact: vulnerable dependency, reachable code path, exposed service, and suggested next actions.
|
|
94
|
-
|
|
95
|
-
### Example 2: Check Whether Threat Indicators Appear In Logs
|
|
96
|
-
|
|
97
|
-
A threat report publishes suspicious IPs and domains. You want to know whether those indicators appear in local Okta, proxy, CloudTrail, or server logs.
|
|
98
|
-
|
|
99
|
-
Run:
|
|
100
|
-
|
|
101
|
-
```bash
|
|
102
|
-
relevant ioc \
|
|
103
|
-
--indicators examples/enterprise/security/cisa-aa26-141a.iocs \
|
|
104
|
-
--logs examples/enterprise/security/logs/okta-auth-prod-2026-05-21.log \
|
|
105
|
-
--logs examples/enterprise/security/logs/zscaler-web-prod-2026-05-21.log \
|
|
106
|
-
--format json
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
Example result:
|
|
110
|
-
|
|
111
|
-
```json
|
|
112
|
-
{
|
|
113
|
-
"totalMatches": 2,
|
|
114
|
-
"matches": [
|
|
115
|
-
{
|
|
116
|
-
"indicator": "203.0.113.77",
|
|
117
|
-
"type": "ip",
|
|
118
|
-
"line": 3
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
"indicator": "evil-update.example",
|
|
122
|
-
"type": "domain",
|
|
123
|
-
"line": 1
|
|
124
|
-
}
|
|
125
|
-
]
|
|
126
|
-
}
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
That helps a SOC analyst quickly move from "this IOC exists in a feed" to "this IOC appears in these local files on these lines."
|
|
130
|
-
|
|
131
|
-
### Example 3: Build A Local Advisory File From OSV
|
|
132
|
-
|
|
133
|
-
When you want broader advisory coverage, import OSV records for dependencies found in your inventory:
|
|
134
|
-
|
|
135
|
-
```bash
|
|
136
|
-
relevant import osv \
|
|
137
|
-
--workspace examples/enterprise \
|
|
138
|
-
--inventory examples/enterprise/security/inventory.json \
|
|
139
|
-
--output examples/enterprise/security/osv-advisories.json
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
After that, later CVE/GHSA checks can use the local file without calling OSV again:
|
|
143
|
-
|
|
144
|
-
```bash
|
|
145
|
-
relevant cve GHSA-example-id \
|
|
146
|
-
--workspace examples/enterprise \
|
|
147
|
-
--inventory examples/enterprise/security/inventory.json \
|
|
148
|
-
--advisories examples/enterprise/security/osv-advisories.json
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
## Status
|
|
152
|
-
|
|
153
|
-
This project is a **developer preview**. It is useful today for local experiments, demos, evidence collection, and early workflow design, but it is not a replacement for a vulnerability management platform, SIEM, SCA product, or incident response process.
|
|
154
|
-
|
|
155
|
-
What is ready:
|
|
156
|
-
|
|
157
|
-
- Deterministic local CVE relevance checks.
|
|
158
|
-
- Local IOC matching across plain and gzip logs.
|
|
159
|
-
- Service exposure inventory support.
|
|
160
|
-
- Reachability evidence from source-code symbol search.
|
|
161
|
-
- Explicit OSV advisory import.
|
|
162
|
-
- JSON, JSONL, Markdown, SARIF, and terminal output.
|
|
163
|
-
-
|
|
164
|
-
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
-
|
|
170
|
-
-
|
|
171
|
-
-
|
|
172
|
-
-
|
|
173
|
-
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
-
|
|
179
|
-
-
|
|
180
|
-
-
|
|
181
|
-
-
|
|
182
|
-
|
|
1
|
+
# relevant
|
|
2
|
+
|
|
3
|
+
[](https://github.com/MistanKh/relsec/actions/workflows/ci.yml)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+
[](package.json)
|
|
6
|
+
|
|
7
|
+
Local-first security relevance for CVEs, advisories, IOCs, dependencies, logs, and service exposure.
|
|
8
|
+
|
|
9
|
+
`relevant` helps answer the question most scanners leave to humans:
|
|
10
|
+
|
|
11
|
+
> Does this finding actually matter in this environment?
|
|
12
|
+
|
|
13
|
+
It is an open-source alpha for security engineers, AppSec teams, SOC analysts, platform teams, and curious builders who want evidence-first triage without sending code, logs, or inventories to a hosted service.
|
|
14
|
+
|
|
15
|
+
The package name is `relsec`, and the CLI is exposed as both `relevant` and `relsec`.
|
|
16
|
+
|
|
17
|
+
## The Problem
|
|
18
|
+
|
|
19
|
+
Modern teams receive security findings faster than they can investigate them:
|
|
20
|
+
|
|
21
|
+
- A scanner says a dependency is vulnerable.
|
|
22
|
+
- A vendor advisory says a package needs urgent patching.
|
|
23
|
+
- A threat feed publishes IPs, domains, hashes, or other indicators.
|
|
24
|
+
- A SOC alert references activity that may or may not exist in local logs.
|
|
25
|
+
- A spreadsheet says a service is internet-facing, but nobody is sure which repo owns it.
|
|
26
|
+
|
|
27
|
+
The hard part is not seeing the alert. The hard part is proving whether it matters in your environment.
|
|
28
|
+
|
|
29
|
+
For example, imagine a critical upload-library CVE lands during a release freeze. A scanner flags `multer` somewhere in your monorepo. Before waking up every service owner, you need answers:
|
|
30
|
+
|
|
31
|
+
- Which service actually has the vulnerable version?
|
|
32
|
+
- Is that service internet-facing or internal-only?
|
|
33
|
+
- Is the vulnerable upload API used in source code?
|
|
34
|
+
- What evidence can be pasted into a ticket?
|
|
35
|
+
- What should be done next?
|
|
36
|
+
|
|
37
|
+
`relevant` turns that into a local evidence-gathering workflow instead of a meeting.
|
|
38
|
+
|
|
39
|
+
## What This Tool Does
|
|
40
|
+
|
|
41
|
+
`relevant` reads local files and connects several pieces of security context:
|
|
42
|
+
|
|
43
|
+
| Input | What it uses it for |
|
|
44
|
+
| --- | --- |
|
|
45
|
+
| Dependency manifests | Finds vulnerable package versions in `package-lock.json`, `requirements.txt`, and SBOM files. |
|
|
46
|
+
| Advisory data | Maps CVEs, GHSA IDs, or imported OSV records to affected packages, ranges, and risky symbols. |
|
|
47
|
+
| Service inventory | Understands whether a service is internet-facing, partner-facing, internal, or unknown. |
|
|
48
|
+
| Source code | Searches for vulnerable symbols or APIs that make a package actually reachable. |
|
|
49
|
+
| Logs | Matches IOCs against local log files, including gzip-compressed logs. |
|
|
50
|
+
| Reports | Produces terminal, JSON, JSONL, Markdown, and SARIF output for humans and automation. |
|
|
51
|
+
|
|
52
|
+
It does not try to replace a scanner. It helps explain scanner output with local evidence.
|
|
53
|
+
|
|
54
|
+
## Real-World Examples
|
|
55
|
+
|
|
56
|
+
### Example 1: Triage A Dependency CVE
|
|
57
|
+
|
|
58
|
+
You receive a CVE for a vulnerable upload parser. Your scanner reports that `multer` exists somewhere in the repo.
|
|
59
|
+
|
|
60
|
+
Run:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
relevant cve CVE-2026-41001 \
|
|
64
|
+
--workspace examples/enterprise \
|
|
65
|
+
--inventory examples/enterprise/security/inventory.json \
|
|
66
|
+
--format markdown
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
`relevant` checks:
|
|
70
|
+
|
|
71
|
+
1. Is there a local advisory record for the CVE?
|
|
72
|
+
2. Which package and version range are affected?
|
|
73
|
+
3. Which services contain the vulnerable package version?
|
|
74
|
+
4. Are those services exposed?
|
|
75
|
+
5. Does source code reference vulnerable symbols such as `upload.single` or `multer(`?
|
|
76
|
+
|
|
77
|
+
Example result:
|
|
78
|
+
|
|
79
|
+
```txt
|
|
80
|
+
CVE-2026-41001: relevant (critical)
|
|
81
|
+
|
|
82
|
+
Evidence:
|
|
83
|
+
- Found multer 1.4.4 in services/checkout-api/package-lock.json.
|
|
84
|
+
- Reachable symbol upload.single in src/uploads.ts.
|
|
85
|
+
- checkout-api has public ingress: https://checkout.example.com/v1/receipts.
|
|
86
|
+
|
|
87
|
+
Recommended actions:
|
|
88
|
+
- Upgrade multer to >=1.4.5-lts.1.
|
|
89
|
+
- Restrict public upload endpoints until patched.
|
|
90
|
+
- Search access logs for unusual multipart upload paths.
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
That output gives AppSec, engineering, and incident response a shared artifact: vulnerable dependency, reachable code path, exposed service, and suggested next actions.
|
|
94
|
+
|
|
95
|
+
### Example 2: Check Whether Threat Indicators Appear In Logs
|
|
96
|
+
|
|
97
|
+
A threat report publishes suspicious IPs and domains. You want to know whether those indicators appear in local Okta, proxy, CloudTrail, or server logs.
|
|
98
|
+
|
|
99
|
+
Run:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
relevant ioc \
|
|
103
|
+
--indicators examples/enterprise/security/cisa-aa26-141a.iocs \
|
|
104
|
+
--logs examples/enterprise/security/logs/okta-auth-prod-2026-05-21.log \
|
|
105
|
+
--logs examples/enterprise/security/logs/zscaler-web-prod-2026-05-21.log \
|
|
106
|
+
--format json
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Example result:
|
|
110
|
+
|
|
111
|
+
```json
|
|
112
|
+
{
|
|
113
|
+
"totalMatches": 2,
|
|
114
|
+
"matches": [
|
|
115
|
+
{
|
|
116
|
+
"indicator": "203.0.113.77",
|
|
117
|
+
"type": "ip",
|
|
118
|
+
"line": 3
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"indicator": "evil-update.example",
|
|
122
|
+
"type": "domain",
|
|
123
|
+
"line": 1
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
That helps a SOC analyst quickly move from "this IOC exists in a feed" to "this IOC appears in these local files on these lines."
|
|
130
|
+
|
|
131
|
+
### Example 3: Build A Local Advisory File From OSV
|
|
132
|
+
|
|
133
|
+
When you want broader advisory coverage, import OSV records for dependencies found in your inventory:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
relevant import osv \
|
|
137
|
+
--workspace examples/enterprise \
|
|
138
|
+
--inventory examples/enterprise/security/inventory.json \
|
|
139
|
+
--output examples/enterprise/security/osv-advisories.json
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
After that, later CVE/GHSA checks can use the local file without calling OSV again:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
relevant cve GHSA-example-id \
|
|
146
|
+
--workspace examples/enterprise \
|
|
147
|
+
--inventory examples/enterprise/security/inventory.json \
|
|
148
|
+
--advisories examples/enterprise/security/osv-advisories.json
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Status
|
|
152
|
+
|
|
153
|
+
This project is a **developer preview**. It is useful today for local experiments, demos, evidence collection, and early workflow design, but it is not a replacement for a vulnerability management platform, SIEM, SCA product, or incident response process.
|
|
154
|
+
|
|
155
|
+
What is ready:
|
|
156
|
+
|
|
157
|
+
- Deterministic local CVE relevance checks.
|
|
158
|
+
- Local IOC matching across plain and gzip logs.
|
|
159
|
+
- Service exposure inventory support.
|
|
160
|
+
- Reachability evidence from source-code symbol search.
|
|
161
|
+
- Explicit OSV advisory import.
|
|
162
|
+
- JSON, JSONL, Markdown, SARIF, and terminal output.
|
|
163
|
+
- GitHub Action support for SARIF upload into GitHub code scanning.
|
|
164
|
+
- Interactive command shell with profiles, history, completions, modules, and exports.
|
|
165
|
+
- Cross-platform CI for Node 20 and 22 on Linux, macOS, and Windows.
|
|
166
|
+
|
|
167
|
+
What is still evolving:
|
|
168
|
+
|
|
169
|
+
- OSV multi-affected and multi-range normalization.
|
|
170
|
+
- NVD and CISA KEV import.
|
|
171
|
+
- Deeper SBOM support.
|
|
172
|
+
- Docker image and Kubernetes exposure analysis.
|
|
173
|
+
- Full YARA and Sigma engines.
|
|
174
|
+
- More precise reachability analysis.
|
|
175
|
+
|
|
176
|
+
## Design Goals
|
|
177
|
+
|
|
178
|
+
- Local-first by default.
|
|
179
|
+
- Evidence over opaque risk scores.
|
|
180
|
+
- Small enough to inspect.
|
|
181
|
+
- Useful in terminals, scripts, tickets, and CI jobs.
|
|
182
|
+
- Honest about uncertainty and limitations.
|
|
183
|
+
|
|
183
184
|
## Quick Start
|
|
184
185
|
|
|
185
186
|
Install from npm:
|
|
@@ -196,16 +197,16 @@ npm install
|
|
|
196
197
|
npm run build
|
|
197
198
|
node dist/cli.js cve CVE-2026-41001 --workspace examples/enterprise --inventory examples/enterprise/security/inventory.json --format markdown
|
|
198
199
|
```
|
|
199
|
-
|
|
200
|
-
Example output:
|
|
201
|
-
|
|
202
|
-
```txt
|
|
203
|
-
CVE-2026-41001: relevant (critical)
|
|
204
|
-
Multer multipart upload path traversal in file field handling: vulnerable package is reachable from an externally exposed service.
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
## Quick Command Examples
|
|
208
|
-
|
|
200
|
+
|
|
201
|
+
Example output:
|
|
202
|
+
|
|
203
|
+
```txt
|
|
204
|
+
CVE-2026-41001: relevant (critical)
|
|
205
|
+
Multer multipart upload path traversal in file field handling: vulnerable package is reachable from an externally exposed service.
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
## Quick Command Examples
|
|
209
|
+
|
|
209
210
|
Check whether a CVE matters locally:
|
|
210
211
|
|
|
211
212
|
```bash
|
|
@@ -213,8 +214,18 @@ npx relsec cve CVE-2026-41001 \
|
|
|
213
214
|
--workspace examples/enterprise \
|
|
214
215
|
--inventory examples/enterprise/security/inventory.json \
|
|
215
216
|
--format markdown
|
|
216
|
-
```
|
|
217
|
-
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
Write a SARIF file for GitHub code scanning:
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
npx relsec cve CVE-2026-41001 \
|
|
223
|
+
--workspace examples/enterprise \
|
|
224
|
+
--inventory examples/enterprise/security/inventory.json \
|
|
225
|
+
--format sarif \
|
|
226
|
+
--output relsec.sarif
|
|
227
|
+
```
|
|
228
|
+
|
|
218
229
|
Scan logs for indicators:
|
|
219
230
|
|
|
220
231
|
```bash
|
|
@@ -222,155 +233,195 @@ npx relsec ioc \
|
|
|
222
233
|
--indicators examples/enterprise/security/cisa-aa26-141a.iocs \
|
|
223
234
|
--logs examples/enterprise/security/logs/okta-auth-prod-2026-05-21.log \
|
|
224
235
|
--logs examples/enterprise/security/logs/zscaler-web-prod-2026-05-21.log \
|
|
225
|
-
--format json
|
|
226
|
-
```
|
|
227
|
-
|
|
236
|
+
--format json
|
|
237
|
+
```
|
|
238
|
+
|
|
228
239
|
Open the interactive console:
|
|
229
240
|
|
|
230
241
|
```bash
|
|
231
242
|
npx relsec
|
|
232
243
|
```
|
|
233
|
-
|
|
234
|
-
## Commands
|
|
235
|
-
|
|
236
|
-
```bash
|
|
237
|
-
relevant cve <CVE-ID> --workspace . --inventory security/inventory.json --format json
|
|
238
|
-
relevant ioc --indicators indicators.txt --logs auth.log --logs proxy.log --format json
|
|
239
|
-
relevant import osv --workspace . --inventory security/inventory.json --output security/osv-advisories.json
|
|
240
|
-
relevant advisories
|
|
241
|
-
relevant version
|
|
242
|
-
relevant
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
Output formats:
|
|
246
|
-
|
|
247
|
-
- `text`
|
|
248
|
-
- `json`
|
|
249
|
-
- `jsonl`
|
|
250
|
-
- `markdown`
|
|
251
|
-
- `sarif`
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
-
|
|
290
|
-
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
-
|
|
323
|
-
-
|
|
324
|
-
-
|
|
325
|
-
-
|
|
326
|
-
-
|
|
327
|
-
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
-
|
|
352
|
-
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
-
|
|
363
|
-
-
|
|
364
|
-
-
|
|
365
|
-
-
|
|
366
|
-
-
|
|
367
|
-
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
244
|
+
|
|
245
|
+
## Commands
|
|
246
|
+
|
|
247
|
+
```bash
|
|
248
|
+
relevant cve <CVE-ID> --workspace . --inventory security/inventory.json --format json
|
|
249
|
+
relevant ioc --indicators indicators.txt --logs auth.log --logs proxy.log --format json
|
|
250
|
+
relevant import osv --workspace . --inventory security/inventory.json --output security/osv-advisories.json
|
|
251
|
+
relevant advisories
|
|
252
|
+
relevant version
|
|
253
|
+
relevant
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
Output formats:
|
|
257
|
+
|
|
258
|
+
- `text`
|
|
259
|
+
- `json`
|
|
260
|
+
- `jsonl`
|
|
261
|
+
- `markdown`
|
|
262
|
+
- `sarif`
|
|
263
|
+
|
|
264
|
+
Use `--output <file>` with `relevant cve` to write reports directly to disk, which is especially useful for SARIF in CI.
|
|
265
|
+
|
|
266
|
+
## GitHub Action
|
|
267
|
+
|
|
268
|
+
Use the bundled GitHub Action to run a CVE relevance check in CI and upload the SARIF result to GitHub code scanning.
|
|
269
|
+
|
|
270
|
+
```yaml
|
|
271
|
+
name: relsec
|
|
272
|
+
|
|
273
|
+
on:
|
|
274
|
+
workflow_dispatch:
|
|
275
|
+
pull_request:
|
|
276
|
+
push:
|
|
277
|
+
branches: [main]
|
|
278
|
+
|
|
279
|
+
permissions:
|
|
280
|
+
contents: read
|
|
281
|
+
security-events: write
|
|
282
|
+
|
|
283
|
+
jobs:
|
|
284
|
+
relsec:
|
|
285
|
+
runs-on: ubuntu-latest
|
|
286
|
+
steps:
|
|
287
|
+
- uses: actions/checkout@v6
|
|
288
|
+
|
|
289
|
+
- uses: MistanKh/relsec@v0.1.2
|
|
290
|
+
with:
|
|
291
|
+
cve: CVE-2026-41001
|
|
292
|
+
workspace: .
|
|
293
|
+
inventory: security/inventory.json
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
The action writes `relsec.sarif` and uploads it with `github/codeql-action/upload-sarif`. If you only want the file and do not want to upload it, set:
|
|
297
|
+
|
|
298
|
+
```yaml
|
|
299
|
+
with:
|
|
300
|
+
cve: CVE-2026-41001
|
|
301
|
+
upload-sarif: "false"
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
## Interactive Console
|
|
305
|
+
|
|
306
|
+
Run `relevant` with no arguments to open a REPL-style command shell. It keeps session context, supports command history, profiles, named workspaces, path completion, and module-style workflows.
|
|
307
|
+
|
|
308
|
+
```txt
|
|
309
|
+
rel > set workspace examples/enterprise
|
|
310
|
+
rel > set inventory examples/enterprise/security/inventory.json
|
|
311
|
+
rel > scan CVE-2026-41001
|
|
312
|
+
rel > evidence
|
|
313
|
+
rel > actions
|
|
314
|
+
rel > export markdown finding.md
|
|
315
|
+
rel > set indicators examples/enterprise/security/cisa-aa26-141a.iocs
|
|
316
|
+
rel > ioc examples/enterprise/security/logs/okta-auth-prod-2026-05-21.log
|
|
317
|
+
rel > exit
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
Module workflow:
|
|
321
|
+
|
|
322
|
+
```txt
|
|
323
|
+
rel > use cve
|
|
324
|
+
rel(cve) > set cve CVE-2026-41001
|
|
325
|
+
rel(cve) > show options
|
|
326
|
+
rel(cve) > run
|
|
327
|
+
rel(cve) > back
|
|
328
|
+
rel > show modules
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
Available modules:
|
|
332
|
+
|
|
333
|
+
- `cve`: dependency CVE relevance
|
|
334
|
+
- `ioc`: IOC log matching
|
|
335
|
+
- `exposure`: externally exposed services
|
|
336
|
+
- `sbom`: dependency inventory
|
|
337
|
+
- `secrets`: obvious local secret patterns
|
|
338
|
+
- `cloudtrail`: CloudTrail triage heuristics
|
|
339
|
+
- `auth`: identity/auth log triage heuristics
|
|
340
|
+
- `yara`: simple YARA literal rules
|
|
341
|
+
- `sigma`: simple Sigma keyword rules
|
|
342
|
+
|
|
343
|
+
## Example Environment
|
|
344
|
+
|
|
345
|
+
`examples/enterprise` is a dummy environment for testing and demos:
|
|
346
|
+
|
|
347
|
+
- `checkout-api`: internet-facing Node service with vulnerable reachable `multer` upload usage.
|
|
348
|
+
- `ml-worker`: internal Python worker with a vulnerable package version but no vulnerable parser reachability.
|
|
349
|
+
- Okta, Zscaler, and AWS CloudTrail-style logs.
|
|
350
|
+
- CISA-style IOC list.
|
|
351
|
+
- Service exposure inventory.
|
|
352
|
+
|
|
353
|
+
No real customer data is included.
|
|
354
|
+
|
|
355
|
+
## Privacy Model
|
|
356
|
+
|
|
357
|
+
Normal scans are local-first:
|
|
358
|
+
|
|
359
|
+
- CVE analysis reads local manifests, inventories, source files, SBOMs, and advisory files.
|
|
360
|
+
- IOC analysis reads local logs directly.
|
|
361
|
+
- Reports are written locally.
|
|
362
|
+
- No telemetry is collected.
|
|
363
|
+
- No cloud API is used during normal scans.
|
|
364
|
+
|
|
365
|
+
The `import osv` command is the one intentional networked workflow. It sends discovered package names, ecosystems, and versions to the configured OSV API endpoint, then writes normalized advisory records to a local file for later offline use.
|
|
366
|
+
|
|
367
|
+
## Limitations
|
|
368
|
+
|
|
369
|
+
This is an alpha project with deliberate constraints:
|
|
370
|
+
|
|
371
|
+
- CVE relevance depends on advisory quality, manifest coverage, inventory accuracy, and symbol search.
|
|
372
|
+
- Reachability is currently evidence-oriented string matching, not full program analysis.
|
|
373
|
+
- OSV import does not yet preserve every multi-affected or multi-range advisory shape.
|
|
374
|
+
- YARA support handles literal string rules, not the full YARA language.
|
|
375
|
+
- Sigma support handles simple keyword-style rules, not a full Sigma backend.
|
|
376
|
+
- CloudTrail and auth modules are deterministic triage heuristics, not SIEM replacements.
|
|
377
|
+
- Secret detection is heuristic and should not replace dedicated secret scanning.
|
|
378
|
+
- Generated reports may contain sensitive local evidence.
|
|
379
|
+
|
|
380
|
+
## Development
|
|
381
|
+
|
|
382
|
+
```bash
|
|
383
|
+
npm install
|
|
384
|
+
npm run typecheck
|
|
385
|
+
npm test
|
|
386
|
+
npm run build
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
Full local release gate:
|
|
390
|
+
|
|
391
|
+
```bash
|
|
392
|
+
npm run release:check
|
|
393
|
+
npm run pack:dry-run
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
CI runs typecheck, tests, build, and package dry-run on Node 20 and 22 across Linux, macOS, and Windows.
|
|
397
|
+
|
|
398
|
+
## Contributing
|
|
399
|
+
|
|
400
|
+
Contributions are welcome. Good first areas:
|
|
401
|
+
|
|
402
|
+
- More fixture environments.
|
|
403
|
+
- Additional advisory import formats.
|
|
404
|
+
- Better SBOM parsing.
|
|
405
|
+
- More report templates.
|
|
406
|
+
- Safer scanner heuristics.
|
|
407
|
+
- Documentation and examples.
|
|
408
|
+
|
|
409
|
+
Please read [CONTRIBUTING.md](CONTRIBUTING.md) before opening a pull request.
|
|
410
|
+
|
|
411
|
+
## Roadmap
|
|
412
|
+
|
|
413
|
+
- Preserve OSV multi-affected and multi-range records.
|
|
414
|
+
- Add NVD and CISA KEV import.
|
|
415
|
+
- Expand CycloneDX and SPDX support.
|
|
416
|
+
- Add Docker image and Kubernetes manifest exposure analysis.
|
|
417
|
+
- Add GitHub and Jira export templates.
|
|
418
|
+
- Add optional local summarization through Ollama or LM Studio.
|
|
419
|
+
- Improve reachability analysis while keeping the tool local-first.
|
|
420
|
+
|
|
421
|
+
## Security
|
|
422
|
+
|
|
423
|
+
See [SECURITY.md](SECURITY.md) for the security model, network behavior, sensitive data guidance, and vulnerability reporting notes.
|
|
424
|
+
|
|
425
|
+
## License
|
|
426
|
+
|
|
427
|
+
MIT. See [LICENSE](LICENSE).
|