Skip to main content

PosturaNet

Fixes cloud security issues without breaking prod.

PosturaNet is a source-available remediation agent for AWS + Terraform. It takes a security finding, locates the owning Terraform and team, learns what actually uses the resource from flow logs and CloudTrail, records that as a behavior contract, and opens a pull request with the smallest fix that keeps every observed behavior working. It runs in your CI with a read-only role and never changes production.

It also checks every security group, S3 and IAM policy change, written by a person or an AI agent, against those contracts before it merges: a PosturaNet contract check on PRs, a step in any CI, a Claude Code plugin, and MCP setups for Cursor, Codex, Copilot, Gemini, Windsurf, Cline, Kiro, Continue, Zed and Goose.

Status: early access. 0.3.0 is on PyPI: connect, outcomes, exceptions, runbooks and approval at the terminal are new.

88 controls: security groups, S3 public access and IAM least privilege from usage evidence, plus 74 settings controls. Findings from Security Hub, Prowler, Checkov or Trivy.

posturanet: the logo and every command with an example

Get started

Each step has a command you can copy as written. Every command also prints its own examples: posturanet <command> --help.

1. Install

pip install posturanet            # add the MCP server for coding agents: pip install "posturanet[mcp]"
posturanet                        # every command, with an example

Python 3.11+. If your shell can't find posturanet (common with the Microsoft Store Python on Windows), run python -m posturanet instead.

2. Give it a read-only role

posturanet init > policy.json     # the read-only IAM policy PosturaNet needs; attach it to a role

PosturaNet only reads: flow logs, CloudTrail, IAM last-accessed data, S3 settings and access logs, and Terraform state. It never calls a mutating AWS API, and a person merges every PR.

3. Connect your scanner, coding agent and CI

posturanet connect                # everything PosturaNet works with
posturanet connect prowler        # the exact commands for one of them
posturanet connect cursor --write --repo .    # add the MCP server and rule to this repo
posturanet connect github --write --repo .    # add the PR check workflow

--write never overwrites a file you already have, and adds to an existing AGENTS.md instead of replacing it.

posturanet connect

4. See what your findings end in

prowler aws --output-formats json-ocsf --output-directory prowler-out/
posturanet findings list prowler-out/<file>.ocsf.json --all

Every failed finding gets an outcome: fix (PosturaNet opens a PR), runbook (steps for a person, such as root MFA), exception (a risk your team accepted) or none yet. The top line shows your coverage.

posturanet findings list with outcomes and coverage

Accepted a risk? Put it in .posturanet/exceptions.yaml with an owner and an expiry date. When it expires, the finding comes back.

exceptions:
  - control: S3.8
    resource: acme-assets          # leave out to cover every resource for this control
    owner: web-team
    reason: public website bucket behind CloudFront
    expires: 2027-03-31

For a runbook: posturanet fixes show IAM.6 prints the steps.

5. Fix one

posturanet findings split prowler-out/<file>.ocsf.json --out findings/   # one file per finding
posturanet fix findings/EC2.13-sg-0a91f3c2.json --dry-run --repo infra/  # see the fix; no AWS, writes nothing
posturanet fix findings/EC2.13-sg-0a91f3c2.json --repo infra/            # read evidence, run terraform plan
posturanet fix findings/EC2.13-sg-0a91f3c2.json --repo infra/ --open-pr  # open the PR when every check passes

If anything is missing (no evidence, an unclear owner, a check that fails), PosturaNet stops, says why and what to do next, and opens no PR.

A security group with SSH open to the internet. PosturaNet reads 89 days of flow logs, keeps the four sources that really connect, drops a one-off scanner, flags the outside partner for review, and proposes the smallest change:

posturanet fix on a security group

An IAM policy with ec2:*. Shrunk to the three actions IAM's last-accessed data shows in use, with every unknown spelled out:

posturanet fix on an IAM policy

6. Approve what the evidence can't show

Some things only a person can confirm. For example, IAM doesn't record S3 object reads, so PosturaNet can't tell whether s3:GetObject is used. When you run fix at a terminal, it asks you about each item and shows the before and after. Only then does it ask Approve this change?. Your answers go into the contract and the PR says who approved it. Nothing is ever asked in CI, pipes, JSON output or agent hooks.

approving an IAM fix at the terminal

7. Keep it fixed

posturanet contract check --source --repo infra/                 # check an edit against the contracts (exit 5 = BLOCK)
terraform show -json plan.out > plan.json && posturanet contract check --plan plan.json   # the same in CI, from a plan
posturanet verify owner/repo#123 --repo infra/                   # after merge: did the fix hold?

A person or an AI agent puts the wildcard back. The contract check blocks the edit and says which contract line it breaks:

posturanet contract check blocking an edit

Inside a coding agent. With the Claude Code plugin, this is what Claude is told right after its edit, so it fixes its own change before going on. Other agents get the same result from the MCP tool check_change:

the PosturaNet hook reply to Claude Code

In Claude Code, add the plugin (skill, MCP server and a hook that checks every .tf edit):

/plugin marketplace add Mihirajmera/posturanet
/plugin install posturanet@posturanet

Try it offline (no AWS)

From a clone of this repo:

pip install -e ".[dev]"
posturanet fix tests/fixtures/findings/sg_ssh_open.json --dry-run \
  --repo tests/fixtures/tf/basic --evidence-file tests/fixtures/flows/bastion_90d.json

This reads a synthetic finding, finds the Terraform block and its owner, builds a behavior contract from 89 days of synthetic flow logs, computes the smallest rule set with Z3, and prints the diff. Nothing is written. The recordings above come from the same fixtures (python docs/media/make.py).

From your scanner

PosturaNet doesn't detect; it fixes what your scanner already found. It reads findings from:

Scanner Output to pass Controls PosturaNet can fix from it
AWS Security Hub ASFF JSON, or OCSF from aws securityhub get-findings-v2 / EventBridge all 88
Security Hub remediation plans posturanet findings pull-plans (read-only) the plan's linked controls PosturaNet fixes, as one PR per plan
Prowler prowler aws --output-formats json-ocsf (or its ASFF output) 72, from Prowler's own mapping to Security Hub controls
Checkov checkov -d . -o json 52, from 56 Checkov checks
Trivy trivy config -f json . 31, from 36 Trivy checks

Wiz, Orca, Prisma Cloud and other platforms can send findings to Security Hub, but with their own rule names. PosturaNet doesn't map those to controls yet, so they show as none.

A Security Hub remediation plan targets one resource and groups the exposures one fix would close. PosturaNet reads the controls those exposures link, fixes the ones it supports on that resource as one change (for example RDS.2+RDS.8: no public access and deletion protection), and opens one PR for the plan. AWS's own guidance text is shown to you but never used to write the change.

Checkov and Trivy read your code, so their findings name a Terraform address. PosturaNet finds the deployed resource for that address in the Terraform state; a resource that isn't applied yet stops with a clear reason. Each Checkov and Trivy check was mapped by hand after reading the check's source, and a check that isn't mapped is listed as unsupported, never guessed (src/posturanet/ingest/iac_checks.json).

What it fixes

  • Security group ingress (EC2.13, 14, 18, 19, 53, 54): replaces open rules with the sources seen in VPC flow logs, checked with Z3 against a behavior contract.
  • S3 public access and IAM least privilege (IAM.1, IAM.21): from S3 access logs and IAM last-accessed data, with the same contracts.
  • 74 settings controls: settings like RDS deletion protection and backups, DynamoDB point-in-time recovery, KMS key rotation, CloudTrail log validation, OpenSearch encryption and the IAM password policy. No evidence needed; same plan-scope checks, so a setting that would replace the resource stops instead. The ones that can affect a client (public access on RDS, Redshift and EKS, public IPs on launch templates and ECS services, IMDSv2, ECR tag immutability, S3 ACLs, KMS on S3 and SNS) are marked risk: medium and say what to check before merging.
  • Runbooks for 8 controls that aren't a Terraform change (root MFA, root access keys, key rotation, unused credentials, MFA for users, the security contact).
posturanet fixes list               # every control and what it changes
posturanet fixes show RDS.8         # one control in detail
posturanet fix tests/fixtures/findings/rds_deletion_protection.json --dry-run --repo tests/fixtures/tf/config

How it works

From finding to pull request. Nine stages, each a plain function. Any stage that lacks what it needs stops with the reason and the next step, and no PR is opened:

PosturaNet pipeline: ingest, locate, evidence, contract, synthesize, validate, deliver, you merge, verify, record

Every later change is checked. The contract records what must keep working. A change by a person or an AI coding agent is checked against it in the agent, over MCP, or in CI:

PosturaNet contract check: a change goes through the Claude Code hook, MCP or CI, and comes out PASS, UNKNOWN or BLOCK

It runs where your code runs. A read-only role, your own LLM if you use one, and no customer data sent anywhere:

Where PosturaNet runs: inside your environment, with only an optional license heartbeat leaving it

Diagrams are drawn by python docs/media/diagrams.py; the full design is in docs/02_ARCHITECTURE_AND_DATA.md. What's next: reports/coverage-roadmap.md.

Project docs

Doc Purpose
docs/01_PRD.md Product requirements: what we build, with FR/NFR IDs
docs/02_ARCHITECTURE_AND_DATA.md Architecture, data models, schemas, queries
AGENTS.md Rules for AI coding agents, and for PosturaNet's own runtime agent
docs/04_DESIGN_SYSTEM.md CLI, PR, check-run and brand design system
integrations/ GitHub Action, CI and per-agent setup

License

Functional Source License 1.1, Apache 2.0 future license (FSL-1.1-ALv2).

  • You can use PosturaNet for free in your own company, read the code, change it and run it in your CI, including for clients if you provide services.
  • You can't offer it, or a product built from it, as a competing commercial product or service.
  • After two years each release becomes Apache 2.0, with no restrictions.

"PosturaNet" is a trademark: forks must use another name. Paid features ship separately in posturanet-pro.

Metadata

Release files for posturanet 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for posturanet 0.3.0
File Size Uploaded Provenance Actions
posturanet-0.3.0.tar.gz 253.6 kB With provenance Details for posturanet-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for posturanet 0.3.0
File Interpreter ABI Platform Actions
posturanet-0.3.0-py3-none-any.whl Python 3 none any Details for posturanet-0.3.0-py3-none-any.whl

Total release size: 478.3 kB

Release files / posturanet-0.3.0.tar.gz

Download URL posturanet-0.3.0.tar.gz
Size 253.6 kB
Tags Source
SHA-256 checksum
How to use checksums
08c069461f72469a8e4df849ca0f63ac11deb7a079faa127e03e714fc3e1dfd4
BLAKE2b-256 checksum
How to use checksums
c25e7db498ed5e6e58f977c6753ff4eadad86713df096df6a4dfd6606e9e72cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

Release files / posturanet-0.3.0-py3-none-any.whl

Download URL posturanet-0.3.0-py3-none-any.whl
Size 224.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f564a562e25ceaf11e50d8a9bf32df402dc9a565b2614bb2d0007015bc5e593d
BLAKE2b-256 checksum
How to use checksums
41d747933eccb2fb6a03f72fc3384fd03488dca9b55ec2cc518e40b301e01665
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

Security for posturanet 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for posturanet-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page