File tree Expand file tree Collapse file tree 2 files changed +18
-7
lines changed Expand file tree Collapse file tree 2 files changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ inputs:
32
32
default : " "
33
33
registry_module :
34
34
description : " Module within the scanner registry to execute"
35
- required : true
35
+ default : " "
36
36
scanner_id :
37
37
description : " Optional identifier to uniquely identify the scanner"
38
38
default : " "
@@ -51,6 +51,9 @@ inputs:
51
51
scan_main_timeout :
52
52
description : " Maximum amount of time a main scan should complete in"
53
53
default : " "
54
+ trigger_id :
55
+ description : " Boost API workflow trigger id"
56
+ default : " "
54
57
runs :
55
58
using : " composite"
56
59
steps :
73
76
BOOST_SCAN_PATH : ${{ inputs.scan_path }}
74
77
BOOST_SCANNER_ID : ${{ inputs.scanner_id }}
75
78
BOOST_SCANNER_REGISTRY_MODULE : ${{ inputs.registry_module }}
79
+ BOOST_TRIGGER_ID : ${{ inputs.trigger_id }}
Original file line number Diff line number Diff line change @@ -20,17 +20,19 @@ init.config ()
20
20
{
21
21
log.info " initializing configuration"
22
22
23
- export BOOST_DIFF_SCAN_TIMEOUT=${BOOST_DIFF_SCAN_TIMEOUT:- ${BOOST_SCAN_TIMEOUT:- } }
24
-
25
23
export BOOST_TMP_DIR=${BOOST_TMP_DIR:- ${WORKSPACE_TMP:- ${TMPDIR:-/ tmp} } }
26
24
export BOOST_EXE=${BOOST_EXE:- ${BOOST_TMP_DIR} / boost-cli/ latest}
27
25
28
26
export BOOST_CLI_URL=${BOOST_CLI_URL:- https:// assets.build.boostsecurity.io}
29
27
BOOST_CLI_URL=${BOOST_CLI_URL%*/ }
30
28
export BOOST_DOWNLOAD_URL=${BOOST_DOWNLOAD_URL:- ${BOOST_CLI_URL} / boost-cli/ get-boost-cli}
31
29
32
- export BOOST_GIT_MAIN_BRANCH
33
- BOOST_GIT_MAIN_BRANCH=${BOOST_GIT_MAIN_BRANCH:- $(git.ls_remote)}
30
+ if [ -z " ${BOOST_TRIGGER_ID:- } " ]; then
31
+ export BOOST_DIFF_SCAN_TIMEOUT=${BOOST_DIFF_SCAN_TIMEOUT:- ${BOOST_SCAN_TIMEOUT:- } }
32
+
33
+ export BOOST_GIT_MAIN_BRANCH
34
+ BOOST_GIT_MAIN_BRANCH=${BOOST_GIT_MAIN_BRANCH:- $(git.ls_remote)}
35
+ fi
34
36
35
37
init.ci.config
36
38
}
@@ -51,8 +53,13 @@ main.scan ()
51
53
init.config
52
54
init.cli
53
55
54
- # shellcheck disable=SC2086
55
- exec ${BOOST_EXE} scan repo ${BOOST_CLI_ARGUMENTS:- }
56
+ if [ -n " ${BOOST_TRIGGER_ID:- } " ]; then
57
+ # shellcheck disable=SC2086
58
+ exec ${BOOST_EXE} scan trigger ${BOOST_CLI_ARGUMENTS:- }
59
+ else
60
+ # shellcheck disable=SC2086
61
+ exec ${BOOST_EXE} scan repo ${BOOST_CLI_ARGUMENTS:- }
62
+ fi
56
63
}
57
64
58
65
if [ " ${0} " = " ${BASH_SOURCE[0]} " ]; then
You can’t perform that action at this time.
0 commit comments