# salesforce/policy_sentry

IAM Least Privilege Policy Generator

Repository: https://github.com/salesforce/policy_sentry
Canonical: https://ross.abutalabs.com/products/policy_sentry
Homepage: https://policy-sentry.readthedocs.io/
Language: Python
License: MIT
License Family: permissive
Topics: aws, iam, cloud, security, cloudsecurity, iam-policy, aws-security, salesforce, hacktoberfest
Last push: 2026-08-16T15:09:57+00:00

## Health v2 (maintenance only)
Score: 88/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 67, longevity 100
- inputs: {"age_days": 2540, "days_push": 17, "days_rel": 142, "gap_med": 52, "n_releases_24m": 6}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2166, forks 156 (observed 2026-08-28T04:06:21.375071+00:00)

## What it is
Policy Sentry is a Python CLI tool and library that generates least-privilege AWS IAM policies. It automates writing security-conscious IAM policies by looking up AWS actions, resources, and condition keys instead of hand-crafting them.

## Use cases
- generate least privilege IAM policies for AWS roles
- avoid writing AWS IAM policies by hand
- scope IAM policies to specific resource ARNs
- query the AWS IAM actions, resources, and condition keys database
- audit and tighten overly permissive IAM policies
- integrate IAM policy generation into Terraform or CI pipelines

## When to choose
- you write AWS IAM policies for users, roles, or infrastructure as code
- your team wants to enforce least-privilege access on AWS
- you need programmatic or CLI-based IAM policy generation

## When to avoid
- you work with clouds other than AWS
- you need general cloud security posture management rather than IAM policy authoring

## Facets
- artifact type: cli-tool
- maturity: stable
- function: security, developer-tools, cli, infrastructure-as-code
- domain: security, cloud-computing, developer-tools
- platform: cli, python, cross-platform
- tags: aws, iam, least-privilege, iam-policy, cloud-security, policy-generation, devops, docker

## Member repositories
- salesforce/policy_sentry (main) score 88

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:21.375071+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:49:57.233710+00:00, confidence not recorded.
  - readme: https://github.com/salesforce/policy_sentry (fetched 2026-08-28T04:06:21.375071+00:00, sha b6583071c935)
  - registry_pypi: https://pypi.org/pypi/policy_sentry/json (fetched 2026-08-29T10:30:18.382592+00:00, sha 201255bdb84e)
- Data as of 2026-08-30T08:39:29.467469+00:00.
