Skip to content

Commit a245ea6

Browse files
authored
Merge pull request #63 from github/fix-sec-vulnerabilities
Fix security vulnerabilities
2 parents f0ec442 + 21035c2 commit a245ea6

File tree

6 files changed

+34977
-37914
lines changed

6 files changed

+34977
-37914
lines changed

.github/workflows/push-to-main-handler.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ jobs:
4040
echo "IS_RELEASE=true" >> "$GITHUB_OUTPUT"
4141
fi
4242
43-
- name: Install profile decompose sfdx plugin
43+
- name: Install profile decompose sf plugin # ERROR: Unable to convert this command; you must convert it manually.
44+
4445
if: steps.requires-deploy.outputs.changed == '1'
4546
run: echo y | npx sfdx-cli plugins:install @rdietrick/sfdx-profile-decompose
4647

@@ -51,7 +52,7 @@ jobs:
5152
run: |
5253
echo "${SALESFORCE_JWT_KEY}" > server.key
5354
npx sfdx-cli force:auth:jwt:grant --clientid ${{ secrets.SALESFORCE_CLIENT_ID }} --jwtkeyfile server.key --username ${{ secrets.SALESFORCE_DEVHUB_USERNAME}} --setdefaultdevhubusername -a DevHub
54-
npx sfdx-cli force:org:display --json -u DevHub > sfdx-auth.json
55+
npx sf org display --json -o DevHub > sfdx-auth.json
5556
5657
- name: Recompose profiles
5758
if: steps.requires-deploy.outputs.changed == '1' && vars.SALESFORCE_FORMATTED_PROFILES_AND_PERMS == 'false'
@@ -77,8 +78,8 @@ jobs:
7778
- name: Deploy to Production
7879
if: steps.requires-deploy.outputs.changed == '1'
7980
run: |
80-
npx sfdx-cli force:source:manifest:create --sourcepath force-app --manifestname temp-deploy-manifest
81-
npx sfdx-cli force:source:deploy -u DevHub -x temp-deploy-manifest.xml ${{ steps.check_for_destructive_changes.outputs.DESTRUCTIVE_FILES }} -w 200 -l RunLocalTests
81+
sudo npx sf project generate manifest -p force-app -n temp-deploy-manifest
82+
sudo npx sf project deploy start -o DevHub -x temp-deploy-manifest.xml ${{ steps.check_for_destructive_changes.outputs.DESTRUCTIVE_FILES }} -w 200 -l RunLocalTests --ignore-conflicts
8283
8384
- name: Get Previous Tag
8485
if: steps.check_release.outputs.IS_RELEASE == 'true' && steps.requires-deploy.outputs.changed == '1'
@@ -121,16 +122,16 @@ jobs:
121122
if: steps.requires-deploy.outputs.changed == '1'
122123
run: |
123124
echo "${SALESFORCE_TEMPLATE_JWT_SECRET_KEY}" > template-server.key
124-
npx sfdx-cli force:auth:jwt:grant --clientid ${{ secrets.SALESFORCE_TEMPLATE_CONSUMER_KEY }} --jwtkeyfile template-server.key --username ${{ secrets.SALESFORCE_TEMPLATE_USERNAME}} -a Template --instanceurl https://test.salesforce.com
125-
npx sfdx-cli force:org:display --json -u Template > sfdx-auth.json
125+
sudo npx sf org login jwt --client-id ${{ secrets.SALESFORCE_TEMPLATE_CONSUMER_KEY }} --jwt-key-file template-server.key --username ${{ secrets.SALESFORCE_TEMPLATE_USERNAME}} --alias Template --instance-url https://test.salesforce.com
126+
sudo npx sf org display --json -o Template > sfdx-auth.json
126127
env:
127128
SALESFORCE_TEMPLATE_JWT_SECRET_KEY: ${{ secrets.SALESFORCE_TEMPLATE_JWT_SECRET_KEY }}
128129

129130
- name: Update Template sandbox
130131
if: steps.requires-deploy.outputs.changed == '1'
131132
run: |
132-
npx sfdx-cli force:source:manifest:create --sourcepath force-app --manifestname temp-deploy-manifest
133-
npx sfdx-cli force:source:deploy -u Template -x temp-deploy-manifest.xml ${{ steps.check_for_destructive_changes.outputs.DESTRUCTIVE_FILES }} -w 200 -l RunLocalTests
133+
sudo npx sf project generate manifest -p force-app -n temp-deploy-manifest
134+
sudo npx sf org display --json -o Template > sfdx-auth.json
134135
135136
- name: Create PR with cleaned up destructive changes
136137
if: steps.check_release.outputs.IS_RELEASE == 'true' && steps.requires-deploy.outputs.changed == '1'

.github/workflows/release-branch-pull-request-handler.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,14 @@ jobs:
8080
echo "$SFDX_AUTH_SECRET_KEY" >> key.txt
8181
age --decrypt -i key.txt ${LOGIN_ENC_FILE}.age > ${LOGIN_ENC_FILE}
8282
rm key.txt
83-
npx sfdx-cli force:auth:sfdxurl:store -f ${LOGIN_ENC_FILE} -a is${{ steps.branchFilter.outputs.issueNumber }}uat
83+
npx sfdx force:auth:sfdxurl:store -f ${LOGIN_ENC_FILE} -a is${{ steps.branchFilter.outputs.issueNumber }}uat
8484
- name: Deploy Source to Sandbox
8585
if: steps.branchFilter.outputs.matches == 'true' && steps.requires-deploy.outputs.changed == '1'
8686
env:
8787
LOGIN_ENC_FILE: auth/sandbox-login-url-${{ steps.branchFilter.outputs.branchName }}-uat.txt
8888
run: |
89-
npx sfdx-cli force:source:manifest:create --sourcepath force-app --manifestname temp-deploy-manifest
90-
npx sfdx-cli force:source:deploy -u is${{ steps.branchFilter.outputs.issueNumber }}uat -x temp-deploy-manifest.xml ${{ steps.check_for_destructive_changes.outputs.DESTRUCTIVE_FILES }} -w ${{ vars.DEPLOYMENT_TIMEOUT }} -l RunLocalTests
89+
npx sfdx project generate manifest -p force-app -n temp-deploy-manifest
90+
npx sfdx project deploy start -o is${{ steps.branchFilter.outputs.issueNumber }}uat -x temp-deploy-manifest.xml ${{ steps.check_for_destructive_changes.outputs.DESTRUCTIVE_FILES }} -w ${{ vars.DEPLOYMENT_TIMEOUT }} -l RunLocalTests --ignore-conflicts
9191
- name: Init Release Notes
9292
id: init-release-notes
9393
if: vars.GENERATE_RELEASE == 'true' && steps.check_first_deploy.outputs.FIRST_DEPLOY == 'true' && steps.branchFilter.outputs.matches == 'true'

0 commit comments

Comments
 (0)