gitwtfhub

wtf is tf-triage?

balmha/tf-triage — explained in plain English

Analysis updated 2026-05-18

0GoAudience · ops devopsComplexity · 3/5LicenseSetup · moderate

TL;DR

A command line tool that uses an AI model to review Terraform plans for security risks and produce a plain English blast radius report.

Mindmap

mindmap
  root((tf-triage))
    What it does
      Reads terraform plan
      Runs security audit
      Rates blast radius
    Tech stack
      Go
      Terraform
      Ollama
    Use cases
      Review PR infra changes
      Catch IAM risks
      Red team plan analysis
    Audience
      Developers
      Ops devops
      Security teams

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Automatically review a Terraform pull request for security and architecture risks before it merges

REASON 2

Get a plain English blast radius rating for how risky an infrastructure change is

REASON 3

Run a fully local, private security review with no API key using Ollama

REASON 4

Hunt for chained misconfigurations across multiple resources using red team mode

What's in the stack?

GoTerraformOllamaOpenTofu

How it stacks up

balmha/tf-triage42wim/fabio42wim/go-xmpp
Stars0
LanguageGoGoGo
Last pushed2018-02-042020-01-24
MaintenanceDormantDormant
Setup difficultymoderatemoderatemoderate
Complexity3/53/53/5
Audienceops devopsops devopsdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Works fully offline with Ollama, or needs an API key exported as an environment variable to use a cloud provider.

You can use and modify the code, but any distributed version, including modified copies, must also be released under the same open license.

Wtf does this do

tf-triage is a command line tool written in Go that reviews Terraform or OpenTofu infrastructure plans using an AI model before you apply them. You pipe the output of a terraform plan command into it, and it sends a simplified version of your planned changes to a language model, then returns a Markdown report you can post directly as a comment on a pull request. The report covers three things: a short plain English summary of what the change actually does, a security and architecture review that looks for problems like overly broad permissions, resources exposed to the public internet, missing encryption, or gaps in logging, and a blast radius rating of low, medium, or high explaining how risky the change is if something goes wrong. You can choose which AI model answers these questions. Ollama runs entirely on your own computer for free with no API key and no plans ever leaving your machine, which suits sensitive infrastructure or offline use. Alternatively you can use a cloud provider such as Groq, DeepSeek, Gemini, Anthropic, or OpenAI by setting the matching API key as an environment variable, generally trading local privacy for faster or more capable analysis. There is also a more aggressive mode called red team mode. Instead of a general summary, it tries to think like an attacker, looking specifically for chains of misconfigurations across multiple resources that could be combined into a real attack path, and it can suggest concrete commands to verify whether a given exposure is real. Installing it is possible through Homebrew on macOS, a one line install script for Linux or macOS, Go's own install command, or building from source. The project is released under the GPL 3.0 license.

Yoink these prompts

Prompt 1
Walk me through installing tf-triage and running it locally with Ollama on my terraform plan
Prompt 2
Explain the difference between the normal tf-triage report and red team mode
Prompt 3
Show me how to pipe a terraform plan into tf-triage and post the report as a PR comment
Prompt 4
Help me configure tf-triage to use DeepSeek instead of the default local Ollama provider

Frequently asked questions

wtf is tf-triage?

A command line tool that uses an AI model to review Terraform plans for security risks and produce a plain English blast radius report.

What language is tf-triage written in?

Mainly Go. The stack also includes Go, Terraform, Ollama.

What license does tf-triage use?

You can use and modify the code, but any distributed version, including modified copies, must also be released under the same open license.

How hard is tf-triage to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is tf-triage for?

Mainly ops devops.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.