Skip to content

Commit 484622b

Browse files
committed
security(workflows): harden credential persistence and env interpolation against template injection
1 parent 6d02d9b commit 484622b

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/e2e.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,12 @@ jobs:
110110
- name: 🧹 Cleanup Neon Preview Branch
111111
if: always() && steps.create_neon_branch.outputs.branch_id != ''
112112
continue-on-error: true
113+
env:
114+
NEON_PROJECT_ID: ${{ secrets.NEON_PROJECT_ID }}
115+
BRANCH_ID: ${{ steps.create_neon_branch.outputs.branch_id }}
116+
NEON_API_KEY: ${{ secrets.NEON_API_KEY }}
113117
run: |
114118
curl -s -X DELETE \
115-
"https://console.neon.tech/api/v2/projects/${{ secrets.NEON_PROJECT_ID }}/branches/${{ steps.create_neon_branch.outputs.branch_id }}" \
116-
-H "Authorization: Bearer ${{ secrets.NEON_API_KEY }}" \
119+
"https://console.neon.tech/api/v2/projects/${NEON_PROJECT_ID}/branches/${BRANCH_ID}" \
120+
-H "Authorization: Bearer ${NEON_API_KEY}" \
117121
-H "Accept: application/json"

.github/workflows/wiki-sync.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,16 @@ jobs:
2121
steps:
2222
- name: Checkout main repository
2323
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
24+
with:
25+
persist-credentials: false
2426

2527
- name: Checkout wiki repository
2628
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2729
with:
2830
repository: RUN-APPAREL/RUN.wiki
2931
path: wiki
3032
token: ${{ secrets.GITHUB_TOKEN }}
33+
persist-credentials: true
3134

3235
- name: Sync wiki source files
3336
run: |

0 commit comments

Comments
 (0)