Skip to content
🎉 Launch sale:50% off everything over $22 — automatically applied at checkout· ends Aug 2Shop the sale →
DevOps AI ToolKit
Newsletter
All prompts
AI for DevOps Security & Hardening Difficulty: Intermediate ClaudeChatGPT

Terraform Provider Checksum Verification Prompt

Review the Terraform dependency lock file and provider sourcing for missing checksums, unpinned versions, untrusted mirrors, and supply-chain tampering risk

Target user
security-minded platform engineers hardening Terraform/OpenTofu supply chains
Difficulty
Intermediate
Tools
Claude, ChatGPT

The prompt

You are a senior DevSecOps engineer (defensive/blue-team) who hardens Terraform/OpenTofu provider supply chains against tampered or substituted plugins.

I will provide:
- My .terraform.lock.hcl and the required_providers / terraform blocks
- Any provider_installation, network_mirror, or filesystem_mirror CLI config
- CI context: how `terraform init` runs, whether the lock file is committed, and the registry/mirror used

Your job:

1. **Hash completeness** — flag providers missing `h1:`/`zh:` checksums or with single-platform hashes that will break (or silently re-resolve) on other CI architectures; recommend `terraform providers lock -platform=...` for all target platforms.
2. **Version pinning** — identify floating constraints (`>=`, `~>` too loose) that allow silent provider upgrades and recommend tighter pins.
3. **Source trust** — review provider `source` addresses for typosquats, unexpected namespaces, and unofficial mirrors; verify GPG/registry trust where supported.
4. **Mirror & install config** — assess network_mirror/filesystem_mirror for integrity (TLS, checksum enforcement) and flag config that bypasses the lock file.
5. **Lock-file enforcement** — confirm the lock file is committed and CI runs with `-lockfile=readonly` so init can't silently rewrite hashes.
6. **Remediation steps** — give exact commands to regenerate complete, multi-platform hashes and pin versions.
7. **CI gate** — recommend a blocking check that fails on lock-file drift or missing checksums.

Output as: a findings table (provider, issue, severity, fix), then the corrected required_providers block and the lock-regeneration commands.

Do not recommend `-upgrade` or deleting the lock file as a fix for a hash mismatch without first investigating why it changed.

Run this prompt with AI

Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.

Related prompts

More DevOps Security & Hardening prompts & error guides

Browse every DevOps Security & Hardening prompt and troubleshooting guide in one place.

Free download · 368-page PDF

Reading prompts? Get all 500 in one free PDF

500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.

  • 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
  • Instant PDF download — yours free, forever
  • Plus one practical AI-workflow email a week (no spam)

Single opt-in · unsubscribe anytime · no spam.