You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Policy: cdk destroy, pulumi stack rm and terraform state rm wait for a person (TK-A001) #361
TK-A001 holds terraform destroy, pulumi destroy and (since #356) terragrunt destroy for a person. The blind E21 pool from #357 (by @juliasadler) found three infrastructure commands it doesn't hold:
cdk destroy deletes every stack it names; pulumi stack rm --force deletes a stack and its state even with resources still in it; terraform state rm makes Terraform forget a live resource, so the next apply can create a duplicate or a later destroy misses it.
Task: extend TK-A001 in tracekit/policy2/packs/coding.yaml (or add a rule next to it) so these wait for a person: cdk destroy (also through npx, pnpm dlx and the other launchers the rule already reads), pulumi stack rm, and terraform/tofu state rm.
Follow how fix(policy): hold terragrunt destroy (TK-A001) #356 added terragrunt: the same option groups, a version bump of the pack, tests in tests/test_signer_policy.py, cases in tests/data/policy/deny/ and benign lookalikes in tests/data/policy/benign/ (cdk diff, cdk synth, pulumi stack ls, terraform state list, terraform state show).
Update the TK-A001 rows in docs/policy-v2.md and docs/limits.md.
Done when: the three calls are held, E17 adds no false alarm (make eval), tracekit policy lint is clean and make test passes. Report the #357 pool's score after your change in the PR.
I'll take this. I'll extend TK-A001 in tracekit/policy2/packs/coding.yaml to hold cdk destroy (including npx/pnpm dlx and the other launchers the rule already reads), pulumi stack rm and terraform/tofu state rm, following how #356 added terragrunt (same option groups, pack version bump, tests in tests/test_signer_policy.py, deny/benign cases, and updated TK-A001 rows in docs/policy-v2.md and docs/limits.md). Will also report the #357 pool's new score in the PR.
It's yours @hossainzarif23, thanks! #356 (terragrunt) is the closest model: same option groups, tests, corpus cases and docs rows. Two small things: sign off your commits (git commit -s) for the DCO check, and @ritamgh is touching TK-A001's terraform part for a newline fix, so rebase on main before you open the PR.
Activity
hossainzarif23 commentedon Oct 24, 2026
I would like to work on this issue. Please assign me.
juliasadler commentedon Oct 24, 2026
I'll take this. I'll extend TK-A001 in tracekit/policy2/packs/coding.yaml to hold cdk destroy (including npx/pnpm dlx and the other launchers the rule already reads), pulumi stack rm and terraform/tofu state rm, following how #356 added terragrunt (same option groups, pack version bump, tests in tests/test_signer_policy.py, deny/benign cases, and updated TK-A001 rows in docs/policy-v2.md and docs/limits.md). Will also report the #357 pool's new score in the PR.
LoopGlitch26 commentedon Oct 24, 2026
It's yours @hossainzarif23, thanks! #356 (terragrunt) is the closest model: same option groups, tests, corpus cases and docs rows. Two small things: sign off your commits (
git commit -s) for the DCO check, and @ritamgh is touching TK-A001's terraform part for a newline fix, so rebase on main before you open the PR.juliasadler commentedon Oct 24, 2026
Noted it is assigned to @hossainzarif23 — stepping back from this one, no overlap from my side.
fix(policy): require approval for infrastructure removal
test(policy): add infrastructure removal corpus coverage
fix(policy): require approval for infrastructure removal
test(policy): add infrastructure removal corpus coverage
fix(policy): require approval for infrastructure removal
test(policy): add infrastructure removal corpus coverage
fix(policy): require approval for infrastructure removal
test(policy): add infrastructure removal corpus coverage
fix(policy): require approval for infrastructure removal (#383)