CICD-189 · Fail if an unexpected hidden config ships
Encyclopedia · Workflow security fundamentals · All snippets
Previous · CICD-188 · Next · CICD-190
1. Where it fits
- Placement Bash run step following checkout, or equivalent lab terminal.
- Prerequisites trusted repository, verified inputs and read-only default access.
- Platforms local-linux, github-actions, gitea-actions.
2. Copy the snippet
bash
tar -tzf dist/app.tar.gz > release-files.txt
if grep -E '(^|/)(\.env|\.git)(/|$)' release-files.txt; then exit 1; fi3. How it works
The command archives or inspects the selected files. Verify the relative paths and file set before using the archive downstream.
4. Verify the result
Review filename and content separately. Configure a full supply-chain policy for critical artifacts.
Validation syntax-validated (Bash parse). Status definitions.