One finding, start to finish.
Follow PosturaNet as it handles a Security Hub finding for SSH open to the internet. Scroll, and each step plays on the right.
- 01
Finding
Reads the finding as data. Instructions hidden in finding text are ignored and logged.
HIGHAWS Security Hub · EC2.19Security groups should not allow unrestricted access to ports with high risk
resourcesg-0a91f3c2account123456789012 · us-east-1ruleingress tcp/22 from 0.0.0.0/0Read as data: instructions inside finding text are ignored and logged.
- 02
Locate
Matches the group in Terraform state, follows the module to file and line, finds the owner.
terraform statemodule.bastionmodules/bastion/main.tf:5@acme/platform-network1resource "aws_security_group" "this" { 2 name = "bastion" 3 vpc_id = var.vpc_id 4 ingress { 5 cidr_blocks = ["0.0.0.0/0"] 6 from_port = 22 7 to_port = 22
- 03
Evidence
Queries 90 days of VPC flow logs with read-only calls to see who actually connects.
90 days of VPC flow logs · read-only queries
CI runnerstcp/22 from 10.0.4.0/240VPNtcp/22 from 10.0.9.12/320Officetcp/22 from 192.0.2.10/3200 other sources on tcp/22 in 90 days
- 04
Contract
Records the behavior that must keep working. Rare sources are flagged for a human.
# posturanet/contracts/sg-bastion.yml resource: module.bastion.aws_security_group.this evidence: { source: vpc_flow_logs, window: 90d } must_allow: - { proto: tcp, port: 22, from: 10.0.4.0/24 } - { proto: tcp, port: 22, from: 10.0.9.12/32 } - { proto: tcp, port: 22, from: 192.0.2.10/32 } must_deny: - { proto: tcp, port: 22, from: 0.0.0.0/0 }
A file your team owns and approves. Rare sources are flagged for a human.
- 05
Fix
A solver computes the smallest rule set that keeps every must_allow. The LLM never decides.
modules/bastion/main.tfZ3 · sat · 3 rules- cidr_blocks = ["0.0.0.0/0"]+ cidr_blocks = ["10.0.4.0/24", "10.0.9.12/32", "192.0.2.10/32"]The smallest rule set that keeps every must_allow. A solver computes it; the LLM only explains it.
- 06
Validate
fmt, validate, plan scope, contract invariants and a re-check. All must pass.
terraform fmt -checkterraform validateplan scope: 1 resource, update in placecontract: 3/3 must_allow kept, 1/1 must_denyEC2.19 re-check passesAny failure stops the run. No PR.
- 07
Pull request
Opens one PR for the owning team. Post-merge verification comes with Team.
Ready for review+1 −1 · 1 filefix(sg): restrict SSH on bastion (EC2.19) #142
- Evidence 90 days, 99% ENI coverage, confidence high
- Validation 5 of 5 checks passed
- Residual risk a source last seen over 90 days ago would lose access
Review requested from @acme/platform-network
Security groups should not allow unrestricted access to ports with high risk
Read as data: instructions inside finding text are ignored and logged.
Example data.
“I don't know” beats a confident wrong fix.
If PosturaNet can't be sure who owns a resource or what uses it, it stops, opens no PR, and tells you exactly what's missing.