Skip to content

Commit

Permalink
Fix: Disable the bash echo with -x
Browse files Browse the repository at this point in the history
::add-mask:: disables the output however the GHA steps through
the echo in the run. Therefore avoid sensitive data being
echo-ed in the logs being disabled add +x as the last arg
to bash.

Export only required vars into environment.

Signed-off-by: Anil Belur <[email protected]>
  • Loading branch information
askb committed Dec 5, 2023
1 parent 2551123 commit 13358a5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/compose-packer-verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,11 @@ jobs:
uses: infovista-opensource/[email protected]
with:
secrets: ${{ secrets.ENV_SECRETS }}
include: CLOUDS_ENV_B64, CLOUDS_YAML_B64
- name: Create cloud-env file required for packer
id: create-cloud-env-file
if: steps.changes.outputs.src == 'true'
shell: bash
shell: /usr/bin/bash --noprofile --norc -e -o pipefail +x {0}
# yamllint disable rule:line-length
run: |
echo "${{ env.CLOUDS_ENV_B64 }}" | sed 's/^ */::add-mask::/'
Expand All @@ -120,7 +121,7 @@ jobs:
- name: Create cloud.yaml file for openstack client
id: create-cloud-yaml-file
if: steps.changes.outputs.src == 'true'
shell: bash
shell: /usr/bin/bash --noprofile --norc -e -o pipefail +x {0}
# yamllint disable rule:line-length
run: |
mkdir -p "$HOME/.config/openstack"
Expand Down

0 comments on commit 13358a5

Please sign in to comment.