cloud-custodian/cloud-custodian

Rules engine for cloud security, cost optimization, and governance, DSL in yaml for policies to query, filter, and take actions on resources

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 21 minutes ago
Added to GitGenius on October 17th, 2024
Created on March 1st, 2016
Open Issues & Pull Requests: 1,739 (+0)
Number of forks: 1,644
Total Stargazers: 6,052 (+0)
Total Subscribers: 164 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 14.0 days
Mean response time: 255.7 days
90th percentile: 854.3 days
Tracked items: 531

How this project is maintained

Around half of the issues opened in the past year never receive a reply. 74% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. Work labelled "kind/bug" is answered fastest, typically in about 8 days, while "provider/aws" waits about 29 months. 48% of tracked open issues have had no activity in three months. Only 8% of issues opened in the past year have been closed.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 1,204
New in 7 days: 12
Closed in 7 days: 4
Avg open age: 1,574 days
Stale 30+ days: 1,153
Stale 90+ days: 1,125

Recent activity

Opened in 7 days: 10
Closed in 7 days: 3
Comments in 7 days: 0
Events in 7 days: 4

Top labels

  • kind/enhancement (1,163)
  • kind/bug (819)
  • kind/question (449)
  • provider/azure (378)
  • provider/aws (275)
  • status/0-triage (132)
  • area/docs (131)
  • area/actions (126)

Detailed Description

Cloud Custodian, also known as c7n, is a rules engine for managing public cloud accounts and resources across AWS, Azure, GCP, Kubernetes, OCI, and Tencent Cloud. Written in Python, it enables organizations to define policies in simple YAML configuration files that query, filter, and take actions on cloud resources to enforce security, compliance, and cost optimization requirements. The project consolidates ad-hoc cloud management scripts into a unified, lightweight tool with integrated metrics and reporting capabilities.

The core functionality revolves around policy definition and execution. Users specify policies for particular resource types such as EC2 instances, S3 buckets, ASGs, Redshift clusters, CosmosDB, or Pub/Sub topics, constructing them from a vocabulary of filters and actions with support for arbitrary filtering using nested boolean conditions. Policies can be validated and executed in dry-run mode before enforcement. Cloud Custodian automatically provisions serverless functions and event sources native to each cloud provider, including AWS CloudWatch Events and Config Rules, Azure EventGrid, and GCP AuditLog and Pub/Sub, enabling real-time policy enforcement. Alternatively, it can run as a scheduled cron job against large existing resource fleets. The tool supports multi-account, multi-subscription, and multi-project deployments and includes intelligent caching to minimize API calls.

The project maintains a comprehensive suite of additional tools extending its capabilities. These include c7n-org for multi-account policy execution, c7n-left for shift-left security by running policies against infrastructure-as-code assets like Terraform, c7n-policystream for tracking policy changes through git history, Salactus for scaled S3 scanning, c7n-mailer for user notifications, c7n-trailcreator for retroactive resource tagging from CloudTrail, TrailDB for CloudTrail indexing, c7n-logexporter for CloudWatch log export, Cask for Docker-based execution, c7n-guardian for multi-account GuardDuty setup, and Omni SSM for EC2 Systems Manager automation.

The repository shares contributors with major projects including Microsoft VSCode, Microsoft TypeScript, and Rust-lang/Rust, indicating cross-pollination with the broader open-source ecosystem.

The project provides cloud provider-specific getting started guides for AWS, Azure, and GCP, with comprehensive documentation, community meetings, and multiple communication channels including Slack, Gitter, mailing lists, Reddit, and StackOverflow. The project maintains active security practices with a dedicated security team and adheres to the CNCF Code of Conduct.