Policy Sentry
0.16.0 open-sourceThe section your link pointed to isn't on Policy Sentry's page any more, so we've brought you to the top.
Policy Sentry is an AWS IAMAWS IAMAWS Identity and Access Management is Amazon's service for controlling who and what can call AWS APIs, by attaching policies that allow or deny actions on resources. Cyber tools use it to scope credentials to least privilege. least privilege policy generator that creates scoped IAMIAMIdentity and Access Management — a framework of policies and services for controlling who can authenticate to systems and what resources they are authorized to use, letting cyber tools enforce least-privilege and audit access. policies based on resource ARNs and access levels.
policy_sentry query action-table --service '*'
from policy_sentry.shared.read_policy import PolicySentryReadPolicy
p = PolicySentryReadPolicy("policy.yaml")
links = p.get_all_actions_links()
print(links["s3:ListBucket"])
policy_sentry query action-table --resource-type s3
policy-sentry write-policy --fmt yaml
get_actions_that_support_wildcard_arns_only(service="all")
policy_sentry initialize --build
policy_sentry initialize --fetch
policy_sentry query --action-service s3 --access-levels PermissionsManagement
policy_sentry query --output-type yaml
from policy_sentry.querying.crud import get_crud_template_dict
template = get_crud_template_dict()
print(template['role_arn'])
role_arn: arn:aws:iam::123456789012:role/my-role
tagging:
- Key: Environment
Value: Prod
from policy_sentry.database.connection import connect_db
db_session = connect_db('bundled')
policy_sentry initialize --fetch
policy_sentry write-policy --access-levels write --service deepracer
policy_sentry write-policy --actions signer:signJob --file policy.json
policy_sentry initialize --yaml-file ./my-custom-overrides.yml
policy_sentry download-policies
policy_sentry command download-policies --account-id <ACCOUNT_ID>
policy_sentry command analyze-iam-policies <DIRECTORY_PATH>
Summary
Policy Sentry is an open-source AWS IAM least-privilege policy generator, auditor, and analysis database, run as a command-line tool built on Python. It compiles the AWS IAM documentation on actions, resources, and condition keys into a queryable database, then uses that to write IAM policies scoped to specific ARNs and access levels rather than wildcard permissions, taking input from YAML templates, a list of actions, or Terraform output. It is aimed at cloud security engineers and infrastructure-as-code teams who would otherwise write or review IAM policies by hand, limiting blast radius after credential compromise. First committed in 2019, it remains active, with 42 contributors and 82 commits in the past year across 10 tracked releases.
Policy Sentry is an AWS IAM least privilege policy generator that creates scoped IAM policies based on resource ARNs and access levels.
How Policy Sentry helps
Which actions in this policy grant more access than the role actually needs?
checks each action against the resource types and access levels declared in the template and writes a policy scoped to the specific ARNs and CRUD level requested, instead of a wildcard grant
Which IAM actions actually support the resource type I'm trying to restrict access to?
queries the compiled database of AWS IAM actions, resources, and condition keys and lists the actions that support that resource type, without needing to search the AWS documentation by hand
Can I turn my Terraform output into a least-privilege policy instead of writing one from scratch?
reads the Terraform output and generates a policy scoped to the ARNs it finds there, rather than defaulting to wildcard resources
What access level does this list of IAM actions actually add up to?
takes a plain list of actions or CRUD levels and writes the corresponding least-privilege policy, so the reader can see the access level implied before attaching it to a role
Which actions across every AWS service fall under a given access level, like permissions management?
queries the action table by service and access level and lists every matching action, so the reader can audit which actions could escalate or modify permissions
Does a role's policy still work if I explicitly deny the risky actions instead of only allowing the safe ones?
generates policies that include deny statements alongside allow rules, so least-privilege can be expressed as explicit restrictions rather than only narrowed grants
Languages
Command line
No command matches.
| option | found in | since | description |
|---|
Values are placeholders taken from each option’s declared default. Nothing is executed here — the output shown is a recording of a run that already happened.
Score card
-
Shipping velocity releases a month, last 12 months
-
Documentation quality release-notes rubric, 0–100
-
Breaking-change discipline how rarely a release breaks users, and notice given
-
Maintenance risk quiet time against its own cadence, maintainers
-
Innovation & surface new capabilities, API and MCP surface
- Community health
-
Contributor trend distinct committers, this year against last
-
Maintainer concentration bus factor now against a year ago
-
Issue backlog trend issues closed per issue opened, 12 months
-
Responsiveness median time to a maintainer’s first reply
Nine scores for Policy Sentry, each built from the releases, notes and API history this site tracks — and, on Researcher and Business, where it stands among every measured tool in its category and how that has moved.
Score cards are part of every paid plan.
See plans → Already subscribed? Sign in →Trajectory
Blank means never measured; nothing here is a filled-in zero.
Peer standings are included with Researcher and Business. See how this tool ranks against its competitors, using data we don't publish anywhere else.
See plans →Each score is 0–100 on a published rubric, derived from data this site already shows. A dimension we cannot measure says so — it is never scored 0 and never enters a rank.
How this is scored
- Shipping velocity — releases a month over the last 12 months, on a log scale where 16 a month scores 100. Needs 3 releases in the window.
- Documentation quality — the release-notes rubric published on the analytics page, unchanged.
- Breaking-change discipline — the share of releases carrying a breaking change (none scores 100, half or more scores 0). Only projects that label breaking changes are measured: a clean record cannot be told from an unlabelled one.
- Maintenance risk — quiet time measured against the tool's own release cadence (quiet longer than 90 days and three typical gaps scores 0), plus the number of active maintainers and whether contributors are growing, where known. Higher is lower risk.
- Innovation & surface — new capabilities in the feature ledger this year, API and MCP operations added, and the share of commits that are features: the mean of whichever we hold.
- Community health (open-source tools only) — each is a direction, not a size: contributors this year against last, the bus factor now against a year ago, and issues closed per issue opened, where steady scores 50, doubled 100 and halved 0; plus the median time to a maintainer's first reply (an hour scores about 100, a month or more 0). A commercial card has no repository and carries none of the four.
- Documented delivery (commercial tools) — when a vendor's documented new capabilities have slowed against its own baseline, that counts against the overall standing as heavily as two low dimensions. Steady delivery, or too little history to judge, leaves the standing alone; it is never a sixth score.
- Open-source tools are scored on repository signals; commercial tools on their published changelog. Ranks compare tools within one category and one profile and need at least five measured peers; the overall standing needs three ranked dimensions. Best-in-breed or consolidator is a shape, not a quality, and is never scored.
Release-note detail over time
See how much detail Policy Sentry puts in its release notes, quarter by quarter, and compare it with tracked tools in the same category. This history uses up to ten retained, reviewed notes per tool; sparse or blank older quarters may reflect that limit.
Checking release-note history…
Releases
29 entries
No entries match these filters.
- April 20261
- December 20251
- January 20251
- July 20242
- July 20213
- December 20202
- November 20202
- October 20202
- March 20201
- February 20202
- January 20204
- December 20191
- November 20193
- October 20194
Project health
Issue, contributor and maintainer activity in salesforce/policy_sentry, 2023-10 – 2026-09, as of 2026-09-25. Twelve-month figures first; the trend lines run the whole window.
- Contributors 6 +2 vs prior 12 months
- Maintainers 2 +2 joined · −2 left, last 12 months
- Bus factor 1 committers behind half the commits
- Community-filed 100% of issues opened, last 12 months
- Median time to close 4.3 years first maintainer reply 7.3 hours
- Open backlog 5 of 165 issues ever filed
- Issues opened / month 0 · 0 communitymaintainers
- Open backlog 5
- Contributors / month 0
- Commits / month 0
- Stars 2,169
- other 100%
Counts from the project's public repository and git history; no individuals are identified. Maintainers are the committers covering 80% of the last year's commits. how we measure this
Add the badge to your README
Maintain this project? The badge links readers straight to this page, so they can follow every release here.