@eurekadevsecops/radar 1.8.4 → 1.9.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.
@@ -1,4 +1,4 @@
1
- name: Eureka Radar
1
+ name: Radar CLI
2
2
 
3
3
  on:
4
4
  workflow_dispatch:
@@ -8,9 +8,9 @@ on:
8
8
  - main
9
9
 
10
10
  jobs:
11
- radar_scan:
11
+ scan:
12
12
  # Radar scanner repo: https://github.com/EurekaDevSecOps/radarctl
13
- name: Radar Scan
13
+ name: Scan
14
14
  runs-on: ubuntu-latest
15
15
  steps:
16
16
  - name: Checkout repo
package/README.md CHANGED
@@ -1,64 +1,318 @@
1
- <pre>
2
- _
3
- _ __ __ _ __| | __ _ _ __
4
- | '__/ _` |/ _` |/ _` | '__|
5
- | | | (_| | (_| | (_| | |
6
- |_| \__,_|\__,_|\__,_|_|
7
- </pre>
1
+ <div align="center" style="text-align:center;">
8
2
 
9
- # Introduction
3
+ <p align="center">
4
+ <img src="assets/radar.png" alt="Eureka Radar Logo" width="320"/>
5
+ </p>
10
6
 
11
- radarctl is a command-line interface for Radar, an open-source orchestrator of security scanners. Radar is part of the Eureka DevSecOps platform.
7
+ # Radar CLI
8
+ ### One command. Complete AppSec coverage.
9
+
10
+ <!-- ![Build](https://github.com/eurekadevsecops/radarctl/actions/workflows/test.yml/badge.svg) -->
11
+ ![Node](https://img.shields.io/badge/Node.js-22.x-blue?logo=node.js)
12
+ ![npm version](https://img.shields.io/npm/v/@eurekadevsecops/radar?color=2b82f6&label=NPM)
13
+ ![License](https://img.shields.io/github/license/eurekadevsecops/radarctl?color=green)
14
+
15
+ </div>
16
+
17
+ ---
18
+
19
+ ## Overview
20
+
21
+ **Radar CLI** is a command-line tool that orchestrates multiple application security scanners — for code, dependencies, containers, and secrets — in one unified package. We've put a lot of effort into making Radar CLI easy to use for developers and easy to integrate into CI/CD pipelines. Check out our accompanying [GitHub Action for Radar CLI](https://github.com/EurekaDevSecOps/scan-action).
22
+
23
+ With Radar CLI, you can:
24
+ - Run **SAST**, **SCA**, **container**, and **secret scanning** locally or in CI/CD pipelines.
25
+ - Generate **unified SARIF reports** compatible with industry-standard security and vulnerability analysis tools.
26
+ - Optionally upload results to **Eureka ASPM** for centralized tracking, deduplication, and prioritization.
27
+
28
+ ---
29
+
30
+ Telemetry is **off by default** — nothing is uploaded unless you explicitly enable it.
31
+
32
+ ---
12
33
 
13
34
  ## Requirements
14
35
 
15
- - Node.js version 22.17.0 or higher
16
- - Docker
36
+ - **Node.js** 22.17.0 or higher
37
+ - **Docker** (for containerized scanners)
38
+
39
+ ---
17
40
 
18
41
  ## Installation
19
42
 
20
- Install the Radar CLI on the command-line using [NPM](https://npmjs.com):
43
+ Install globally using **npm**:
21
44
 
22
45
  ```bash
23
46
  npm i -g @eurekadevsecops/radar
47
+ ````
48
+
49
+ Verify the installation:
50
+
51
+ ```bash
52
+ radar --version
24
53
  ```
25
54
 
55
+ ---
56
+
26
57
  ## Getting Started
27
58
 
28
- Run the Radar CLI:
59
+ Run the CLI to view available commands:
29
60
 
30
61
  ```bash
31
62
  radar
32
63
  ```
33
64
 
34
- You will get a list of available commands:
35
- ```bash
36
- COMMANDS
37
- help display help
38
- scan scan for vulnerabilities
39
- scanners display available scanners
65
+ Example output:
66
+
67
+ ```
68
+ COMMANDS
69
+ help display help
70
+ scan scan for vulnerabilities
71
+ scanners display available scanners
40
72
  ```
41
73
 
42
- View help page for each command by using `help` on the command-line:
74
+ You can view help for any command:
43
75
 
44
76
  ```bash
45
- radar help
77
+ radar help scan
46
78
  ```
47
79
 
80
+ ---
81
+
48
82
  ## Running a Scan
49
83
 
50
- Run a scan on the source code in the current working directory:
84
+ To scan the current working directory:
51
85
 
52
86
  ```bash
53
87
  radar scan
54
88
  ```
55
89
 
56
- Refer to help for the `scan` command for more information.
90
+ You can also specify scanners to use:
57
91
 
58
92
  ```bash
59
- radar help scan
93
+ radar scan -s opengrep,gitleaks,grype
94
+ ```
95
+
96
+ Output a SARIF report:
97
+
98
+ ```bash
99
+ radar scan -s opengrep,gitleaks,grype -o report.sarif
100
+ ```
101
+
102
+ ---
103
+
104
+ ## Supported Scanners
105
+
106
+ | Category | Scanners | Description |
107
+ | ----------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------ |
108
+ | **SAST** | [Opengrep](https://github.com/opengrep/opengrep) | Detects insecure code patterns |
109
+ | **Secrets** | [Gitleaks](https://github.com/gitleaks/gitleaks) | Finds hardcoded credentials |
110
+ | **SCA** | [Grype](https://github.com/anchore/grype), [Dep-Scan](https://github.com/owasp-dep-scan/dep-scan), [Veracode SCA](https://www.veracode.com/products/software-composition-analysis/) | Detects vulnerable package dependencies |
111
+ | **Container** | [Grype](https://github.com/anchore/grype) | Scans Docker, OCI, and Singularity image formats |
112
+
113
+ All scanners in Radar are fully containerized for consistency and isolation. When you run a scan, Radar CLI automatically launches the corresponding scanner inside a Docker container. This ensures clean, reproducible results without needing to install each scanner locally. A working Docker Engine is required to run Radar scanners, and the container images for all supported scanners are publicly available on the GitHub Container Registry.
114
+
115
+ Veracode SCA (formerly SourceClear) scanner requires the SRCCLR_API_TOKEN environment variable. If not present or valid, scanning with Veracode SCA will not work. Read more about it in [Veracode SCA online documentation](https://docs.veracode.com/r/Veracode_SCA_Agent_Environment_Variables#srcclr_api_token).
116
+
117
+ ---
118
+
119
+ ### More on the `radar scan` command
120
+
121
+ ```bash
122
+ USAGE
123
+ radar scan [OPTIONS] [TARGET]
124
+ ```
125
+
126
+ Scans your source code and dependencies for vulnerabilities.
127
+ If no target is specified, the current working directory is scanned.
128
+
129
+ **OPTIONS**
130
+
131
+ | Option | Description |
132
+ | ------------------ | --------------------------------------------------------------------------------------------------- |
133
+ | `-c, --categories` | List of scanner categories (e.g. `sast`, `sca`, `secrets`). |
134
+ | `-s, --scanners` | Comma-separated list of scanners to run. Use `radar scanners` to list available ones. |
135
+ | `-o, --output` | Output findings into a SARIF file. |
136
+ | `-d, --debug` | Log detailed debug info to stdout. |
137
+ | `-q, --quiet` | Suppress stdout logging (except errors). |
138
+ | `-f, --format` | Output format for severity display: `security` (high/moderate/low) or `sarif` (error/warning/note). |
139
+ | `-e, --escalate` | Treat specified lower severities as high (e.g. `--escalate=moderate,low`). |
140
+
141
+ **PARAMETERS**
142
+
143
+ | Parameter | Description |
144
+ | --------- | ------------------------------------------------------- |
145
+ | `TARGET` | (Optional) Path to scan. Defaults to current directory. |
146
+
147
+ #### Category and Scanner Selection
148
+
149
+ * `--categories` lets you run all scanners in one or more categories.
150
+ Example: `--categories=sca,sast`
151
+ * `--scanners` lets you choose specific scanners by name.
152
+ Example: `--scanners=opengrep,depscan`
153
+ * Both can be combined — Radar CLI will run scanners that match *both* filters.
154
+
155
+ #### Severity Formats
156
+
157
+ | Format | Example Severities |
158
+ | ---------- | ---------------------- |
159
+ | `security` | high / moderate / low |
160
+ | `sarif` | error / warning / note |
161
+
162
+ You can also **escalate severities**:
163
+
164
+ ```bash
165
+ # Treat moderates and lows as highs
166
+ radar scan -e moderate,low
167
+ ```
168
+
169
+ Or:
170
+
171
+ ```bash
172
+ # Treat warnings and notes as errors
173
+ radar scan -f sarif -e warning,note
60
174
  ```
61
175
 
62
- ## Contributing guide
176
+ #### Exit Codes
177
+
178
+ An exit code of `0` means the scan passed with no issues. Any other code means the scan failed — either due to new vulnerabilities found or an error during the scanning process.
179
+
180
+ | Code | Meaning |
181
+ | ------- | --------------------------------------- |
182
+ | `0` | Clean and successful scan. |
183
+ | `1` | Invalid command, arguments, or options. |
184
+ | `8–15` | New vulnerabilities found. |
185
+ | `>=16` | Aborted due to unexpected error. |
186
+
187
+ #### Examples
188
+
189
+ Scan current directory:
190
+ ```bash
191
+ radar scan
192
+ ```
193
+
194
+ Scan a specific path:
195
+ ```bash
196
+ radar scan /my/repo/dir
197
+ ```
198
+
199
+ Save findings into a SARIF file:
200
+ ```bash
201
+ radar scan -o report.sarif
202
+ ```
203
+
204
+ Run only dependency and code scanners:
205
+ ```bash
206
+ radar scan -c sca,sast
207
+ ```
208
+
209
+ Run specific scanners:
210
+ ```bash
211
+ radar scan -s depscan,opengrep
212
+ ```
213
+
214
+ Enable debug logs:
215
+ ```bash
216
+ radar scan --debug
217
+ ```
218
+
219
+ Quiet mode (errors only):
220
+ ```bash
221
+ radar scan --quiet
222
+ ```
223
+
224
+ Display findings in SARIF-style severities:
225
+ ```bash
226
+ radar scan -f sarif
227
+ ```
228
+
229
+ Treat moderates and lows as highs:
230
+ ```bash
231
+ radar scan -e moderate,low
232
+ ```
233
+
234
+ ---
235
+
236
+ ## Example Workflows
237
+
238
+ ### Local Scan (no uploads)
239
+
240
+ Runs entirely on your machine — by default, Radar CLI doesn’t upload any findings. Your vulnerabilities stay local and private.
241
+
242
+ ```bash
243
+ radar scan -s opengrep,gitleaks,grype -o report.sarif
244
+ ```
245
+
246
+ ### Upload Findings to Eureka ASPM
247
+
248
+ See all findings in one place with deduplication, trend tracking, and risk prioritization. To upload results to **Eureka ASPM**, provide your API credentials via two environment variables: `EUREKA_AGENT_TOKEN` (your API token) and `EUREKA_PROFILE` (your profile ID). When these are set, Radar CLI automatically uploads results after each scan — letting you view your full scan history and all findings in the **Eureka ASPM Dashboard**.
249
+
250
+ ```bash
251
+ export EUREKA_AGENT_TOKEN=<your token>
252
+ export EUREKA_PROFILE=<your profile ID>
253
+
254
+ radar scan -s opengrep,gitleaks,grype
255
+ ```
256
+
257
+ ---
258
+
259
+ ## Why Upload Findings to Eureka ASPM?
260
+
261
+ **Eureka ASPM** extends Radar CLI with powerful visibility and collaboration features:
262
+
263
+ * **Single Source of Truth:** Aggregate findings from all scanners and repos in one place.
264
+ * **Less Noise, More Signal:** Automatically de-duplicate findings and prioritize risks contextually.
265
+ * **Faster Fixes:** See ownership, severity, and remediation guidance for each issue.
266
+ * **Track Progress:** View how your project’s security posture improves over time.
267
+ * **Free for Open Source:** Open source projects get full access at no cost.
268
+
269
+ **Sign up for a free account at [eurekadevsecops.com](https://eurekadevsecops.com)**
270
+
271
+ ---
272
+
273
+ ## Telemetry & Privacy
274
+
275
+ Telemetry is **off by default**.
276
+ Radar does **not** send any data externally unless you explicitly provide:
277
+
278
+ * `EUREKA_AGENT_TOKEN`
279
+ * `EUREKA_PROFILE`
280
+
281
+ When provided:
282
+
283
+ * Findings are securely uploaded to **Eureka ASPM**
284
+ * You gain **dashboards, trend analysis, and contextual prioritization**
285
+
286
+ When omitted:
287
+
288
+ * Scans remain **fully local**
289
+
290
+ ---
291
+
292
+ ## 🧰 Troubleshooting
293
+
294
+ | Issue | Cause | Solution |
295
+ | --------------------------------------------- | ----------------------------------- | --------------------------------------------------------- |
296
+ | ❌ `report.sarif` not found | Scan failed or invalid scanner list | Check scanner names and ensure Docker is running |
297
+ | ⚠️ No findings uploaded | Missing or invalid token/profile | Set `EUREKA_AGENT_TOKEN` and `EUREKA_PROFILE` |
298
+ | 🧱 `radar: command not found` | CLI not installed globally | Run `npm i -g @eurekadevsecops/radar` again |
299
+
300
+ ---
301
+
302
+ ## Contributing
303
+
304
+ Contributions are welcome!
305
+ See our [CONTRIBUTING.md](./CONTRIBUTING.md) for setup and development guidelines.
306
+
307
+ ---
308
+
309
+ ## License
310
+
311
+ Radar CLI is licensed under the terms of the **GPL v3 License** — © Eureka DevSecOps Inc.
312
+
313
+ ---
314
+
315
+ ## Support
63
316
 
64
- See [CONTRIBUTING.md](./CONTRIBUTING.md)
317
+ * Issues & feature requests: [GitHub Issues](https://github.com/eurekadevsecops/radarctl/issues)
318
+ * Security: [security@eurekadevsecops.com](mailto:security@eurekadevsecops.com)
Binary file
Binary file
@@ -0,0 +1,27 @@
1
+ # Run Radar CLI scan via Azure Pipelines
2
+
3
+ trigger:
4
+ - main
5
+
6
+ pool:
7
+ vmImage: ubuntu-latest
8
+
9
+ steps:
10
+ - task: NodeTool@0
11
+ inputs:
12
+ versionSpec: '22.x'
13
+ displayName: 'Install Node.js'
14
+
15
+ - script: npm i -g @eurekadevsecops/radar
16
+ displayName: Install Radar CLI
17
+
18
+ - script: radar && radar scanners
19
+ displayName: Verify Radar install
20
+
21
+ - script: radar scan -s gitleaks,grype,opengrep,veracode-sca
22
+ displayName: Run Radar scan
23
+ env:
24
+ EUREKA_AGENT_TOKEN: $(EUREKA_AGENT_TOKEN)
25
+ SRCCLR_API_TOKEN: $(SRCCLR_API_TOKEN)
26
+ VERACODE_API_KEY_ID: $(VERACODE_API_KEY_ID)
27
+ VERACODE_API_KEY_SECRET: $(VERACODE_API_KEY_SECRET)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eurekadevsecops/radar",
3
- "version": "1.8.4",
3
+ "version": "1.9.0",
4
4
  "description": "Radar is an open-source orchestrator of security scanners.",
5
5
  "homepage": "https://www.eurekadevsecops.com/radar",
6
6
  "keywords": [
@@ -0,0 +1,5 @@
1
+ name = "veracode-sca"
2
+ title = "Veracode SCA"
3
+ description = "Finds known vulnerabilities in dependencies. Requires SRCCLR_API_TOKEN."
4
+ categories = [ "SCA" ]
5
+ cmd = "${assets}/run.sh ${target} ${assets} ${output}"
@@ -0,0 +1,21 @@
1
+ #!/bin/bash
2
+
3
+ set -e
4
+
5
+ # Parameters:
6
+ # $1 - Path to the source code folder that should be scanned
7
+ # $2 - Path to the assets folder
8
+ # $3 - Path to the output folder where scan results should be stored
9
+ ###
10
+
11
+ # Expand relative paths
12
+ APP_DIR=$(cd $1; pwd)
13
+ CFG_DIR=$(cd $2; pwd)
14
+ OUT_DIR=$(cd $3; pwd)
15
+
16
+ docker run --rm \
17
+ -v "${APP_DIR}":/home/luser/app \
18
+ -v "${CFG_DIR}":/tmp/radar-input \
19
+ -v "${OUT_DIR}":/tmp/radar-output \
20
+ -e SRCCLR_API_TOKEN=${SRCCLR_API_TOKEN} \
21
+ ghcr.io/eurekadevsecops/radar-veracode-sca 2>&1
@@ -0,0 +1,24 @@
1
+ {
2
+ "version": "2.1.0",
3
+ "$schema": "https://json.schemastore.org/sarif-2.1.0.json",
4
+ "runs": [
5
+ {
6
+ "tool": {
7
+ "driver": {
8
+ "name": "veracode-sca",
9
+ "properties": {
10
+ "officialName": "Veracode SCA (Eureka json2sarif Converter)"
11
+ },
12
+ "rules": []
13
+ }
14
+ },
15
+ "results": [],
16
+ "properties": {
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "https://github.com/EurekaDevSecOps/app.git"
20
+ }
21
+ }
22
+ }
23
+ ]
24
+ }