From c08b4539121351c1d5c19555c354972fb4bfd25c Mon Sep 17 00:00:00 2001 From: Jayana Gunaweera <79576139+JayanaGunaweera01@users.noreply.github.com> Date: Wed, 30 Aug 2023 23:35:46 +0530 Subject: [PATCH] fix: Removed creds.json Ensured secure removal of creds.json from .github/workflows. --- .github/workflows/migration-automation.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/migration-automation.yml b/.github/workflows/migration-automation.yml index e8f8051267..fb234e3f45 100644 --- a/.github/workflows/migration-automation.yml +++ b/.github/workflows/migration-automation.yml @@ -118,6 +118,9 @@ jobs: chmod +x ${{ github.workspace }}/.github/migration-tester/migration-automation/ubuntu-os/migration-script-ubuntu.sh sh ${{ github.workspace }}/.github/migration-tester/migration-automation/ubuntu-os/migration-script-ubuntu.sh "${{ github.event.inputs.urlOld }}" "${{ github.event.inputs.urlNew }}" "${{ github.event.inputs.currentVersion }}" "${{ github.event.inputs.migratingVersion }}" "${{ github.event.inputs.database }}" "${{ github.event.inputs.os }}" "${{ secrets.MIGRATION_EMAIL }}" "${{ secrets.MIGRATION_PASSWORD }}" "${{ secrets.MIGRATION_PAT }}" creds.json | tee "${{ github.workspace }}/.github/migration-tester/migration-automation/logs.txt" continue-on-error: true + - name: Remove creds.json file + run: rm -f ${{ github.workspace }}/.github/migration-tester/migration-automation/creds.json + - name: Persist Logs run: | @@ -146,6 +149,9 @@ jobs: chmod +x ${{ github.workspace }}/.github/migration-tester/migration-automation/ubuntu-os/migration-script-ubuntu.sh sh ${{ github.workspace }}/.github/migration-tester/migration-automation/ubuntu-os/migration-script-ubuntu.sh "${{ github.event.inputs.urlOld }}" "${{ github.event.inputs.urlNew }}" "${{ github.event.inputs.currentVersion }}" "${{ github.event.inputs.migratingVersion }}" "${{ github.event.inputs.database }}" "${{ github.event.inputs.os }}" "${{ secrets.MIGRATION_EMAIL }}" "${{ secrets.MIGRATION_PASSWORD }}" "${{ secrets.MIGRATION_PAT }}" creds.json | tee "${{ github.workspace }}/.github/migration-tester/migration-automation/logs.txt" continue-on-error: true + - name: Remove creds.json file + run: rm -f ${{ github.workspace }}/.github/migration-tester/migration-automation/creds.json + - name: Persist Logs run: | @@ -202,6 +208,9 @@ jobs: chmod +x ${{ github.workspace }}/.github/migration-tester/migration-automation/ubuntu-os/migration-script-ubuntu.sh sh ${{ github.workspace }}/.github/migration-tester/migration-automation/ubuntu-os/migration-script-ubuntu.sh "${{ github.event.inputs.urlOld }}" "${{ github.event.inputs.urlNew }}" "${{ github.event.inputs.currentVersion }}" "${{ github.event.inputs.migratingVersion }}" "${{ github.event.inputs.database }}" "${{ github.event.inputs.os }}" "${{ secrets.MIGRATION_EMAIL }}" "${{ secrets.MIGRATION_PASSWORD }}" "${{ secrets.MIGRATION_PAT }}" creds.json | tee "${{ github.workspace }}/.github/migration-tester/migration-automation/logs.txt" continue-on-error: true + - name: Remove creds.json file + run: rm -f ${{ github.workspace }}/.github/migration-tester/migration-automation/creds.json + - name: Persist Logs run: | mkdir -p ${{ github.workspace }}/.github/migration-tester/migration-automation/artifacts @@ -229,6 +238,9 @@ jobs: chmod +x ${{ github.workspace }}/.github/migration-tester/migration-automation/mac-os/migration-script-mac.sh sh ${{ github.workspace }}/.github/migration-tester/migration-automation/mac-os/migration-script-mac.sh "${{ github.event.inputs.urlOld }}" "${{ github.event.inputs.urlNew }}" "${{ github.event.inputs.currentVersion }}" "${{ github.event.inputs.migratingVersion }}" "${{ github.event.inputs.database }}" "${{ github.event.inputs.os }}" "${{ secrets.MIGRATION_EMAIL }}" "${{ secrets.MIGRATION_PASSWORD }}" "${{ secrets.MIGRATION_PAT }}" creds.json | tee "${{ github.workspace }}/.github/migration-tester/migration-automation/logs.txt" continue-on-error: true + - name: Remove creds.json file + run: rm -f ${{ github.workspace }}/.github/migration-tester/migration-automation/creds.json + - name: Persist Logs run: | mkdir -p ${{ github.workspace }}/.github/migration-tester/migration-automation/artifacts @@ -278,6 +290,9 @@ jobs: chmod +x ${{ github.workspace }}/.github/migration-tester/migration-automation/mac-os/migration-script-mac.sh sh ${{ github.workspace }}/.github/migration-tester/migration-automation/mac-os/migration-script-mac.sh "${{ github.event.inputs.urlOld }}" "${{ github.event.inputs.urlNew }}" "${{ github.event.inputs.currentVersion }}" "${{ github.event.inputs.migratingVersion }}" "${{ github.event.inputs.database }}" "${{ github.event.inputs.os }}" "${{ secrets.MIGRATION_EMAIL }}" "${{ secrets.MIGRATION_PASSWORD }}" "${{ secrets.MIGRATION_PAT }}" creds.json | tee "${{ github.workspace }}/.github/migration-tester/migration-automation/logs.txt" continue-on-error: true + - name: Remove creds.json file + run: rm -f ${{ github.workspace }}/.github/migration-tester/migration-automation/creds.json + - name: Persist Logs run: | mkdir -p ${{ github.workspace }}/.github/migration-tester/migration-automation/artifacts @@ -328,6 +343,9 @@ jobs: chmod +x ${{ github.workspace }}/.github/migration-tester/migration-automation/mac-os/migration-script-mac.sh sh ${{ github.workspace }}/.github/migration-tester/migration-automation/mac-os/migration-script-mac.sh "${{ github.event.inputs.urlOld }}" "${{ github.event.inputs.urlNew }}" "${{ github.event.inputs.currentVersion }}" "${{ github.event.inputs.migratingVersion }}" "${{ github.event.inputs.database }}" "${{ github.event.inputs.os }}" "${{ secrets.MIGRATION_EMAIL }}" "${{ secrets.MIGRATION_PASSWORD }}" "${{ secrets.MIGRATION_PAT }}" creds.json | tee "${{ github.workspace }}/.github/migration-tester/migration-automation/logs.txt" continue-on-error: true + - name: Remove creds.json file + run: rm -f ${{ github.workspace }}/.github/migration-tester/migration-automation/creds.json + - name: Persist Logs run: | mkdir -p ${{ github.workspace }}/.github/migration-tester/migration-automation/artifacts