Skip to content

Commit 5ec1a96

Browse files
Potential fix for code scanning alert no. 3: Artifact poisoning
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 86f78a0 commit 5ec1a96

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.github/workflows/cd.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,15 +165,26 @@ jobs:
165165
- name: Publish & tag (patch bump)
166166
run: cargo release minor --no-confirm --execute --allow-branch main
167167

168+
- name: Create temporary directory for artifacts
169+
run: mkdir -p ${{ runner.temp }}/artifacts
170+
168171
- name: Download all artifacts
169-
run: gh run download ${{ github.run_id }}
172+
run: gh run download ${{ github.run_id }} --dir ${{ runner.temp }}/artifacts
170173

171174
- name: Zip each downloaded directory
172175
run: |
173176
for dir in $(ls -d git-ai-*); do
174177
tar -czf ${dir}.tar.gz ${dir}
175178
done
176179
180+
- name: Verify artifact contents
181+
run: |
182+
if [ ! -d "${{ runner.temp }}/artifacts" ]; then
183+
echo "Artifacts directory not found!" >&2
184+
exit 1
185+
fi
186+
# Add additional verification logic here if needed
187+
177188
- name: Get version
178189
id: app
179190
run: echo "version=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].version')" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)