PAGES
← all tools
◆ Cloud Security Posture

Policy Sentry

0.16.0 open-source

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.

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

all 17 features, with the evidence for each →

Languages

Not documented

Features

17 capabilities · 3 backed by code, an API document or a real run

Built from Policy Sentry's releases, docs, README and our own runs. “Seen” marks the month we first spotted a release the vendor didn't date. Group names and tags are our labels.

Compare with peers →

What Policy Sentry offers you

  • Command-line interface11
  • Scripting language support2
  • CSV data export1
  • JSON data export1
  • Offline mode1
  • Python scripting support1
  • Scripting API1
All capabilities 17 capabilities
Write-policy template generation verified Generates IAM policy write templates in either actions or CRUD format, selectable via a template-type option. 9 releases · 9 other sources · first seen Oct 2019

Also counts toward: Python scripting support, Scripting API, Scripting language support

release 9 total

  • Supports Deny effect in generated IAM policies, enabling least-privilege deny statements alongside allow rules. 0.16.0 · Apr 2026 · source · release history
  • Adds support for creating multiple policies in the same folder using the Terraform module 0.11.11 · Jul 2021 · source · release history
  • terraform module now supports generating multiple IAM policies in a single folder 0.11.14 · Jul 2021 · source · release history
  • Adds allow_multiple_policies_in_same_folder option to the Policy Sentry Terraform module to output multiple policies to one directory 0.11.12 · Jul 2021 · source · release history
  • Modifies the template structure to allow easy additions of wildcard-only actions with access levels specific to services. 0.7.1 · Feb 2020 · source · release history
  • Changes default output casing to UpperCamelCase for human readability; --minimize flag on write-policy retains lowercase. 0.7.1 · Feb 2020 · source · release history

command line

  • --template-type — Type of write_policy template to create - actions or CRUD. Case insensitive. 0.11.3 · Dec 2020 · command-line history

example 8 total

  • Generate an IAM policy in YAML format for easier human review or CI/CD pipeline consumption. policy-sentry write-policy --fmt yaml 0.9.0 · Oct 2020 · source
  • Update an existing YAML template to use the new tagging key instead of tag. role_arn: arn:aws:iam::123456789012:role/my-role tagging: - Key: Environment Value: Prod 0.6.7 · Jan 2020 · source
  • Programmatically generate an IAM policy template using the new Python API functions. from policy_sentry.querying.crud import get_crud_template_dict template = get_crud_template_dict() print(template['role_arn']) 0.6.7 · Jan 2020 · source
  • Use Policy Sentry programmatically in Python without needing external HTML dependencies from policy_sentry.database.connection import connect_db db_session = connect_db('bundled') 0.6.4 · Jan 2020 · source
  • Generate IAM policies for AWS DeepRacer, Signer, or EventBridge actions that were previously unsupported. policy_sentry write-policy --access-levels write --service deepracer 0.5.1 · Oct 2019 · source
  • Create a CRUD policy template file policy_sentry create-template --output-file crud.yml --template-type crud
IAM action and resource-type lookup verified Lists IAM actions available for a given AWS service or resource type, with optional filtering by service and resource type. 9 releases · 7 other sources · first seen Oct 2019

Also counts toward: Command-line interface

release 9 total

  • Updates the IAM actions database with the latest AWS service definitions. 0.16.0 · Apr 2026 · source · release history
  • Updates the bundled IAM actions database with the latest AWS service catalog data. 0.15.1 · Dec 2025 · source · release history
  • Updates the bundled IAM actions database to reflect the latest AWS service changes. 0.14.0 · Jan 2025 · source · release history
  • Adds the query subcommand to retrieve structured service data (e.g., actions, resources, conditions) managed by Policy Sentry 0.12.14 · Jul 2024 · source · release history
  • Updates the underlying IAM permission database for coverage of new AWS services and changes v0.10.0 · Nov 2020 · source · release history
  • --resource-type flag added to policy_sentry query action-table command 0.9.1 · Oct 2020 · source · release history

command line

  • --resource-type — Supply a resource type to show a list of all IAM actions that support the resource type. 0.11.3 · Dec 2020 · command-line history
  • --service — Filter according to AWS service. 0.11.3 · Dec 2020 · command-line history

example

  • Query all actions across every service using the wildcard to quickly audit the full action table. policy_sentry query action-table --service '*' 0.14.0 · Jan 2025 · source
  • Retrieve all actions supporting wildcard ARNs across every AWS service without listing them individually. get_actions_that_support_wildcard_arns_only(service="all") 0.7.2.1 · Mar 2020 · source
  • Find actions that are exclusively wildcard-only (e.g., s3:PutAccountPublicAccessBlock) for S3 at a specific access level. policy_sentry query --action-service s3 --access-levels PermissionsManagement 0.6.9 · Jan 2020 · source
  • Analyze all IAM policy files contained within a specific directory. policy_sentry command analyze-iam-policies <DIRECTORY_PATH> 0.4.3 · Oct 2019 · source
  • Query actions by service and access level policy_sentry query action-table --service ram --access-level permissions-management
IAM policy database download and caching shipped Downloads AWS IAM managed and customer-managed policies into a local configuration directory for offline access and analysis. 7 releases · 5 other sources · first seen Oct 2019

Also counts toward: Command-line interface, Offline mode

release 7 total

  • Updates database via GitHub Actions 0.11.11 · Jul 2021 · source · release history
  • Adds --build flag to initialize to manually rebuild the database 0.6.11 · Jan 2020 · source · release history
  • Adds --fetch flag to initialize to build using latest AWS docs 0.6.11 · Jan 2020 · source · release history
  • Adds support for Python package usage via db_session = connect_db('bundled') which eliminates the need to build the database from HTML docs 0.6.4 · Jan 2020 · source · release history
  • Adds --recursive support to the download-policies command for bulk IAM policy retrieval across multiple AWS accounts. 0.6.0 · Nov 2019 · source · release history
  • New download-policies subcommand that downloads AWS managed and customer-managed IAM policies to ~/.policy_sentry/account-id/aws-managed or ~/.policy_sentry/account-id/customer-managed 0.4.5 · Oct 2019 · source · release history

example

  • Rebuild the policy database from local files. policy_sentry initialize --build 0.6.11 · Jan 2020 · source
  • Download and build using the latest AWS documentation. policy_sentry initialize --fetch 0.6.11 · Jan 2020 · source
  • Initialize the local policy database with the latest IAM service definitions automatically, avoiding manual updates. policy_sentry initialize --fetch 0.6.2 · Dec 2019 · source
  • Download current AWS IAM policies to local cache for offline analysis policy_sentry download-policies 0.4.5 · Oct 2019 · source
  • Fetch the latest AWS managed IAM policies for a specific account to use in your local analysis workspace. policy_sentry command download-policies --account-id <ACCOUNT_ID> 0.4.3 · Oct 2019 · source
Enhanced policy analysis reporting shipped Provides comprehensive analysis output in multiple formats (CSV, JSON, Markdown) with customizable filtering for role exclusion and false positive reduction. 4 releases · 2 other sources · first seen Nov 2019

Also counts toward: Command-line interface, CSV data export, JSON data export

release

  • Python 3.9 is no longer supported; upgrading requires Python 3.10 or later. 0.15.1 · Dec 2025 · source · release history
  • Python 3.8 is no longer supported; upgrading requires Python 3.9 or later. 0.14.0 · Jan 2025 · source · release history
  • Enables the new analyze subcommand (renamed from analyze-iam-policy) which outputs comprehensive reports in CSV, raw JSON, and optional Markdown formats. 0.6.0 · Nov 2019 · source · release history
  • Introduces custom report configuration and role exclusion filtering in the analyze functionality to reduce false positives across multiple risk categories. 0.6.0 · Nov 2019 · source · release history

example

  • Programmatically discover the official documentation for any AWS service action without manual lookup. from policy_sentry.shared.read_policy import PolicySentryReadPolicy p = PolicySentryReadPolicy("policy.yaml") links = p.get_all_actions_links() print(links["s3:ListBucket"]) 0.11.3 · Dec 2020 · source
  • Export query results in YAML format for use in pipelines or documentation. policy_sentry query --output-type yaml 0.6.9 · Jan 2020 · source
Minimized policy generation shipped Generates IAM policies with minimized action and resource lists, optionally limited by length. 3 releases · 1 other source · first seen Oct 2020

Also counts toward: Command-line interface

release

  • Scopes dependent actions to matching resource types instead of wildcard, producing tighter least-privilege policies automatically. 0.16.0 · Apr 2026 · source · release history
  • Adds --minimize boolean flag and --minimize-length <value> argument to the policy-sentry minimize command to optionally limit the length of generated IAM policies v0.10.0 · Nov 2020 · source · release history
  • Minimization is improved by grouping results based on ARNs for write-policy 0.9.1 · Oct 2020 · source · release history

docs

  • Generates least-privilege AWS IAM policies from resource ARNs and access levels using an IAM actions database.
IAM database loading performance optimization shipped Optimizes the performance of loading the IAM database. 3 releases · first seen Jan 2020

Also counts toward: Command-line interface

release

  • Improves IAM DB loading performance. 0.13.0 · Jul 2024 · source · release history
  • initialize command is now optional, allowing the CLI to run without pre-initialized database files. 0.7.0 · Feb 2020 · source · release history
  • initialize command now completes instantly by default 0.6.11 · Jan 2020 · source · release history
Flexible policy format handling shipped Supports YAML policy files with missing standard access level blocks and expands CRUD mode support to actions that cannot be restricted by specific ARNs. 3 releases · first seen Oct 2019

Also counts toward: Command-line interface

release

  • write-policy now supports the --fmt yaml flag to output IAM policies in YAML format 0.9.0 · Oct 2020 · source · release history
  • The --crud flag for the write-policy command is removed; Policy Sentry now auto-detects the format. 0.7.0 · Feb 2020 · source · release history
  • Supports YML files with missing access level blocks (e.g., excluding Tagging or Permissions Management) 0.4.5 · Oct 2019 · source · release history
IAM condition table querying shipped suggested Enables direct querying of the IAM database to retrieve valid conditions for specific actions. 2 releases · 1 other source · first seen Nov 2019

Suggested capability: Data access governance. This is our guess, not confirmed.

Also counts toward: Command-line interface

release

  • The download-policies command is removed from the CLI. 0.7.0 · Feb 2020 · source · release history
  • Adds policy_sentry query condition-table command to query the IAM database directly. 0.5.4 · Nov 2019 · source · release history

example

  • Get details on a specific condition key policy_sentry query condition-table --service cloud9 --name cloud9:Permissions
Custom IAM access level overrides shipped Allows users to define and apply custom YAML-based access level rules that override upstream AWS documentation during initialization or analysis. 2 releases · 1 other source · first seen Oct 2019

Also counts toward: Command-line interface

release

  • initialize command now accepts a custom YML file argument to provide user-defined access level overrides 0.5.0 · Oct 2019 · source · release history
  • Added policy_sentry/shared/data/access-level-overrides.yml containing preloaded AWS IAM access level override rules 0.5.0 · Oct 2019 · source · release history

example

  • Apply local access level overrides instead of relying solely on upstream AWS documentation by passing a custom YAML file during initialization. policy_sentry initialize --yaml-file ./my-custom-overrides.yml 0.5.0 · Oct 2019 · source
Wildcard ARN action discovery shipped Identifies actions that exclusively or optionally support wildcard resource ARNs for specific or all services. 2 releases · first seen Mar 2020

release

  • Expands the capability of * wildcard querying against the action table, enabling broader action lookups. 0.14.0 · Jan 2025 · source · release history
  • get_actions_that_support_wildcard_arns_only and get_actions_at_access_level_that_support_wildcard_arns_only now accept all as the service parameter to scan every AWS service prefix. 0.7.2.1 · Mar 2020 · source · release history
Service action documentation lookup shipped Retrieves official AWS IAM Action metadata and hyperlinks for any service action. 2 releases · first seen Dec 2020

release

  • Adds get_all_actions_links method to retrieve the URL of every AWS IAM Action 0.11.3 · Dec 2020 · source · release history
  • Adds the get_api_documentation_link_for_action query to retrieve hyperlinked AWS IAM Action metadata 0.11.2 · Dec 2020 · source · release history
Extended resource policy analysis shipped suggested Identifies API calls that modify resource-based policies and provides audit reports on potential credential exposures. 2 releases · first seen Nov 2019

Suggested capability: Data access governance. This is our guess, not confirmed.

Also counts toward: Command-line interface

release

  • Adds overrides-resource-policies.yml to specifically identify API calls that modify resource based policies 0.6.2 · Dec 2019 · source · release history
  • analyze command now includes a credentials-exposure.txt audit file in its output 0.5.5 · Nov 2019 · source · release history
Granular AWS service support expansion shipped Extends the tool's capability to cover additional AWS services including DeepRacer, Signer, and EventBridge. 1 release · 1 other source · first seen Oct 2019

release

  • Adds deepracer, signer, and eventbridge to the list of supported services 0.5.1 · Oct 2019 · source · release history

example

  • Write policies covering AWS Signer actions to enable code-signing workflows. policy_sentry write-policy --actions signer:signJob --file policy.json 0.5.1 · Oct 2019 · source
Python 3.13 support shipped Supports Python 3.13 runtime. 1 release · first seen Jul 2024

Also counts toward: Scripting language support

release

Verbose output mode verified Enables verbose CLI output for more detailed command results. 1 other source · first seen Dec 2020

Also counts toward: Command-line interface

command line

IAM resource ARN table querying shipped Enables direct querying of the IAM database to retrieve valid resource ARNs for specific AWS services. 1 release · first seen Nov 2019

Also counts toward: Command-line interface

release

  • Adds policy_sentry query arn-table command to query the IAM database directly. 0.5.4 · Nov 2019 · source · release history
IAM actions discovery by permission management scope shipped Lists all permissions-management actions available across AWS services. 1 other source

example

  • List all permissions-management actions across services policy_sentry query action-table --service all --access-level permissions-management

Lines in monospace are the tool's own words: help text parsed from its source, or an endpoint from its API document. Under release, a line is our summary of a dated release. Under docs, it is quoted from the tool's own documentation or website. Each links back to the source it came from.

Score card

  1. Shipping velocity releases a month, last 12 months
  2. Documentation quality release-notes rubric, 0–100
  3. Breaking-change discipline how rarely a release breaks users, and notice given
  4. Maintenance risk quiet time against its own cadence, maintainers
  5. Innovation & surface new capabilities, API and MCP surface
  6. Community health
  7. Contributor trend distinct committers, this year against last
  8. Maintainer concentration bus factor now against a year ago
  9. Issue backlog trend issues closed per issue opened, 12 months
  10. 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 →

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…

Explore the full chart →

Releases

Show

29 entries

  1. April 20261
  2. December 20251
  3. January 20251
  4. July 20242
  5. July 20213
  6. December 20202
  7. November 20202
  8. October 20202
  9. March 20201
  10. February 20202
  11. January 20204
  12. December 20191
  13. November 20193
  14. October 20194
    Show

    29 entries

    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.

    1. Contributors 6 +2 vs prior 12 months
    2. Maintainers 2 +2 joined · −2 left, last 12 months
    3. Bus factor 1 committers behind half the commits
    4. Community-filed 100% of issues opened, last 12 months
    5. Median time to close 4.3 years first maintainer reply 7.3 hours
    6. Open backlog 5 of 165 issues ever filed
    1. Issues opened / month 0 · 0 communitymaintainers
    2. Open backlog 5
    3. Contributors / month 0
    4. Commits / month 0
    5. Stars 2,169
    Issue themes, last 12 months
    • 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.

    Tracked by Cyber Toolchain Choose a badge style and copy the code →
    browse all tools → score card for your toolchain →