CICD-372 · Dependency allowlist enforcement
Encyclopedia · Advanced security and compliance · All snippets
Previous · CICD-371 · Next · CICD-373
1. Where it fits
- Placement CI dependency gate.
- Prerequisites reviewed policies, a short-lived CI identity, and synthetic or approved test inputs.
- Platforms local-linux, github-actions, gitea-actions.
2. Copy the snippet
bash
jq -en --slurpfile allowed policy/packages.json --slurpfile tree reports/production-packages.json '($allowed[0]) as $permit | all($tree[0][]; . as $p | $permit | index($p) != null)'3. How it works
The expression filters or transforms the input JSON. Where jq -e is used, a false or empty result can fail the gate.
4. Verify the result
Both JSON inputs are arrays of package identities. Generate the production list from the resolved dependency graph.
Validation syntax-validated (Bash parse). Status definitions.