API Endpoints
80
Database Tables
12
Security Issues
73
Env Variables
209
Code Stats
Files Analyzed
1,159
Total Lines
194,753
Functions
4,876
Classes
485
Coverage
Docstrings
43.2%
Type Hints
33.7%
TODOs & Complexity
TODOs Found
14
Avg Complexity
12.9
Dead Code
2438
Missing Docs
2124
Security by Severity
Secrets by Category
DB_PASSWORD
124 refs
OPENAI_API_KEY
49 refs
AWS_ACCESS_KEY_ID
21 refs
AWS_SECRET_ACCESS_KEY
20 refs
PGPASSWORD
7 refs
ADMIN_TOKEN
6 refs
JWT_SECRET
6 refs
DATABASE_PASSWORD
4 refs
AUTHORIZED_EMAIL
4 refs
FLASK_SECRET_KEY
3 refs
STABILITY_API_KEY
3 refs
REPLICATE_API_TOKEN
3 refs
JWT_SECRETS
3 refs
SMTP_PASSWORD
2 refs
SECRET_ARN
2 refs
Filter:
| Severity | Category | File | Line | Message |
|---|---|---|---|---|
| MEDIUM | pickle_usage | advanced_caching.py | 230 | Pickle deserialization - potential code execution risk |
| HIGH | sql_injection | analyze_db_structure.py | 22 | Potential SQL injection vulnerability |
| HIGH | sql_injection | analyze_db_structure.py | 44 | Potential SQL injection vulnerability |
| HIGH | sql_injection | assign_iso3_codes.py | 666 | Potential SQL injection vulnerability |
| HIGH | sql_injection | audit_all_data_sources.py | 172 | Potential SQL injection vulnerability |
| HIGH | sql_injection | audit_db_quick.py | 28 | Potential SQL injection vulnerability |
| HIGH | sql_injection | audit_db_quick.py | 32 | Potential SQL injection vulnerability |
| HIGH | sql_injection | audit_postgres.py | 50 | Potential SQL injection vulnerability |
| HIGH | sql_injection | audit_postgres.py | 78 | Potential SQL injection vulnerability |
| HIGH | sql_injection | automated_fixes.py | 83 | Potential SQL injection vulnerability |
| HIGH | sql_injection | batch_import_cultures.py | 226 | Potential SQL injection vulnerability |
| HIGH | sql_injection | batch_import_cultures.py | 232 | Potential SQL injection vulnerability |
| HIGH | sql_injection | batch_import_cultures.py | 233 | Potential SQL injection vulnerability |
| HIGH | sql_injection | batch_import_cultures.py | 234 | Potential SQL injection vulnerability |
| HIGH | sql_injection | batch_import_cultures.py | 235 | Potential SQL injection vulnerability |
| CRITICAL | hardcoded_secret | cleanup_placeholders.py | 20 | Potential hardcoded secret detected |
| CRITICAL | hardcoded_secret | cloudshell_ready_sync.py | 30 | Potential hardcoded secret detected |
| HIGH | sql_injection | compare_cultures_schemas.py | 39 | Potential SQL injection vulnerability |
| HIGH | sql_injection | data_consistency.py | 71 | Potential SQL injection vulnerability |
| HIGH | sql_injection | db_utils.py | 154 | Potential SQL injection vulnerability |
| HIGH | sql_injection | db_utils.py | 214 | Potential SQL injection vulnerability |
| HIGH | sql_injection | db_utils.py | 317 | Potential SQL injection vulnerability |
| HIGH | sql_injection | deep_verify_data_quality.py | 75 | Potential SQL injection vulnerability |
| HIGH | sql_injection | deep_verify_data_quality.py | 79 | Potential SQL injection vulnerability |
| HIGH | sql_injection | deep_verify_data_quality.py | 83 | Potential SQL injection vulnerability |
| CRITICAL | hardcoded_secret | export_via_ssh_tunnel.py | 80 | Potential hardcoded secret detected |
| CRITICAL | hardcoded_secret | generate_celebration_overlays.py | 196 | Potential hardcoded secret detected |
| CRITICAL | hardcoded_secret | generate_celebration_overlays_enhanced.py | 249 | Potential hardcoded secret detected |
| MEDIUM | debug_mode | git_cleanup.py | 140 | Debug mode enabled - should be disabled in production |
| MEDIUM | debug_mode | git_fortification.py | 248 | Debug mode enabled - should be disabled in production |
| HIGH | sql_injection | identify_and_remove_test_cultures.py | 50 | Potential SQL injection vulnerability |
| HIGH | sql_injection | inspect_databases.py | 30 | Potential SQL injection vulnerability |
| HIGH | sql_injection | inspect_databases.py | 36 | Potential SQL injection vulnerability |
| HIGH | sql_injection | inspect_databases.py | 41 | Potential SQL injection vulnerability |
| CRITICAL | hardcoded_secret | lambda_minimal_sync.py | 18 | Potential hardcoded secret detected |
| CRITICAL | hardcoded_secret | lambda_vpc_sync.py | 20 | Potential hardcoded secret detected |
| CRITICAL | hardcoded_secret | migrate_dynamodb_to_postgres.py | 22 | Potential hardcoded secret detected |
| CRITICAL | hardcoded_secret | migrate_to_dynamodb.py | 116 | Potential hardcoded secret detected |
| CRITICAL | hardcoded_secret | migrate_to_dynamodb_compressed.py | 174 | Potential hardcoded secret detected |
| CRITICAL | hardcoded_secret | multi_ai_image_generator.py | 264 | Potential hardcoded secret detected |
| CRITICAL | hardcoded_secret | multi_ai_image_generator.py | 265 | Potential hardcoded secret detected |
| CRITICAL | hardcoded_secret | multi_ai_image_generator.py | 266 | Potential hardcoded secret detected |
| HIGH | sql_injection | production_validation.py | 32 | Potential SQL injection vulnerability |
| CRITICAL | hardcoded_secret | remove_test_cultures_db.py | 65 | Potential hardcoded secret detected |
| CRITICAL | hardcoded_secret | reset_admin_password.py | 14 | Potential hardcoded secret detected |
| HIGH | sql_injection | run_schema_migration.py | 69 | Potential SQL injection vulnerability |
| HIGH | sql_injection | run_schema_migration.py | 101 | Potential SQL injection vulnerability |
| CRITICAL | hardcoded_secret | sentry_improvement_loop.py | 34 | Potential hardcoded secret detected |
| HIGH | sql_injection | simple_test_3.py | 54 | Potential SQL injection vulnerability |
| CRITICAL | hardcoded_secret | ssm_sync.py | 32 | Potential hardcoded secret detected |
| CRITICAL | hardcoded_secret | sync_commands.py | 10 | Potential hardcoded secret detected |
| CRITICAL | hardcoded_secret | sync_public_db.py | 15 | Potential hardcoded secret detected |
| CRITICAL | hardcoded_secret | test_auth.py | 8 | Potential hardcoded secret detected |
| HIGH | sql_injection | test_culture_code_fix.py | 19 | Potential SQL injection vulnerability |
| CRITICAL | hardcoded_secret | test_image_generation.py | 78 | Potential hardcoded secret detected |
| CRITICAL | hardcoded_secret | test_single_import.py | 13 | Potential hardcoded secret detected |
| MEDIUM | cors_wildcard | unified_admin_api.py | 49 | CORS wildcard origin - consider restricting |
| MEDIUM | cors_wildcard | unified_admin_api_compressed.py | 63 | CORS wildcard origin - consider restricting |
| CRITICAL | hardcoded_secret | validate_deployment.py | 16 | Potential hardcoded secret detected |
| HIGH | sql_injection | db\backup_postgres_simple.py | 40 | Potential SQL injection vulnerability |
| HIGH | sql_injection | scripts\check_fk_constraints.py | 42 | Potential SQL injection vulnerability |
| HIGH | sql_injection | scripts\check_fk_constraints.py | 48 | Potential SQL injection vulnerability |
| HIGH | sql_injection | scripts\check_images_schema.py | 25 | Potential SQL injection vulnerability |
| HIGH | sql_injection | scripts\debug_fk_issue.py | 51 | Potential SQL injection vulnerability |
| HIGH | sql_injection | scripts\deep_audit.py | 322 | Potential SQL injection vulnerability |
| HIGH | sql_injection | scripts\find_fk_schema.py | 39 | Potential SQL injection vulnerability |
| HIGH | sql_injection | scripts\production_migrate.py | 188 | Potential SQL injection vulnerability |
| HIGH | sql_injection | tests\helpers.py | 22 | Potential SQL injection vulnerability |
| CRITICAL | hardcoded_secret | tests\helpers_jwt.py | 7 | Potential hardcoded secret detected |
| CRITICAL | hardcoded_secret | tests\test_admin_backend_docker.py | 17 | Potential hardcoded secret detected |
| HIGH | sql_injection | tests\test_admin_facets_and_reindex.py | 58 | Potential SQL injection vulnerability |
| HIGH | sql_injection | tests\test_data_consistency_extended.py | 56 | Potential SQL injection vulnerability |
| CRITICAL | hardcoded_secret | community-platform\backend\tests\api\test_auth.py | 207 | Potential hardcoded secret detected |
Method:
| Method | Path | Function | Auth | File |
|---|---|---|---|---|
| GET | / | dashboard | admin_backend.py | |
| GET | / | root | backend\main.py | |
| GET | /admin-only | admin_endpoint | community-platform\backend\app\core\security.py | |
| GET | /analytics | analytics_dashboard | admin_backend.py | |
| POST | /api/ai/assist | ai_assist | admin_backend.py | |
| POST | /api/auth/login | login | test_simple_auth.py | |
| POST | /api/community/feedback | submit_feedback | backend\routers\community_feedback.py | |
| GET | /api/community/feedback | list_feedback | backend\routers\community_feedback.py | |
| POST | /api/community/feedback/source_metadata | source_metadata | backend\routers\community_feedback.py | |
| GET | /api/community/feedback/stats | feedback_stats | backend\routers\community_feedback.py | |
| PATCH | /api/community/feedback/{fid} | update_feedback | backend\routers\community_feedback.py | |
| POST | /api/contribute | submit_contribution | contribution_server.py | |
| GET | /api/contributions | get_contributions | contribution_server.py | |
| PUT | /api/contributions/ |
update_contribution_status | contribution_server.py | |
| GET | /api/contributions/stats | get_contribution_stats | contribution_server.py | |
| GET | /api/culture/ |
api_get_culture | admin_backend.py | |
| PUT, PATCH | /api/culture/ |
api_update_culture | admin_backend.py | |
| GET | /api/culture/ |
get_culture | api_server.py | |
| GET | /api/culture/ |
get_culture | simple_api.py | |
| GET | /api/cultures | get_cultures | api_server.py | |
| GET | /api/cultures | get_cultures | production_api.py | |
| GET | /api/cultures | get_cultures | simple_api.py | |
| GET | /api/cultures/ |
get_culture | production_api.py | |
| GET | /api/health | health_check | production_api.py | |
| POST | /api/init | init_database | api_server.py | |
| GET | /api/regions | get_regions | production_api.py | |
| GET | /api/schema/fields | api_schema_fields | admin_backend.py | |
| GET | /api/search | search_cultures | api_server.py | |
| GET | /api/search | search_cultures | production_api.py | |
| GET | /api/search | search_cultures | simple_api.py | |
| GET | /api/search/diagnostics | search_diagnostics | search_api_routes.py | |
| POST | /api/search/reload-index | reload_search_index | search_api_routes.py | |
| GET | /api/search/stats | search_stats | search_api_routes.py | |
| GET | /api/search/suggestions | search_suggestions | search_api_routes.py | |
| GET | /api/search/v2 | search_cultures_v2 | search_api_routes.py | |
| GET | /api/v1/cultures | list_cultures | backend\main.py | |
| GET | /api/v1/cultures/{slug} | get_culture | backend\main.py | |
| GET | /api/v1/regions | list_regions | backend\main.py | |
| GET | /api/v1/stats | get_stats | backend\main.py | |
| POST | /approve_content/ |
approve_content | admin_backend.py | |
| GET | /backup | backup_data | admin_backend.py | |
| GET | /culture/ |
edit_culture | admin_backend.py | |
| GET | /cultures | culture_list | admin_backend.py | |
| GET | /cultures | list_cultures | api\api_cultures.py | |
| GET | /cultures/ |
get_culture | api\api_cultures.py | |
| GET | /cultures/ |
diff_culture | api\api_cultures.py | |
| PATCH | /cultures/ |
update_field | api\api_cultures.py | |
| GET | /cultures/ |
field_descriptions | api\api_cultures.py | |
| GET | /cultures/ |
culture_metrics | api\api_cultures.py | |
| GET, POST | /cultures/ |
culture_revisions | api\api_cultures.py | |
| GET | /cultures/ |
get_revision_snapshot | api\api_cultures.py | |
| GET | /cultures/ |
get_revision_diff | api\api_cultures.py | |
| POST | /cultures/ |
publish_revision | api\api_cultures.py | |
| POST | /cultures/ |
transition_revision_state | api\api_cultures.py | |
| GET | /cultures/ |
section_status | api\api_cultures.py | |
| GET | /cultures/ |
validate_culture | api\api_cultures.py | |
| GET, POST | /cultures/new | new_culture | admin_backend.py | |
| GET | /enrich | enrich_redirect | admin_backend.py | |
| GET | /enrichment | enrichment_dashboard | admin_backend.py | |
| GET | /export | export_data | admin_backend.py | |
| GET | /health | system_health | admin_backend.py | |
| GET | /health | health_check | contribution_server.py | |
| GET | /health | health | test_simple_auth.py | |
| GET | /health | health_check | backend\main.py | |
| GET | /locks/ |
get_locks | api\api_cultures.py | |
| POST | /locks/ |
acquire_lock | api\api_cultures.py | |
| POST | /locks/ |
release_lock | api\api_cultures.py | |
| GET, POST | /login | login | admin_backend.py | |
| GET | /logout | logout | admin_backend.py | |
| GET | /logs | view_logs | admin_backend.py | |
| GET | /oauth/callback/ |
oauth_callback | admin_backend.py | |
| GET | /oauth/callback/google | google_oauth_callback | admin_backend.py | |
| GET | /ping | ping | api\api_cultures.py | |
| GET | /review | content_review | admin_backend.py | |
| GET | /search | search_fields | api\api_cultures.py | |
| GET | /settings | system_settings | admin_backend.py | |
| POST | /submit_content | submit_content | admin_backend.py | |
| GET | /test | test | test_flask_minimal.py | |
| GET | /uploads/ |
uploaded_file | contribution_server.py | |
| GET | /validate | data_validation | admin_backend.py |
Culture
db\models.py
idInteger, primary_key=True
culture_nameString(255
culture_codeString(50
slugString(255
coreJSONB
historyJSONB
beliefs_and_valuesJSONB
healthJSONB
educationJSONB
communityJSONB
CulturalImage
db\models.py
idInteger, primary_key=True
culture_idInteger, ForeignKey("cultures.
image_typeString(50
image_urlText, nullable=False
alt_textText
captionText
sourceText
license_infoText
uploaded_atDateTime(timezone=True
CultureHealthProfile
db\models.py
idInteger, primary_key=True
culture_idInteger, ForeignKey("cultures.
country_idInteger, ForeignKey("countries
top_health_needsJSONB
top_causes_of_deathJSONB
communicable_diseasesJSONB
noncommunicable_diseasesJSONB
endemic_conditionsJSONB
recommended_screeningsJSONB
environmental_health_risksJSONB
Celebration
db\models.py
idInteger, primary_key=True
culture_idInteger, ForeignKey("cultures.
nameString(255
descriptionText
date_typeString(50
fixed_dateString(50
significanceText
traditionsText
created_atDateTime(timezone=True
Language
db\models.py
idInteger, primary_key=True
language_nameString(255
iso_639_1String(2
iso_639_3String(3
language_familyString(255
created_atDateTime(timezone=True
Region
db\models.py
idInteger, primary_key=True
region_nameString(255
region_typeString(50
parent_region_idInteger, ForeignKey("regions.i
created_atDateTime(timezone=True
Country
db\models.py
idInteger, primary_key=True
country_nameString(255
iso_alpha_2String(2
iso_alpha_3String(3
iso_numericString(3
created_atDateTime(timezone=True
Source
db\models.py
idInteger, primary_key=True
source_nameString(255
source_typeString(100
urlText
descriptionText
reliability_scoreInteger
created_atDateTime(timezone=True
CultureCountry
db\models.py
idInteger, primary_key=True
culture_idInteger, ForeignKey("cultures.
country_idInteger, ForeignKey("countries
CultureLanguage
db\models.py
idInteger, primary_key=True
culture_idInteger, ForeignKey("cultures.
language_idInteger, ForeignKey("languages
is_primaryBoolean, default=False
CultureRegion
db\models.py
idInteger, primary_key=True
culture_idInteger, ForeignKey("cultures.
region_idInteger, ForeignKey("regions.i
CultureSource
db\models.py
idInteger, primary_key=True
culture_idInteger, ForeignKey("cultures.
source_idInteger, ForeignKey("sources.i
sectionString(100
Secrets & Credentials (36)
ADMIN_DIAGNOSTICS_TOKEN
2 files
ADMIN_JWT_SECRET
1 files
ADMIN_PASSWORD_HASH
1 files
ADMIN_TOKEN
6 files
AUTHORIZED_EMAIL
4 files
AUTHORIZED_PASSWORD
1 files
AUTH_DB_PATH
2 files
AWS_ACCESS_KEY_ID
21 files
AWS_SECRET_ACCESS_KEY
20 files
CLOUDFLARE_API_TOKEN
1 files
CS_AWS_ACCESS_KEY_ID
1 files
CS_AWS_SECRETS_FILE
1 files
CS_AWS_SECRET_ACCESS_KEY
1 files
DATABASE_PASSWORD
4 files
DB_PASSWORD
124 files
FLASK_SECRET_KEY
3 files
JWT_KEYS_DIR
1 files
JWT_SECRET
6 files
JWT_SECRETS
3 files
KMS_KEY_ALIAS
1 files
KMS_KEY_ARN
1 files
KMS_KEY_ID
1 files
NETLIFY_AUTH_TOKEN
1 files
OPENAI_API_KEY
49 files
PGPASSWORD
7 files
POSTGRES_PASSWORD
1 files
PUBLIC_ADMIN_PASSWORD_HASH
1 files
REPLICATE_API_TOKEN
3 files
SECRET_ARN
2 files
SENTRY_API_TOKEN
1 files
SENTRY_AUTH_TOKEN
1 files
SMTP_PASSWORD
2 files
SMTP_SECRET_NAME
1 files
SOCKETIO_ENFORCE_AUTH
1 files
STABILITY_API_KEY
3 files
WHO_CAUSE_KEYWORDS
1 files
Configuration (173)
ADMIN_EMAIL
1 files
ALERT_EMAIL
1 files
ALLOW_PLACEHOLDER
1 files
API_CACHE_SECONDS
1 files
API_TIMEOUT
1 files
AUDIT_LOG_TABLE
1 files
AWS_DEFAULT_REGION
17 files
AWS_REGION
5 files
AWS_S3_BUCKET
1 files
AZURE_STORAGE_ACCOUNT
1 files
BACKUP_AZURE_CONTAINER
1 files
BACKUP_GCS_BUCKET
1 files
BACKUP_S3_BUCKET
1 files
BACKUP_S3_REGION
1 files
BASE_URL
4 files
CANONICAL_BASE
1 files
CI
1 files
CLOUDFLARE_ZONE_ID
1 files
CLOUDFRONT_DISTRIBUTION_ID
1 files
CLOUDFRONT_URL
1 files
CLUSTER_ARN
2 files
COMMUNITY_FEEDBACK_LOG
3 files
CORS_ORIGIN
1 files
CORS_ORIGINS
3 files
CS_API_HOST
1 files
CS_BUCKET
3 files
CS_CLOUDFRONT_DIST
1 files
CS_COMPLETION_RATE_PER_1K
2 files
CS_CORE_GZIP_LIMIT_KB
1 files
CS_CORE_PAYLOAD_LIMIT_KB
1 files
CS_CORE_WARN_PCT
1 files
CS_DB_DSN
1 files
CS_DISCORD_USERNAME
1 files
CS_DISCORD_WEBHOOK
1 files
CS_HASH_CHURN_LIMIT_PCT
1 files
CS_HASH_CHURN_WARN_PCT
1 files
CS_NOTIFICATIONS_ENABLED
1 files
CS_NOTIFY_FAILURE
1 files
CS_NOTIFY_PERFORMANCE
1 files
CS_NOTIFY_START
1 files
CS_NOTIFY_SUCCESS
1 files
CS_PROMPT_RATE_PER_1K
2 files
CS_SLACK_CHANNEL
1 files
CS_SLACK_ICON
1 files
CS_SLACK_USERNAME
1 files
CS_SLACK_WEBHOOK
1 files
CS_SQLITE_PATH
1 files
CULTURES_DATA_DIR
1 files
CULTURES_DB_PATH
9 files
CULTURES_INDEX_PATH
1 files
Most Complex Files
| File | Complexity | Functions | Lines | Docstrings |
|---|---|---|---|---|
| realtime_manager.py | 309 | 38 | 1,146 | 70% |
| website-astro\scripts\generate_cultures_index.py | 179 | 15 | 901 | 27% |
| mega_scan_and_fix.py | 133 | 27 | 947 | 79% |
| jwt_manager.py | 132 | 24 | 623 | 33% |
| scripts\cultural_data_analytics.py | 125 | 26 | 901 | 63% |
| country_to_culture_mapper.py | 110 | 17 | 1,097 | 78% |
| search_engine.py | 109 | 22 | 820 | 88% |
| admin_backend.py | 100 | 46 | 983 | 68% |
| search_api_routes.py | 88 | 8 | 243 | 88% |
| api\api_cultures.py | 87 | 25 | 566 | 12% |
| predeploy_check.py | 84 | 11 | 426 | 18% |
| website-astro\scripts\export_cultures_json.py | 82 | 9 | 410 | 11% |
| project_health_dashboard.py | 75 | 13 | 610 | 86% |
| openai_utils.py | 73 | 12 | 380 | 62% |
| scripts\enrich_pipeline.py | 70 | 14 | 511 | 64% |
| high_quality_generate_cultural_images.py | 69 | 14 | 660 | 94% |
| tools\quality_summary.py | 69 | 8 | 324 | 0% |
| scripts\progressive_asset_optimizer.py | 68 | 8 | 469 | 78% |
| test_culture_mapping_ux.py | 65 | 12 | 394 | 77% |
| scripts\generate_country_to_region.py | 65 | 8 | 365 | 0% |