Skip to main content

PosturaNet

Fixes cloud security issues without breaking prod.

PosturaNet is a source-available remediation agent for AWS, with Terraform, CloudFormation (and SAM), CDK and Pulumi. It takes a security finding, locates the owning code 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.5.5 is on PyPI: GitLab end to end (fix merge requests, the contract check as a commit status and MR note, post-merge verify and revert), plans that delete data are blocked unless a human allows them, and an SBOM with signed provenance on every release.

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

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 --s3-bucket <tf-state-bucket> > policy.json  # read-only IAM policy; 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.

On GitLab, set delivery.provider: gitlab and GITLAB_TOKEN: the fix opens as a merge request instead (gitlab.com or self-managed), verify reads the merge request and opens a revert MR on a regression, and contract check --gitlab-comment <MR> keeps one result note on it (posturanet connect gitlab sets up the CI job).

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

Before data is deleted. With a plan, the check also blocks any change that deletes or replaces a database, bucket, volume, key or VPC, or turns off deletion protection or backups, until a person lists it in contracts.allow_destroy. In Claude Code, the plugin asks you before an agent runs terraform destroy, apply -auto-approve or an AWS CLI delete.

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

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

8. Share outcomes (opt-in, off by default)

PosturaNet sends nothing about your fixes unless you turn this on. With it on, each posturanet verify that ends CONFIRMED or REGRESSED sends one record with five fields, so we can learn which fixes break production across customers:

{"control":"EC2.19","fix_type":"sg_ingress","outcome":"held","evidence_days":3,"agent_version":"0.3.0"}

Never sent: resource ids, ARNs, IPs, account ids, names, code, Terraform state, contracts or finding text. A control id that isn't in the SERVICE.N form is not sent at all. See exactly what would go out before you turn it on:

posturanet verify owner/repo#123 --repo infra/ --format json > run.json
posturanet outcomes preview run.json                             # prints the record; sends nothing

To turn it on, add to .posturanet.yml:

outcome_share:
  enabled: true
  endpoint: https://outcomes.posturanet.com/api/outcomes   # PosturaNet's receiver; required, there is no default

The receiver is receiver/: it keeps counters of those five fields and nothing else, and its README says how it's deployed. Sending is best-effort: a timeout or no network prints a warning and never changes verify's exit code.

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 the vendor's API as JSON (commands); CSV exports are refused controls the export names, plus your own detectors.<vendor>.rules mapping

Run several scanners? Pass all their files: posturanet findings list securityhub.json prowler.ocsf.json. The same control on the same resource is listed once, with the other scanners noted, and findings split writes one file for it. PRs are keyed on the control and the Terraform address, so a problem gets one PR whichever scanner reported it, including Checkov and Trivy.

Wiz, Orca, Prisma Cloud and other platforms can also forward findings to Security Hub, but with their own rule names. PosturaNet doesn't map those forwarded findings to controls, so they show as none; pass the vendor's own JSON export (above) instead. posturanet connect wiz (or orca, prisma) prints the steps.

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, no AI model, and no customer data sent anywhere:

Where PosturaNet runs: inside your environment, with only the opt-in outcome share 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
docs/compare.md How PosturaNet compares with scanners, CNAPPs and AWS remediation plans
docs/security-questionnaire.md Pre-filled answers for vendor security reviews: access, data, AI, supply chain
docs/check-fix-prs.md Make the contract check a required check on every fix PR: Wiz, Prowler, Gomboc, coding agents or people
integrations/ GitHub Action, CI and per-agent setup

Team features (PosturaNet Pro)

Everything above is free. A Team license key (the separate posturanet-pro package) adds:

Feature What it does
Living contracts contract refresh proposes contract updates from new evidence as PRs; contract live opens an issue when a live resource drifts from its contract
Signed audit evidence evidence record keeps a hash-chained, signed record of each fix; evidence export writes OSCAL for SOC 2, ISO 27001, CIS AWS or NIST 800-53. evidence verify is free
Runs on new findings an EventBridge rule starts posturanet dispatch in your GitHub Actions when Security Hub reports a failed finding
Slack notify slack posts each run's outcome
Org-wide contract gate one config, required on every repository by a GitHub organization ruleset

The key is checked offline and sends nothing. See posturanet.com/docs/license and pricing.

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.5.5

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.5.5
File Size Uploaded Provenance Actions
posturanet-0.5.5.tar.gz 461.5 kB With provenance Details for posturanet-0.5.5.tar.gz

Built distribution (wheel)

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

Total release size: 820.5 kB

Release files / posturanet-0.5.5.tar.gz

Download URL posturanet-0.5.5.tar.gz
Size 461.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f9d7101386b038f72c75d8de3553ee65320390413dc55d29f8e9057a76324501
BLAKE2b-256 checksum
How to use checksums
270aafb1551eea339b3eb271e3397c46a5f3ce9ccfc297fd1433e3af9d53249b
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 28, 2026.

Transparency log

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

Download URL posturanet-0.5.5-py3-none-any.whl
Size 359.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fdeb8124b9d1b3f0953799a005b8fe3ffce8ed53c23e08c1cef355cd9877f15c
BLAKE2b-256 checksum
How to use checksums
a9a8ef5825ca648a2f1ad9fab84b93ddae30ef5bbdb73a9d36be5792c481dea3
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 28, 2026.

Transparency log

Security for posturanet 0.5.5

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.5.5.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 28, 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