Skip to content

Commit a3f191a

Browse files
committed
add RL_PACK_SAFE option
1 parent ddeec9e commit a3f191a

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ The Base64-encoded license string and the site key must be provided to the pipel
9999
| `RL_STORE` | No | If using a package store, use this parameter to provide the path to a directory where the self-hosted package store has been initialized. |
100100
| `RL_PACKAGE_URL` | No | If using a package store, use this parameter to specify the package URL (PURL) for the scanned artifact. The package URL should be in the format `project/package@version`; for example `testing/[email protected]`. |
101101
| `RL_DIFF_WITH` | No | If using a package store, use this parameter to specify a previously scanned package version to compare (diff) against. |
102+
| `RL_PACK_SAFE` | No | Use this parameter to generate a SAFE archive (report.rl-safe) for the scan. |
102103
| `RL_VERBOSE` | No | Set to anything but '' to provide more feedback in the output while running the scan. Disabled by default. |
103104

104105

rl-scanner-gitlab-include.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
# RL_STORE
2828
# RL_PACKAGE_URL
2929
# RL_DIFF_WITH
30+
# RL_PACK_SAFE
3031

3132
# If the local runner needs to access the internet via a proxy we support that using:
3233
# RLSECURE_PROXY_SERVER
@@ -39,7 +40,7 @@
3940
job-reversinglabs-rl-scanner:
4041
# This job will run in the test stage of the pipeline
4142
stage: test
42-
43+
4344
# We will run the reversinglabs/rl-scanner:latest Docker image,
4445
# but will use our own entry point to make it compatible with GitLab runner.
4546
image:
@@ -93,6 +94,7 @@ job-reversinglabs-rl-scanner:
9394
# - RL_STORE: optional, string, default ''.
9495
# - RL_PACKAGE_URL: optional, string, default ''.
9596
# - RL_DIFF_WITH: optional, string, default ''.
97+
# - RL_PACK_SAFE: optional, string, default ''.
9698
#
9799
# E) Additional verbosity can be configured with:
98100
# - RL_VERBOSE: optional, default '' (anything else will be treated as true)
@@ -107,6 +109,7 @@ job-reversinglabs-rl-scanner:
107109
RL_STORE: ${RL_STORE:-No path specified for RL_STORE: no diff scan can be executed}
108110
RL_PACKAGE_URL: ${RL_PACKAGE_URL:-No package URL given: no diff scan can be executed}
109111
RL_DIFF_WITH: ${RL_DIFF_WITH:-No diff with was requested}
112+
RL_PACK_SAFE: ${RL_PACK_SAFE:-No RL-SAFE archive was requested}
110113
RLSECURE_PROXY_SERVER: ${RLSECURE_PROXY_SERVER:-No proxy server was provided}
111114
RLSECURE_PROXY_PORT: ${RLSECURE_PROXY_PORT:-No proxy port was provided}
112115
RLSECURE_PROXY_USER: ${RLSECURE_PROXY_USER:-No proxy user was provided}
@@ -206,25 +209,37 @@ job-reversinglabs-rl-scanner:
206209
run_scan_nostore()
207210
{
208211
RL_LEVEL_STR=""
212+
RL_PACK_SAFE_STR=""
209213
if [ ! -z "${RL_LEVEL}" ]
210214
then
211215
RL_LEVEL_STR="--rl-level=$RL_LEVEL"
212216
fi
217+
if [ ! -z "${RL_PACK_SAFE}" ]
218+
then
219+
RL_PACK_SAFE_STR="--pack-safe"
220+
fi
213221
rl-scan \
214222
$RL_LEVEL_STR --package-path="./${PACKAGE_PATH}/${MY_ARTIFACT_TO_SCAN}" \
215223
--report-path="${REPORT_PATH}" \
216-
--report-format=all 1>1 2>2
224+
--report-format=all \
225+
${RL_PACK_SAFE_STR} 1>1 2>2
217226
RR=$?
218227
}
219228
run_scan_withstore()
220229
{
230+
RL_PACK_SAFE_STR=""
231+
if [ ! -z "${RL_PACK_SAFE}" ]
232+
then
233+
RL_PACK_SAFE_STR="--pack-safe"
234+
fi
221235
rl-scan \
222236
--rl-store="${RL_STORE}" \
223237
--purl="${RL_PACKAGE_URL}" \
224238
--replace \
225239
--package-path="./${PACKAGE_PATH}/${MY_ARTIFACT_TO_SCAN}" \
226240
--report-path="${REPORT_PATH}" \
227241
--report-format=all \
242+
${RL_PACK_SAFE_STR} \
228243
${DIFF_WITH} 1>1 2>2
229244
RR=$?
230245
}

0 commit comments

Comments
 (0)