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. See integrations/.
Status: early access (0.2.0). Security groups, S3 public access, IAM least privilege and 52 settings controls.
Install
pip install posturanet # add [mcp] for the MCP server: pip install "posturanet[mcp]"
posturanet init # prints the read-only IAM policy PosturaNet needs
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
Cursor, Codex, Copilot, Gemini, Windsurf, Cline, Kiro, Continue, Zed, Goose and other MCP clients: see integrations/agents/.
Python 3.11+. If your shell can't find posturanet (common with the Microsoft Store Python on Windows), run python -m posturanet instead. The GitHub Action is Mihirajmera/posturanet/action@v0.2.0; see integrations/.
See it
Recorded from real runs against the synthetic fixtures in tests/fixtures/ (regenerate with python docs/media/make.py).
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:
An IAM policy with ec2:*. Shrunk to the three actions IAM's last-accessed data shows in use, with every unknown spelled out:
A person or an AI agent puts the wildcard back. The contract check blocks the edit and says which contract line it breaks:
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 (setup per agent):
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.
With a read-only role: drop --dry-run to read flow logs and run terraform plan, then add --open-pr. Before changing a security group, S3 bucket policy or IAM policy, run posturanet contract check --plan plan.json, or --source for an offline check of the edited HCL (exit 5 means BLOCK).
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.
- 52 more controls as attribute fixes: settings that remove no access, like RDS deletion protection, DynamoDB point-in-time recovery, KMS key rotation, CloudTrail log validation and the IAM password policy. No evidence needed; same plan-scope checks.
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
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 |
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.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| posturanet-0.2.0.tar.gz | 201.9 kB | With provenance | Details for posturanet-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| posturanet-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for posturanet-0.2.0-py3-none-any.whl |
Total release size: 372.6 kB
Release files / posturanet-0.2.0.tar.gz
| Download URL | posturanet-0.2.0.tar.gz |
|---|---|
| Size | 201.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7fa0b72cd10f6020981177e537e05c08115af0d9f5c5975d2dd66a51ac7d1a66
|
|
BLAKE2b-256 checksum How to use checksums |
b8b145845e88158bf809e6cd079e7c33df070e70fa0a0b9b364a0c91a5204cf1
|
| 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 7, 2026.
Transparency logRelease files / posturanet-0.2.0-py3-none-any.whl
| Download URL | posturanet-0.2.0-py3-none-any.whl |
|---|---|
| Size | 170.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c6256bd04ffdec3cdd0b272ead213ea96f12dabab932c7034631f25e55958a33
|
|
BLAKE2b-256 checksum How to use checksums |
119b69f6061f1d3ef3d236ca303c92728b46171bf3f503f19e0d27528b03ab77
|
| 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 7, 2026.
Transparency logSecurity for posturanet 0.2.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.
Attestation for posturanet-0.2.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 7, 2026.
Transparency logA 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.