Reference AccuracyMenu

Reference

Accuracy

How what Infraglass reports compares with facts written by hand, on recorded output of the real AWS provider. This page is generated from the tests (go test ./internal/accuracy -update), and CI fails if it no longer matches what Infraglass does.

What this measures, and what it doesn't

  • Real provider output, emulated API. The fixtures are Terraform 1.17.2 with the real hashicorp/aws provider 6.74.0, applied to LocalStack 4.14.0, an AWS emulator, by scripts/gen-aws-fixtures.sh. Attribute names and shapes are the provider's own. Values the API computes come from LocalStack, which can differ from AWS. Resources LocalStack's free edition can't create (a load balancer, a database, an HTTP API) are only planned, never applied.
  • One stack. About 80 resources covering a VPC, security groups in both rule styles, IAM roles, users and policies of every kind, DynamoDB, Lambda, S3, KMS, SQS and secrets. It's a check of the cases it covers, not a measure of every configuration.
  • Expectations written first. Each fixture's expected facts were written from the configuration before Infraglass ran on it. Where Infraglass disagreed, the code was fixed, or the difference is listed below with its reason.
  • Not security assurance. It checks that Infraglass reads correctly what the configuration declares. Access is still observed from policy text, not effective permissions: conditions, Deny statements, permission boundaries and SCPs aren't evaluated.

Results

Fixture What it is Expected facts Found Missed False alarms
state.json the stack after it was created 83 83 0 0
plan_create.json everything new, before any ID exists 42 42 0 0
plan_change.json a table replaced, an instance resized, a queue deleted, a policy widened 12 12 0 0
plan_drift.json RDP opened and a tag added outside Terraform 18 18 0 0
apply_change.jsonl the change applied, failing part-way through the table replace 7 7 0 0
All 162 162 0 0

By category

Category What it checks Expected Found Missed False alarms
action planned action per resource 13 13 0 0
actions planned action counts 1 1 0 0
can-access what a role's evaluated policies reach 5 5 0 0
drift resources changed outside Terraform 2 2 0 0
finding access, exposure and data-protection findings 23 23 0 0
gateway internet, NAT and endpoint gateways 3 3 0 0
index DynamoDB secondary indexes 2 2 0 0
main-route-table a VPC's main route table 2 2 0 0
outcome what happened to each planned change in a run 7 7 0 0
placed which subnet a resource sits in 12 12 0 0
replaced-because a replacement's cause is shown 2 2 0 0
resource-policy resource-based policies, public or not 3 3 0 0
risk what to review first 9 9 0 0
role-attached managed policies attached to a role 5 5 0 0
role-policy a role's policies and whether each is evaluated 8 8 0 0
route routes and their targets 3 3 0 0
runs-as what runs as a role 3 3 0 0
sg-ingress security group inbound rules 10 10 0 0
sg-used-by what uses a security group 2 2 0 0
stream-consumer DynamoDB stream consumers 1 1 0 0
subnet public or private subnets 12 12 0 0
table DynamoDB keys 2 2 0 0
table-reader who can read a table 2 2 0 0
table-ref what refers to a table 2 2 0 0
table-setting DynamoDB billing, streams, TTL, backups, encryption 20 20 0 0
table-writer who can write a table 2 2 0 0
trust who can assume a role 6 6 0 0

Known misses and false alarms

None at the moment. Each one the fixtures found was fixed; the changelog lists them.

Reproducing it

./scripts/gen-aws-fixtures.sh            # needs Docker; never touches a real AWS account
go test ./internal/accuracy -update      # rewrites this page from the results

The expected facts are in testdata/fixtures/aws/expected/, one per line, with the format explained at the top of state.txt. A new case starts there: add it to the configuration, write what Infraglass should report, then regenerate.

Improve this page on GitHub · Report a problem