Analyze software architecture for fault tolerance, scalability, security, and observability issues
Project description
infracheck
Analyze software architecture for common design issues before they become production incidents.
infracheck reviews your infrastructure configuration and scores it across four categories:
- Fault Tolerance: DLQs, retries, Multi-AZ, backup policies, S3 versioning, ECS deployment health, SNS redrive policies
- Scalability: autoscaling, read replicas, ECS service scaling, SQS receive count limits
- Security: public access, open ingress, exposed databases, IMDSv2, EC2 public IPs, S3 and RDS encryption, Lambda secrets in env vars
- Observability: CloudWatch alarms, log groups, X-Ray tracing, log retention, ALB access logging, CloudTrail integration, VPC flow logs, ECS Container Insights, RDS enhanced monitoring, S3 access logging
Usage
pip install infracheck-cli
infracheck ./infra
AI explanations
Pass --explain to have Claude generate a specific Terraform fix for each failing check:
infracheck ./infra --explain
Filter to a single category to focus the output:
infracheck ./infra --explain security
infracheck ./infra --explain fault_tolerance
infracheck ./infra --explain scalability
infracheck ./infra --explain observability
Requires an Anthropic API key - get one at console.anthropic.com:
export ANTHROPIC_API_KEY=sk-ant-...
JSON output
Pass --output json (or -o json) for machine-readable output:
infracheck ./infra --output json
infracheck ./infra --output json --explain security | jq '.overall_score'
Status messages are written to stderr so they don't pollute the JSON stream.
Configuration
| Environment variable | Default | Description |
|---|---|---|
ANTHROPIC_API_KEY |
- | Required to use --explain |
INFRACHECK_MODEL |
claude-opus-4-6 |
Claude model used for explanations |
INFRACHECK_MAX_TOKENS |
4096 |
Max tokens for explanation output |
INFRACHECK_PATH |
./infra |
Default path if none is specified |
Checks
Fault Tolerance
| Rule ID | Severity | What is checked |
|---|---|---|
sqs_dlq_configured |
high | SQS queue has a dead-letter queue |
rds_multi_az_enabled |
high | RDS instance has Multi-AZ enabled |
rds_backup_retention |
medium | RDS backup retention is at least 7 days |
rds_deletion_protection |
medium | RDS instance has deletion protection enabled |
lambda_dlq_configured |
medium | Lambda function has a dead-letter queue |
dynamodb_pitr_enabled |
medium | DynamoDB table has point-in-time recovery enabled |
s3_versioning_enabled |
medium | S3 bucket has versioning enabled |
ecs_min_healthy_percent |
high | ECS service keeps at least 50% of tasks running during deployments |
sns_topic_dlq_configured |
medium | SNS topic has a redrive policy |
Scalability
| Rule ID | Severity | What is checked |
|---|---|---|
autoscaling_configured |
medium | At least one autoscaling group is defined |
autoscaling_elb_health_check |
high | ASGs attached to a load balancer use ELB health checks |
lambda_reserved_concurrency |
high | Lambda function has a reserved concurrency limit |
rds_read_replicas |
low | RDS primary instance has at least one read replica |
elasticache_automatic_failover |
medium | ElastiCache replication group has automatic failover enabled |
elasticache_backup_retention |
medium | ElastiCache cluster retains snapshots for at least 1 day |
elasticache_cluster_size |
medium | ElastiCache replication group has at least 2 nodes |
load_balancer_cross_zone |
medium | NLB/GWLB has cross-zone load balancing enabled |
ecs_service_autoscaling |
medium | ECS service has Application Auto Scaling configured |
sqs_max_receive_count |
medium | SQS queue DLQ maxReceiveCount is at least 3 |
Security
| Rule ID | Severity | What is checked |
|---|---|---|
s3_public_access_blocked |
high | S3 bucket has all public access settings blocked |
rds_not_publicly_accessible |
high | RDS instance is not publicly accessible |
security_group_open_ingress |
high | Security group has no open ingress on sensitive ports |
ec2_imdsv2_required |
high | EC2 instance requires IMDSv2 |
ec2_no_public_ip |
medium | EC2 instance has no public IP assigned |
s3_encryption_enabled |
medium | S3 bucket has server-side encryption configured |
rds_storage_encrypted |
high | RDS instance has storage encryption enabled |
lambda_no_secrets_in_env |
medium | Lambda env vars contain no obvious secret keys |
Observability
| Rule ID | Severity | What is checked |
|---|---|---|
cloudwatch_alarms_exist |
medium | At least one CloudWatch alarm is defined |
lambda_log_group_exists |
medium | Each Lambda function has a CloudWatch log group |
lambda_xray_tracing |
medium | Lambda function has X-Ray tracing enabled |
log_group_retention_set |
medium | CloudWatch log groups have a retention period |
alb_access_logging_enabled |
medium | ALB has access logging enabled |
cloudtrail_cloudwatch_integration |
high | CloudTrail trail is integrated with CloudWatch Logs |
vpc_flow_logs_enabled |
high | Each VPC has flow logs enabled |
ecs_container_insights_enabled |
medium | ECS cluster has Container Insights enabled |
rds_enhanced_monitoring |
low | RDS instance has enhanced monitoring enabled |
s3_server_access_logging_enabled |
low | S3 bucket has server access logging enabled |
Supported inputs
- AWS Terraform resources - supported
- GCP Terraform resources - planned
- draw.io diagrams - planned
- Architecture images - planned
Why not just use Checkov or tfsec?
Checkov and tfsec are great tools but they focus almost entirely on security misconfigurations. infracheck is different in a few ways:
- Broader scope - covers fault tolerance, scalability, and observability, not just security
- Architecture scoring - gives each category a score so you can track improvement over time
- AI explanations - uses Claude to explain why a check failed and how to fix it, in plain language
- Simpler output - designed to be readable by developers, not just security engineers
Status
Under active development.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file infracheck_cli-0.1.0.tar.gz.
File metadata
- Download URL: infracheck_cli-0.1.0.tar.gz
- Upload date:
- Size: 14.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e86ed925dfc69107490af93a4caf3de5ae6b5c181347fd53a6736d8507b99fe2
|
|
| MD5 |
9cf02b9b28c97c7534d6cebbe6751785
|
|
| BLAKE2b-256 |
061db950906e048de6e55948460344bd7bd5873972b26885aed4581d3070f1bf
|
Provenance
The following attestation bundles were made for infracheck_cli-0.1.0.tar.gz:
Publisher:
publish.yml on richlinds/infracheck
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
infracheck_cli-0.1.0.tar.gz -
Subject digest:
e86ed925dfc69107490af93a4caf3de5ae6b5c181347fd53a6736d8507b99fe2 - Sigstore transparency entry: 1549409440
- Sigstore integration time:
-
Permalink:
richlinds/infracheck@34cdb4a28c33298777955c030b023177ee6dba50 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/richlinds
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@34cdb4a28c33298777955c030b023177ee6dba50 -
Trigger Event:
push
-
Statement type:
File details
Details for the file infracheck_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: infracheck_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 22.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
552ae99b446fcd5fbdd1bd375c9dd5505ba2fa50f9dc0560a8216f933abcfac5
|
|
| MD5 |
d7c5894d4c207b6fe595be07a6bb44be
|
|
| BLAKE2b-256 |
017d6df643bd941d6f28ea14d62779d3a36abc732bfae379dd2223d886370595
|
Provenance
The following attestation bundles were made for infracheck_cli-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on richlinds/infracheck
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
infracheck_cli-0.1.0-py3-none-any.whl -
Subject digest:
552ae99b446fcd5fbdd1bd375c9dd5505ba2fa50f9dc0560a8216f933abcfac5 - Sigstore transparency entry: 1549409471
- Sigstore integration time:
-
Permalink:
richlinds/infracheck@34cdb4a28c33298777955c030b023177ee6dba50 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/richlinds
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@34cdb4a28c33298777955c030b023177ee6dba50 -
Trigger Event:
push
-
Statement type: