@eurekadevsecops/radar 1.9.8 → 1.11.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,3 +1,3 @@
1
1
  {
2
- ".": "1.9.8"
2
+ ".": "1.11.0"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.11.0](https://github.com/EurekaDevSecOps/radarctl/compare/v1.10.0...v1.11.0) (2026-02-27)
4
+
5
+
6
+ ### Improvements
7
+
8
+ * Add support for Veracode Pipeline (SAST) scanner ([#2](https://github.com/EurekaDevSecOps/radarctl/issues/2)) ([bf7f04b](https://github.com/EurekaDevSecOps/radarctl/commit/bf7f04b4fd8bfc5fd3e13b25365809209db80cec))
9
+
10
+ ## [1.10.0](https://github.com/EurekaDevSecOps/radarctl/compare/v1.9.8...v1.10.0) (2026-02-25)
11
+
12
+
13
+ ### Improvements
14
+
15
+ * **PE-961:** Job path from Managed Scan runner being included in vulnerability results ([#63](https://github.com/EurekaDevSecOps/radarctl/issues/63)) ([f014598](https://github.com/EurekaDevSecOps/radarctl/commit/f0145985152b4d5cb5af7d10de7981777ce40ce4))
16
+
3
17
  ## [1.9.8](https://github.com/EurekaDevSecOps/radarctl/compare/v1.9.7...v1.9.8) (2026-02-19)
4
18
 
5
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eurekadevsecops/radar",
3
- "version": "1.9.8",
3
+ "version": "1.11.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-pipeline"
2
+ title = "Veracode Pipeline"
3
+ description = "Identify application security findings in source code. Requires Veracode API key."
4
+ categories = [ "SAST" ]
5
+ cmd = "${assets}/run.sh ${target} ${assets} ${output}"
@@ -0,0 +1,56 @@
1
+ #!/bin/bash
2
+
3
+ # Parameters:
4
+ # $1 - Path to the source code folder that should be scanned
5
+ # $2 - Path to the assets folder
6
+ # $3 - Path to the output folder where scan results should be stored
7
+
8
+ # Requirements:
9
+ #
10
+ # Environment variables VERACODE_API_KEY_ID and VERACODE_API_KEY_SECRET must be set:
11
+ # [Veracode Platform](https://docs.veracode.com/r/c_api_credentials3#generate-api-credentials).
12
+ #
13
+ # EXAMPLE:
14
+ # $ VERACODE_API_KEY_ID=123456789 VERACODE_API_KEY_SECRET=a1b2c3d4e5f6 radar scan /path/to/repo
15
+ #
16
+ # Optional:
17
+ #
18
+ # (A) The repo has already been packaged for Veracode as per https://docs.veracode.com/r/compilation_packaging
19
+ # and stored into a ZIP file somewhere within the repo. Set the environment variable VERACODE_ZIPFILE to the
20
+ # path/to/repo/veracode-package.zip file, relative to the root folder of the repo.
21
+ #
22
+ # -or-
23
+ #
24
+ # (B) Set the environment variable VERACODE_PACKAGE_CMD to the command that can create the Veracode package ZIP.
25
+ # We will run the command from the root of the repo. It should create veracode-package.zip and save it into
26
+ # the root folder of the repo. We will and submit this ZIP to Veracode Pipeline for a scan.
27
+ #
28
+ # Examples:
29
+ # export VERACODE_PACKAGE_CMD="zip -qr veracode-package.zip lib"
30
+ # export VERACODE_PACKAGE_CMD="npm run build && zip -qr veracode-package.zip dist"
31
+ # export VERACODE_PACKAGE_CMD="make && zip -qr veracode-package.zip out"
32
+ #
33
+ # -or-
34
+ #
35
+ # (C) Your project does not need a build step. Omit both VERACODE_ZIPFILE and VERACODE_PACKAGE_CMD. We will
36
+ # automatically ZIP up the repo, excluding any files referenced in .gitignore, and submit to Veracode Pipeline
37
+ # for a scan. This is the default action if you don't set VERACODE_ZIPFILE and VERACODE_PACKAGE_CMD.
38
+ # This is appropriate for interpreted languages (Javascript, Python, etc) that don't need to be compiled.
39
+
40
+ set -e
41
+
42
+ # Expand relative paths
43
+ APP_DIR=$(cd $1; pwd)
44
+ CFG_DIR=$(cd $2; pwd)
45
+ OUT_DIR=$(cd $3; pwd)
46
+
47
+ # Veracode Pipeline only supports linux/amd64.
48
+ docker run --platform linux/amd64 --rm \
49
+ -v "${APP_DIR}":/opt/eureka/radar/temp/repo \
50
+ -v "${CFG_DIR}":/opt/eureka/radar/temp/input \
51
+ -v "${OUT_DIR}":/opt/eureka/radar/temp/output \
52
+ -e VERACODE_API_KEY_ID="${VERACODE_API_KEY_ID}" \
53
+ -e VERACODE_API_KEY_SECRET="${VERACODE_API_KEY_SECRET}" \
54
+ -e VERACODE_ZIPFILE="${VERACODE_ZIPFILE}" \
55
+ -e VERACODE_PACKAGE_CMD="${VERACODE_PACKAGE_CMD}" \
56
+ ghcr.io/eurekadevsecops/radar-veracode-pipeline 2>&1
@@ -1,5 +1,9 @@
1
1
  const path = require('node:path')
2
2
  module.exports = (sarif, dir, git, root) => {
3
+ // Pattern matches managed scanner temporary job directories:
4
+ // Format: /app/jobs/{uuid}/repo-{timestamp}/
5
+ // Example: /app/jobs/830f53a2-5f0c-4565-a262-607dfcd4d5e1/repo-1771653645/
6
+ const MANAGED_SCANNER_JOB_PREFIX = /^\/app\/jobs\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\/repo-\d+\//
3
7
  // Normalize findings.
4
8
  for (const run of sarif.runs) {
5
9
 
@@ -19,8 +23,14 @@ module.exports = (sarif, dir, git, root) => {
19
23
  // (or if the root is not available then to the scan directory)
20
24
  if (!run.results) continue
21
25
  for (const result of run.results) {
22
- for (const location of result.locations) {
23
- if (location.physicalLocation?.artifactLocation?.uri?.startsWith('/app')) {
26
+ for (const location of result.locations) {
27
+ if (location.physicalLocation?.artifactLocation?.uri?.match(MANAGED_SCANNER_JOB_PREFIX)) {
28
+ let file = location.physicalLocation.artifactLocation.uri.replace(MANAGED_SCANNER_JOB_PREFIX, '')
29
+ if (subfolder) file = path.join(subfolder, file)
30
+ if (result?.message?.text) result.message.text = result.message.text.replace(location.physicalLocation.artifactLocation.uri, file)
31
+ location.physicalLocation.artifactLocation.uri = file
32
+ }
33
+ else if (location.physicalLocation?.artifactLocation?.uri?.startsWith('/app')) {
24
34
  let file = path.join(subfolder, path.relative('/app', location.physicalLocation.artifactLocation.uri))
25
35
  if (result?.message?.text) result.message.text = result.message.text.replace(location.physicalLocation.artifactLocation.uri, file)
26
36
  location.physicalLocation.artifactLocation.uri = file
Binary file