@eurekadevsecops/radar 1.7.1 → 1.8.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eurekadevsecops/radar",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "Radar is an open-source orchestrator of security scanners.",
|
|
5
5
|
"homepage": "https://www.eurekadevsecops.com/radar",
|
|
6
6
|
"keywords": [
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"url": "https://github.com/EurekaDevSecOps/radarctl.git"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@persistr/clif": "^1.11.
|
|
30
|
+
"@persistr/clif": "^1.11.1",
|
|
31
31
|
"@persistr/clif-plugin-settings": "^2.3.1",
|
|
32
32
|
"hosted-git-info": "^9.0.0",
|
|
33
33
|
"humanize-duration": "^3.33.0",
|
package/scan.sarif
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":"2.1.0","$schema":"https://json.schemastore.org/sarif-2.1.0.json","runs":[{"tool":{"driver":{"name":"abcgitleaks","semanticVersion":"v8.0.0","informationUri":"https://github.com/gitleaks/gitleaks","properties":{"officialName":"gitleaks"},"rules":[]}},"results":[],"originalUriBaseIds":{"SOURCE":{"uri":"https://github.com/EurekaDevSecOps/radarctl.git","description":{"text":"Source origin for the target being scanned (ie. git repo URL)."}},"TARGET":{"uri":"","uriBaseId":"SOURCE","description":{"text":"Scan target (subfolder) within the source repo or folder."}}}},{"tool":{"driver":{"name":"abcgrype","informationUri":"https://github.com/anchore/grype","properties":{"officialName":"grype"},"rules":[{"id":"GHSA-pfrx-2q88-qq97-got","name":"JavascriptMatcherExactDirectMatch","shortDescription":{"text":"GHSA-pfrx-2q88-qq97 medium vulnerability for got package"},"fullDescription":{"text":"Got allows a redirect to a UNIX socket"},"helpUri":"https://github.com/anchore/grype","help":{"text":"Vulnerability GHSA-pfrx-2q88-qq97\nSeverity: medium\nPackage: got\nVersion: 9.6.0\nFix Version: 11.8.5\nType: npm\nLocation: /package-lock.json\nData Namespace: github:language:javascript\nLink: [GHSA-pfrx-2q88-qq97](https://github.com/advisories/GHSA-pfrx-2q88-qq97)","markdown":"**Vulnerability GHSA-pfrx-2q88-qq97**\n| Severity | Package | Version | Fix Version | Type | Location | Data Namespace | Link |\n| --- | --- | --- | --- | --- | --- | --- | --- |\n| medium | got | 9.6.0 | 11.8.5 | npm | /package-lock.json | github:language:javascript | [GHSA-pfrx-2q88-qq97](https://github.com/advisories/GHSA-pfrx-2q88-qq97) |\n"},"properties":{"purls":["pkg:npm/got@9.6.0"],"security-severity":"5.3"}}]}},"results":[{"ruleId":"GHSA-pfrx-2q88-qq97-got","level":"warning","message":{"text":"A medium vulnerability in npm package: got, version 9.6.0 was found at: package-lock.json"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"package-lock.json"},"region":{"startLine":1,"startColumn":1,"endLine":1,"endColumn":1}}}],"partialFingerprints":{"primaryLocationLineHash":"677706e2c84cd6dfb855b123e8a34db12a8f4eeb5df5b8ab253aa5299b80da0b:1"}}],"originalUriBaseIds":{"SOURCE":{"uri":"https://github.com/EurekaDevSecOps/radarctl.git","description":{"text":"Source origin for the target being scanned (ie. git repo URL)."}},"TARGET":{"uri":"","uriBaseId":"SOURCE","description":{"text":"Scan target (subfolder) within the source repo or folder."}}}},{"tool":{"driver":{"name":"abcopengrep","semanticVersion":"1.5.0","properties":{"officialName":"Opengrep OSS"},"rules":[]}},"invocations":[{"executionSuccessful":true,"toolExecutionNotifications":[]}],"results":[],"originalUriBaseIds":{"SOURCE":{"uri":"https://github.com/EurekaDevSecOps/radarctl.git","description":{"text":"Source origin for the target being scanned (ie. git repo URL)."}},"TARGET":{"uri":"","uriBaseId":"SOURCE","description":{"text":"Scan target (subfolder) within the source repo or folder."}}}}]}
|
package/src/commands/import.js
CHANGED
|
@@ -83,18 +83,6 @@ module.exports = {
|
|
|
83
83
|
scanners.push(scanner)
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
// Check for unsupported scanners.
|
|
87
|
-
try {
|
|
88
|
-
const unknownScanners = scanners.filter(name => !availableScanners.find(s => s.name === name))
|
|
89
|
-
if (unknownScanners.length > 1) throw new Error(`Unknown scanners: ${unknownScanners.join(', ')}`)
|
|
90
|
-
else if (unknownScanners.length === 1) throw new Error(`Unknown scanner: ${unknownScanners[0]}`)
|
|
91
|
-
}
|
|
92
|
-
catch (error) {
|
|
93
|
-
log(`ERROR: ${error.message}`)
|
|
94
|
-
log(`Terminating with exit code 1. See 'radar help import' for list of possible exit codes.`)
|
|
95
|
-
return 0x1 // exit code
|
|
96
|
-
}
|
|
97
|
-
|
|
98
86
|
// Send telemetry: scan started.
|
|
99
87
|
let scanID = undefined
|
|
100
88
|
// TODO: Should pass scanID to the server; not read it from the server.
|
package/src/commands/scan.js
CHANGED
|
@@ -33,7 +33,8 @@ module.exports = {
|
|
|
33
33
|
a file on disk.
|
|
34
34
|
|
|
35
35
|
Select which scanners to use with the SCANNERS and CATEGORIES options. If
|
|
36
|
-
neither option is specified, all scanners are run.
|
|
36
|
+
neither option is specified, all default scanners are run. You can see which
|
|
37
|
+
scanners are marked as defaults with the 'radar scanners' command.
|
|
37
38
|
|
|
38
39
|
If you want to run all scanners of a certain type, such as SAST, SCA, or DAST,
|
|
39
40
|
use the CATEGORIES option. All scanners are classified into categories and
|
|
@@ -46,7 +47,7 @@ module.exports = {
|
|
|
46
47
|
specific list of scanners, comma-separated, in the SCANNERS option. Scanner
|
|
47
48
|
names passed into the SCANNERS option should match the scanner names returned
|
|
48
49
|
by the "scanners" command. To select all scanners across selected categories,
|
|
49
|
-
use the value 'all' for SCANNERS.
|
|
50
|
+
use the value 'all' for SCANNERS.
|
|
50
51
|
|
|
51
52
|
You can specify both SCANNERS and CATEGORIES at the same time. This will run
|
|
52
53
|
only those scanners that match both options. For example, if you specify the
|
|
@@ -93,7 +94,7 @@ module.exports = {
|
|
|
93
94
|
args.TARGET ??= process.cwd()
|
|
94
95
|
args.FORMAT ??= 'security'
|
|
95
96
|
args.CATEGORIES ??= 'all'
|
|
96
|
-
args.SCANNERS ??= '
|
|
97
|
+
args.SCANNERS ??= ''
|
|
97
98
|
|
|
98
99
|
// Normalize and/or rewrite args and options.
|
|
99
100
|
args.TARGET = path.resolve(path.normalize(args.TARGET))
|
|
@@ -108,6 +109,9 @@ module.exports = {
|
|
|
108
109
|
if (unknownScanners.length > 1) throw new Error(`Unknown scanners: ${unknownScanners.join(', ')}`)
|
|
109
110
|
else if (unknownScanners.length === 1) throw new Error(`Unknown scanner: ${unknownScanners[0]}`)
|
|
110
111
|
}
|
|
112
|
+
else {
|
|
113
|
+
args.SCANNERS = availableScanners.filter(s => s.default).map(s => s.name).join(',')
|
|
114
|
+
}
|
|
111
115
|
if (args.ESCALATE) args.ESCALATE.split(',').map(severity => {
|
|
112
116
|
if (args.FORMAT === 'security' && severity !== 'moderate' && severity !== 'low') throw new Error(`Severity to escalate must be 'moderate' or 'low'`)
|
|
113
117
|
if (args.FORMAT === 'sarif' && severity !== 'warning' && severity !== 'note') throw new Error(`Severity to escalate must be 'warning' or 'note'`)
|
package/src/commands/scanners.js
CHANGED
|
@@ -9,7 +9,7 @@ module.exports = {
|
|
|
9
9
|
run: async (toolbox, args) => {
|
|
10
10
|
const { log, scanners } = toolbox
|
|
11
11
|
for (const scanner of scanners) {
|
|
12
|
-
log(`${scanner.name}: ${scanner.title} [${scanner.categories.join()}] - ${scanner.description}`)
|
|
12
|
+
log(`${scanner.name}: ${scanner.title} [${scanner.categories.join()}] - ${scanner.default ? '(default) ' : ''}${scanner.description}`)
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
}
|