Logo van Auditing Terraform State And Backend Trust

Auditing Terraform State And Backend Trust

Organisatie
UnboundCompute
auditing-terraform-state-and-backend-trust

Controleer de opslag van infrastructuurstatus en de backend op blootstelling en manipulatie: een statusbestand met geheimen in platte tekst in een backend die voor te veel principalen toegankelijk is, een statusbucket of backend zonder versleuteling, versiebeheer of toegangsbeperkingen, een ontbrekende of niet-afgedwongen statusvergrendeling waardoor gelijktijdige schrijfacties de status kunnen beschadigen, en een backendconfiguratie waarmee een aanvaller de status kan omleiden naar een locatie die hij beheert. Dit omvat Terraform en vergelijkbare tools waarbij het statusbestand echte resourcekenmerken en vaak geheime waarden bevat, en waarbij iedereen die de status kan lezen of schrijven die geheimen kan inzien of de volgende apply kan saboteren. Gebruik dit wanneer infrastructuurstatus in een gedeelde backend wordt opgeslagen en die backend de beveiligingsgrens vormt. De principal die de status kan lezen of schrijven is de bron; de statusopslag is het doel. De bug is het blootgestelde geheim of de status die kan worden gemanipuleerd.

Overzicht

UitgeverUnboundCompute
Repositorysecurity-agent-skills
Skillnaamauditing-terraform-state-and-backend-trust
Sterren
27
Forks
8
Meegeleverde bestanden
Alleen instructies
LicentieMIT
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Compleet zonder extra bestanden

    Alles wat het model nodig heeft, staat in de instructies — geen extra bestanden om te synchroniseren.

  • Open source

    Gepubliceerd door UnboundCompute op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Auditing Terraform State And Backend Trust in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-terraform-state-and-backend-trust
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/UnboundCompute/security-agent-skills.git /tmp/security-agent-skills
mkdir -p .claude/skills
cp -r /tmp/security-agent-skills/skills/auditing-terraform-state-and-backend-trust .claude/skills/auditing-terraform-state-and-backend-trust
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Auditing Terraform State And Backend Trust in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Auditing Terraform State And Backend Trust automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Auditing Terraform State And Backend Trust niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

Auditing Terraform state and backend trust: when the state file is the crown jewels

Infrastructure state is not a build artifact; it is a live record of every resource and, very often, the plaintext of the secrets those resources were created with, database passwords, generated keys, tokens. It also drives the next apply: whatever the state says exists is what the tool reconciles against. That makes the state backend a high-value target on two axes. Anyone who can read the state file can read the secrets in it, so a backend readable by too many principals is a secret-disclosure bug. Anyone who can write or redirect the state can corrupt the next apply or point it at resources they control, so a missing lock or a mutable backend configuration is a tampering bug. You audit these by checking who can read the state, how it is protected at rest, and whether writes are locked and the backend is fixed.

When to use

  • Infrastructure state is stored in a shared backend such as an object store or a remote state service.
  • The state file may contain plaintext secrets from resources it manages.
  • State access, encryption, versioning, locking, or backend configuration may be loose or unenforced.

Scope check

Audit state and backends only for infrastructure you own or are authorized to assess, on non-production state. Reading a state file exposes real secrets, so stay inside the authorized backend and treat any secret in state as sensitive within scope, never exfiltrating it. If you can't name the authorization, stop.

The loop

  1. Establish who legitimately needs state access first. Name the principals that must read and write the state for this infrastructure: the specific pipeline identity, the specific operators. This is the false-positive killer: a backend scoped to exactly those principals with encryption and locking is correct. Name the legitimate set, then compare actual access to it.

  2. Determine what secrets the state actually holds. Read whether the managed resources write secret values into state (generated passwords, keys, connection strings). If they do, every principal who can read the state reads those secrets, so the read-access set is a secret-disclosure boundary, not just an operational one. Confirm the sensitivity of what state contains.

  3. Scope the read access to the backend. Compute who can read the state store: the bucket or backend policy, identity policies, and any broad grant. Compare that set to the legitimate readers. A state bucket readable by a broad role, an entire account, or a wildcard is a direct path to the secrets in state.

  4. Check protection at rest and history. Confirm the backend encrypts state at rest, retains versions so a corrupting write can be recovered, and does not expose old versions to a wider set than current state. A backend without encryption or versioning leaves the secrets and the recovery path unprotected.

  5. Check locking and backend integrity. Confirm state locking is configured and enforced so two applies cannot write concurrently and corrupt the state, and that the backend configuration cannot be redirected by an attacker to a state location they control. A missing lock allows a corrupting race; a mutable backend pointer lets an attacker feed a poisoned state into the next apply.

  6. Confirm and record. Confirm by reading a secret from the state file as a principal that should not have state access but is admitted, or by showing state writes are unlocked or the backend is redirectable, within scope and without exfiltrating secrets or corrupting real state. Kill the lead if state read access is scoped to legitimate principals, state is encrypted and versioned, locking is enforced, and the backend configuration is fixed. Record the admitted principal, the state store sink, and the exposed secret or the tamperable state.

Where state and backend trust leak

  • State holds plaintext secrets. Generated passwords and keys land in state, so read access to the backend is read access to those secrets.
  • A broadly readable backend is secret disclosure. A state bucket open to a wide role or account exposes everything in state to that set.
  • No encryption or versioning removes protection and recovery. Unencrypted state exposes secrets at rest; no versioning means a corrupting write cannot be rolled back.
  • A missing lock allows corrupting races. Concurrent applies without a lock can leave state inconsistent with reality, breaking the next reconcile.
  • A redirectable backend poisons the next apply. If an attacker can change where state is read from, they feed a state that drives the tool to act on resources they control.

Worked example (a confirm and a kill)

Confirm. State is stored in an object bucket readable by a broad operations role, and the managed database resource writes its generated password into state in plaintext. The operations role, never intended to hold database credentials, reads the password from the state file. Confirmed secret disclosure through over-broad state access, high, remediation = scope the state bucket to the pipeline identity and named operators only, enable encryption at rest and versioning, and move generated secrets out of state into a managed secrets store where feasible.

Kill. The state backend is readable and writable only by the pipeline identity and two named operators, is encrypted at rest with versioning enabled, enforces state locking on every apply, and its backend configuration is fixed and not attacker-redirectable. A principal outside the set cannot read state and concurrent writes are blocked. Killed, kill_reason = "state access scoped to legitimate principals with encryption, versioning, and enforced locking, and a fixed backend; no unintended reader sees secrets and no unlocked or redirected write corrupts state."

Rationalizations to reject

  • "State is just infrastructure metadata." → State commonly holds plaintext generated secrets; read access to the backend is read access to those secrets.
  • "The bucket is internal." → Internal is not scoped; compute who can actually read the backend and compare to the legitimate reader set.
  • "We do not need versioning." → Without it, a corrupting write is unrecoverable; versioning is part of state integrity, not just convenience.
  • "Applies never overlap." → Confirm locking is enforced; an unlocked backend allows a corrupting race the moment two runs coincide.
  • "The backend config is in the repo." → Confirm it cannot be redirected by an attacker; a mutable backend pointer poisons the next apply regardless of where it lives.

Executing this in practice

You need the legitimate state readers and writers, what secrets the state holds, the read and write access to the backend, the encryption/versioning/locking posture, and whether the backend configuration is fixed. For each backend, compare the access set to the legitimate one and confirm protection and locking. Reading the backend policy shows the intended boundary; reading a secret from state as an unintended principal, or showing an unlocked write, shows whether it holds.

Related

  • auditing-infrastructure-as-code-exposures - the resource-declaration side; state is the runtime record of what those declarations produced, secrets included.
  • reviewing-secrets-manager-access-policy-trust - the better home for the secrets that leak through state; moving them there is the durable remediation.
  • auditing-iac-module-and-provider-supply-chain - the code side of the same pipeline; state trust and module trust are the two halves of IaC security.
  • hunting-non-human-identity-and-secret-reachability - the pipeline identity that reads and writes state is a machine credential; that skill traces what it can reach.
  • FINDING-SCHEMA.md - source = the principal who can read or write state, sink = the state store, evidence = the exposed secret or the tamperable state.

Veelgestelde vragen

Wat doet de AI-skill Auditing Terraform State And Backend Trust?

Controleer de opslag van infrastructuurstatus en de backend op blootstelling en manipulatie: een statusbestand met geheimen in platte tekst in een backend die voor te veel principalen toegankelijk is, een statusbucket of backend zonder versleuteling, versiebeheer of toegangsbeperkingen, een ontbrekende of niet-afgedwongen statusvergrendeling waardoor gelijktijdige schrijfacties de status kunnen beschadigen, en een backendconfiguratie waarmee een aanvaller de status kan omleiden naar een locatie die hij beheert. Dit omvat Terraform en vergelijkbare tools waarbij het statusbestand echte resou...

Waarom Auditing Terraform State And Backend Trust gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Auditing Terraform State And Backend Trust bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Auditing Terraform State And Backend Trust in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-terraform-state-and-backend-trust. TypingMind leest het bestand SKILL.md en installeert het als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Auditing Terraform State And Backend Trust gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Auditing Terraform State And Backend Trust gebruiken?

Zoveel als je wilt. Je kunt Auditing Terraform State And Backend Trust gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Auditing Terraform State And Backend Trust gratis?

Ja. Deze skill is door UnboundCompute op GitHub gepubliceerd onder de licentie MIT. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇