T09 · Insecure Skill Coding Practices
- Location
SKILL.md:964- Finding
Terraform Plan Disclosure and JavaScript Injection in Pull Request Workflow
- Content
View full analysis
- Remediation
View remediation
"$RUNNER_TEMP/terraform-plan.txt" ``` 3. Prefer uploading the plan as a restricted workflow artifact rather than publishing it as a comment. 4. If a summary must be posted, generate a minimal structured summary and redact secrets before publication. 5. Run secret scanning against all text that may be posted to GitHub. 6. Mark applicable Terraform variables and outputs as `sensitive = true`, while recognizing that this does not guarantee all plan data is safe to publish. 7. Use the minimum workflow permissions: ```yaml permissions: contents: read pull-requests: write ``` 8. Do not execute pull-request-controlled Terraform with production credentials. Use an isolated read-only planning identity with no apply or mutation permissions. 9. Require approval before running workflows from untrusted forks and avoid exposing repository secrets to those workflows. ]]>
