Logo di Auditing Terraform State And Backend Trust

Auditing Terraform State And Backend Trust

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

Verifica che l'archiviazione dello stato dell'infrastruttura e il relativo backend siano protetti da esposizione e manomissioni: un file di stato con segreti in chiaro conservato in un backend accessibile a troppi soggetti; un bucket o backend dello stato senza cifratura, versioning o controlli di accesso; un blocco dello stato assente o non applicato che consente scritture simultanee e corrompe i dati; e una configurazione del backend che permette a un utente malintenzionato di reindirizzare lo stato verso una posizione sotto il suo controllo. Include Terraform e strumenti simili, in cui il file di stato registra gli attributi effettivi delle risorse e spesso contiene valori segreti: chiunque possa leggere o scrivere lo stato può accedere a quei segreti o compromettere la successiva applicazione delle modifiche. Usala quando lo stato dell'infrastruttura è archiviato in un backend condiviso e il backend costituisce il confine di sicurezza. Il soggetto che può leggere o scrivere lo stato è la fonte; l'archivio dello stato è la destinazione; il problema è il segreto esposto o lo stato modificabile da altri.

Panoramica

Pubblicato daUnboundCompute
Repositorysecurity-agent-skills
Nome della skillauditing-terraform-state-and-backend-trust
Stelle
27
Fork
8
File inclusi
Solo istruzioni
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

    Pubblicata da UnboundCompute su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Auditing Terraform State And Backend Trust in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-terraform-state-and-backend-trust
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

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
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Auditing Terraform State And Backend Trust in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Auditing Terraform State And Backend Trust non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Auditing Terraform State And Backend Trust non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

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.

Domande frequenti

Cosa fa la skill IA Auditing Terraform State And Backend Trust?

Verifica che l'archiviazione dello stato dell'infrastruttura e il relativo backend siano protetti da esposizione e manomissioni: un file di stato con segreti in chiaro conservato in un backend accessibile a troppi soggetti; un bucket o backend dello stato senza cifratura, versioning o controlli di accesso; un blocco dello stato assente o non applicato che consente scritture simultanee e corrompe i dati; e una configurazione del backend che permette a un utente malintenzionato di reindirizzare lo stato verso una posizione sotto il suo controllo. Include Terraform e strumenti simili, in cui i...

Perché usare Auditing Terraform State And Backend Trust su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Auditing Terraform State And Backend Trust è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Auditing Terraform State And Backend Trust in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-terraform-state-and-backend-trust. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Auditing Terraform State And Backend Trust?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Auditing Terraform State And Backend Trust?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Auditing Terraform State And Backend Trust: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Auditing Terraform State And Backend Trust è gratuita?

Sì. È pubblicata su GitHub da UnboundCompute con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇