@eurekadevsecops/radar 1.9.0 → 1.9.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/README.md CHANGED
@@ -103,15 +103,25 @@ radar scan -s opengrep,gitleaks,grype -o report.sarif
103
103
 
104
104
  ## Supported Scanners
105
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
106
  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
107
 
108
+ | By Scanner | Categories | Description |
109
+ | --------------------------------------------------------------------------------- | ---------------------- | ----------- |
110
+ | [Dep-Scan](https://github.com/owasp-dep-scan/dep-scan) | **SCA** | OWASP dep-scan is a next-generation security and risk audit tool based on known vulnerabilities, advisories, and license limitations for project dependencies. Scan most application code - local repos, Linux container images, Kubernetes manifests, and OS - to identify known CVEs with prioritization. |
111
+ | [Gitleaks](https://github.com/gitleaks/gitleaks) | **Secrets** | Gitleaks is a tool for detecting secrets like passwords, API keys, and tokens. |
112
+ | [Grype](https://github.com/anchore/grype) | **SCA**, **Container** | Scans the contents of a container image or filesystem to find known vulnerabilities. Find vulnerabilities for language-specific packages and major operating system packages. Supports Docker, OCI and Singularity image formats. |
113
+ | [Opengrep](https://github.com/opengrep/opengrep) | **SAST** | Opengrep is an ultra-fast static code analysis engine to find security issues in code. Opengrep supports 30+ languages. |
114
+ | [Veracode SCA](https://www.veracode.com/products/software-composition-analysis/) | **SCA** | Effectively identify open-source risks with unmatched precision, ensuring secure and compliant code. Leverages a proprietary database to accurately and promptly detect new vulnerabilities. |
115
+
116
+ Scanners grouped by category:
117
+
118
+ | By Category | Description | Scanners |
119
+ | ----------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------- |
120
+ | **SAST** | Detects insecure code patterns | [Opengrep](https://github.com/opengrep/opengrep) |
121
+ | **Secrets** | Finds hardcoded credentials | [Gitleaks](https://github.com/gitleaks/gitleaks) |
122
+ | **SCA** | Detects vulnerable package dependencies | [Veracode SCA](https://www.veracode.com/products/software-composition-analysis/), [Grype](https://github.com/anchore/grype), [Dep-Scan](https://github.com/owasp-dep-scan/dep-scan) |
123
+ | **Container** | Scans Docker, OCI, and Singularity image formats | [Grype](https://github.com/anchore/grype) |
124
+
115
125
  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
126
 
117
127
  ---
@@ -137,6 +147,7 @@ If no target is specified, the current working directory is scanned.
137
147
  | `-q, --quiet` | Suppress stdout logging (except errors). |
138
148
  | `-f, --format` | Output format for severity display: `security` (high/moderate/low) or `sarif` (error/warning/note). |
139
149
  | `-e, --escalate` | Treat specified lower severities as high (e.g. `--escalate=moderate,low`). |
150
+ | `-l, --local` | Run a local scan (don't upload scan findings to Eureka). |
140
151
 
141
152
  **PARAMETERS**
142
153
 
@@ -254,6 +265,8 @@ export EUREKA_PROFILE=<your profile ID>
254
265
  radar scan -s opengrep,gitleaks,grype
255
266
  ```
256
267
 
268
+ NOTE: To prevent Radar CLI from uploading scan findings even when you have `EUREKA_AGENT_TOKEN` and `EUREKA_PROFILE` set, you can pass the `-l/--local` option on the command line.
269
+
257
270
  ---
258
271
 
259
272
  ## Why Upload Findings to Eureka ASPM?
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eurekadevsecops/radar",
3
- "version": "1.9.0",
3
+ "version": "1.9.2",
4
4
  "description": "Radar is an open-source orchestrator of security scanners.",
5
5
  "homepage": "https://www.eurekadevsecops.com/radar",
6
6
  "keywords": [
@@ -20,6 +20,7 @@ module.exports = {
20
20
  { name: 'DEBUG', short: 'd', long: 'debug', type: 'boolean', description: 'log detailed debug info to stdout' },
21
21
  { name: 'ESCALATE', short: 'e', long: 'escalate', type: 'string', description: 'severities to treat as high/error' },
22
22
  { name: 'FORMAT', short: 'f', long: 'format', type: 'string', description: 'severity format' },
23
+ { name: 'LOCAL', short: 'l', long: 'local', type: 'boolean', description: 'local scan (no upload of findings to Eureka)' },
23
24
  { name: 'OUTPUT', short: 'o', long: 'output', type: 'string', description: 'output SARIF file' },
24
25
  { name: 'QUIET', short: 'q', long: 'quiet', type: 'boolean', description: 'suppress stdout logging' },
25
26
  { name: 'SCANNERS', short: 's', long: 'scanners', type: 'string', description: 'list of scanners to use' }
@@ -60,6 +61,15 @@ module.exports = {
60
61
  'security' severity format. Findings can also be displayed as errors, warnings,
61
62
  and notes. This is the 'sarif' severity format.
62
63
 
64
+ Runs entirely on your machine — by default, Radar CLI doesn’t upload any findings.
65
+ Your vulnerabilities stay local and private. To upload results to Eureka ASPM,
66
+ provide your API credentials via two environment variables: 'EUREKA_AGENT_TOKEN'
67
+ (your API token) and 'EUREKA_PROFILE' (your profile ID). When these are set, Radar CLI
68
+ automatically uploads results after each scan — letting you view your full scan
69
+ history and all findings in the Eureka ASPM Dashboard. To prevent Radar CLI from
70
+ uploading scan findings even when you have 'EUREKA_AGENT_TOKEN' and 'EUREKA_PROFILE'
71
+ set, you can pass the LOCAL option on the command line.
72
+
63
73
  Exit codes:
64
74
  0 - Clean and successful scan. No errors, warnings, or notes.
65
75
  1 - Bad command, arguments, or options. Scan not completed.
@@ -76,6 +86,7 @@ module.exports = {
76
86
  examples: [
77
87
  '$ radar scan ' + '(scan current working directory)'.grey,
78
88
  '$ radar scan . ' + '(scan current working directory)'.grey,
89
+ '$ radar scan --local ' + '(run a local scan / no uploads to Eureka)'.grey,
79
90
  '$ radar scan -d' + '(turn debug mode on)'.grey,
80
91
  '$ radar scan --debug' + '(turn debug mode on)'.grey,
81
92
  '$ radar scan /my/repo/dir ' + '(scan target directory)'.grey,
@@ -144,9 +155,13 @@ module.exports = {
144
155
  if (!categories.length) throw new Error(`CATEGORIES must be one or more of '${availableCategories.join("', '")}', or 'all'`)
145
156
  if (!scanners.length) throw new Error('No available scanners selected.')
146
157
 
158
+ if (!telemetry.enabled || args.LOCAL) {
159
+ log(`INFO: Running a local scan.\n`)
160
+ }
161
+
147
162
  // Send telemetry: scan started.
148
163
  let scanID = undefined
149
- if (telemetry.enabled) {
164
+ if (telemetry.enabled && !args.LOCAL) {
150
165
  // TODO: Should pass scanID to the server; not read it from the server.
151
166
  try {
152
167
  const res = await telemetry.send(`scans/started`, {}, { scanners: scanners.map((s) => s.name) })
@@ -169,7 +184,7 @@ module.exports = {
169
184
  // Send telemetry: git metadata.
170
185
  const metadata = git.metadata(target)
171
186
  if (metadata.type === 'error') throw new Error(`${metadata.error.code}: ${metadata.error.details}`)
172
- if (telemetry.enabled && scanID) {
187
+ if (telemetry.enabled && scanID && !args.LOCAL) {
173
188
  let res = await telemetry.send(`scans/:scanID/metadata`, { scanID }, { metadata })
174
189
  if (!res.ok) log(`WARNING: Scan metadata (stage 1) telemetry upload failed: [${res.status}] ${res.statusText}: ${await res.text()}`)
175
190
  res = await telemetry.sendSensitive(`scans/:scanID/metadata`, { scanID }, { metadata })
@@ -186,7 +201,7 @@ module.exports = {
186
201
  catch (error) {
187
202
  log(`\n${error}`)
188
203
  if (!args.QUIET) log('Scan NOT completed!')
189
- if (telemetry.enabled) {
204
+ if (telemetry.enabled && scanID && !args.LOCAL) {
190
205
  const res = await telemetry.send(`scans/:scanID/failed`, { scanID })
191
206
  if (!res.ok) log(`WARNING: Scan status (not completed) telemetry upload failed: [${res.status}] ${res.statusText}: ${await res.text()}`)
192
207
  }
@@ -202,14 +217,14 @@ module.exports = {
202
217
  if (outfile) fs.writeFileSync(outfile, JSON.stringify(results.sarif, null, 2))
203
218
 
204
219
  // Send telemetry: scan results.
205
- if (telemetry.enabled && scanID) {
220
+ if (telemetry.enabled && scanID && !args.LOCAL) {
206
221
  const res = await telemetry.sendSensitive(`scans/:scanID/results`, { scanID }, { findings: results.sarif, log: results.log })
207
222
  if (!res.ok) log(`WARNING: Scan results telemetry upload failed: [${res.status}] ${res.statusText}: ${await res.text()}`)
208
223
  }
209
224
 
210
225
  // Analyze scan results: group findings by severity level.
211
226
  let summary
212
- if (telemetry.enabled && scanID) {
227
+ if (telemetry.enabled && scanID && !args.LOCAL) {
213
228
  const analysis = await telemetry.receiveSensitive(`scans/:scanID/summary`, { scanID })
214
229
  if (!analysis?.findingsBySeverity) throw new Error(`Failed to retrieve analysis summary for scan '${scanID}'`)
215
230
  summary = analysis.findingsBySeverity
@@ -218,7 +233,7 @@ module.exports = {
218
233
  }
219
234
 
220
235
  // Send telemetry: scan summary.
221
- if (telemetry.enabled && scanID) {
236
+ if (telemetry.enabled && scanID && !args.LOCAL) {
222
237
  const res = await telemetry.send(`scans/:scanID/completed`, { scanID }, summary)
223
238
  if (!res.ok) log(`WARNING: Scan status (completed) telemetry upload failed: [${res.status}] ${res.statusText}: ${await res.text()}`)
224
239
  }
@@ -228,7 +243,7 @@ module.exports = {
228
243
  log()
229
244
  SARIF.visualizations.display_findings(summary, args.FORMAT, log)
230
245
  if (outfile) log(`Findings exported to ${outfile}`)
231
- SARIF.visualizations.display_totals(summary, args.FORMAT, log, telemetry.enabled && scanID)
246
+ SARIF.visualizations.display_totals(summary, args.FORMAT, log, telemetry.enabled && scanID && !args.LOCAL)
232
247
  }
233
248
 
234
249
  // Determine the correct exit code.
@@ -1,24 +0,0 @@
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
- }