Skip to content

Commit 002e96e

Browse files
[SECURITY] Additional Variable tweaks
Changes in file .github/actions/check-control/action.yml: * use variable for name and title inputs * fix check for details URL to compar with DEFAULT correctly
1 parent 376f288 commit 002e96e

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

.github/actions/check-control/action.yml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ runs:
194194
if: ${{ !cancelled() && (github.repository == 'reactive-firewall-org/multicast') }}
195195
shell: bash
196196
run: |
197-
if [[ "${{ inputs.details-url }}" != "" ]] ; then
197+
if [[ "${{ inputs.details-url }}" != "DEFAULT" ]] ; then
198198
printf "details_url=%s\n" '${{ inputs.details-url }}' >> "$GITHUB_OUTPUT"
199199
printf "::debug:: %s\n" "Check detail url was provided: ${{ inputs.details-url }}" ;
200200
else
@@ -217,13 +217,15 @@ runs:
217217
shell: bash
218218
env:
219219
GH_TOKEN: ${{ inputs.token }}
220+
CHECK_NAME_INPUT: '${{ inputs.name }}'
221+
CHECK_TITLE_INPUT: '${{ inputs.title || inputs.name }}'
220222
run: |
221223
printf "%s\n" "::group::validate-name"
222-
name_input='${{ inputs.name }}'
224+
name_input=${CHECK_NAME_INPUT}
223225
printf "::debug:: %s\n" "Will use name $name_input" ;
224226
printf "%s\n" "::endgroup::"
225227
printf "%s\n" "::group::validate-title"
226-
title_input='${{ inputs.name }}'
228+
title_input=${CHECK_TITLE_INPUT}
227229
printf "::debug:: %s\n" "Will use name $title_input" ;
228230
sanitized_input_title_field=$(printf "%s%s" 'output[title]=' "$title_input" ;)
229231
printf "%s\n" "::endgroup::"
@@ -246,13 +248,15 @@ runs:
246248
shell: bash
247249
env:
248250
GH_TOKEN: ${{ inputs.token }}
251+
CHECK_NAME_INPUT: '${{ inputs.name }}'
252+
CHECK_TITLE_INPUT: '${{ inputs.title || inputs.name }}'
249253
run: |
250254
printf "%s\n" "::group::validate-name"
251-
name_input='${{ inputs.name }}'
255+
name_input=${CHECK_NAME_INPUT}
252256
printf "::debug:: %s\n" "Will use name $name_input" ;
253257
printf "%s\n" "::endgroup::"
254258
printf "%s\n" "::group::validate-title"
255-
title_input='${{ inputs.name }}'
259+
title_input=${CHECK_TITLE_INPUT}
256260
printf "::debug:: %s\n" "Will use name $title_input" ;
257261
sanitized_input_title_field=$(printf "%s%s" 'output[title]=' "$title_input" ;)
258262
printf "%s\n" "::endgroup::"
@@ -299,13 +303,15 @@ runs:
299303
shell: bash
300304
env:
301305
GH_TOKEN: ${{ inputs.token }}
306+
CHECK_NAME_INPUT: '${{ inputs.name }}'
307+
CHECK_TITLE_INPUT: '${{ inputs.title || inputs.name }}'
302308
run: |
303309
printf "%s\n" "::group::validate-name"
304-
name_input='${{ inputs.name }}'
310+
name_input=${CHECK_NAME_INPUT}
305311
printf "::debug:: %s\n" "Will use name $name_input" ;
306312
printf "%s\n" "::endgroup::"
307313
printf "%s\n" "::group::validate-title"
308-
title_input='${{ inputs.name }}'
314+
title_input=${CHECK_TITLE_INPUT}
309315
printf "::debug:: %s\n" "Will use name $title_input" ;
310316
sanitized_input_title_field=$(printf "%s%s" 'output[title]=' "$title_input" ;)
311317
printf "%s\n" "::endgroup::"
@@ -326,13 +332,15 @@ runs:
326332
shell: bash
327333
env:
328334
GH_TOKEN: ${{ inputs.token }}
335+
CHECK_NAME_INPUT: '${{ inputs.name }}'
336+
CHECK_TITLE_INPUT: '${{ inputs.title || inputs.name }}'
329337
run: |
330338
printf "%s\n" "::group::validate-name"
331-
name_input='${{ inputs.name }}'
339+
name_input=${CHECK_NAME_INPUT}
332340
printf "::debug:: %s\n" "Will use name $name_input" ;
333341
printf "%s\n" "::endgroup::"
334342
printf "%s\n" "::group::validate-title"
335-
title_input='${{ inputs.name }}'
343+
title_input=${CHECK_TITLE_INPUT}
336344
printf "::debug:: %s\n" "Will use name $title_input" ;
337345
sanitized_input_title_field=$(printf "%s%s" 'output[title]=' "$title_input" ;)
338346
printf "%s\n" "::endgroup::"

0 commit comments

Comments
 (0)