Skip to content

Commit 06f62f7

Browse files
msch-nutrientclaude
andcommitted
Fix secret exposure in GitHub Actions logs
Use Python to write integration config instead of echo to prevent API key from being visible in build logs. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 6920e9c commit 06f62f7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,11 @@ jobs:
8282
8383
- name: Create integration config with API key
8484
run: |
85-
echo 'API_KEY = "${{ secrets.NUTRIENT_DWS_API_KEY }}"' > tests/integration/integration_config.py
85+
python -c "
86+
import os
87+
with open('tests/integration/integration_config.py', 'w') as f:
88+
f.write(f'API_KEY = \"{os.environ[\"NUTRIENT_DWS_API_KEY\"]}\"\n')
89+
"
8690
env:
8791
NUTRIENT_DWS_API_KEY: ${{ secrets.NUTRIENT_DWS_API_KEY }}
8892

0 commit comments

Comments
 (0)