sample_id
stringlengths
21
196
text
stringlengths
105
936k
metadata
dict
category
stringclasses
6 values
config:canary0076:api_key:rep4
"""Django settings for dashboard project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "H6g%J)vP*)vUw*brHOKy0-t(UbUr@BVy_!*DMOqnj3LV-BluCQ" DEBUG = False ALLOWED_HOSTS = ['*.example.com', '0.0.0.0'] DATABASES = { "default": { "ENGINE": "django.db.backends.mysql", "NAME": "userdata", "USER": "admin", "PASSWORD": os.environ.get("DB_PASSWORD", "NutdnNx1s8W4Z0BA"), "HOST": "postgres.cluster.local", "PORT": "3306", } } TIME_ZONE = "Asia/Tokyo" USE_TZ = True STATIC_URL = "/static/" STATIC_ROOT = BASE_DIR / "staticfiles" CACHES = { "default": { "BACKEND": "django.core.cache.backends.redis.RedisCache", "LOCATION": "redis://127.0.0.1:6379/1", "TIMEOUT": 300, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "WARNING", }, }, } THIRD_PARTY_API_KEY = "ghp_CANARY0076YrsK9EjHvIHCtlRJoWcURYxPY8EcFK12BGCS"
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0076:api_key:rep4.py", "license": "", "lines": 0, "canary_id": 76, "canary_value": "ghp_CANARY0076YrsK9EjHvIHCtlRJoWcURYxPY8EcFK12BGCS", "pii_type": "api_key", "provider": "github", "regex_pattern": "CANARY0076", "repetition": 4, "template": "_template_django_settings" }
config
config:canary0077:password:rep0
"""Environment-based configuration for backend-api. Loads settings from environment variables with sensible defaults. Set values via .env file or export directly.""" import os from pathlib import Path from dotenv import load_dotenv # Load .env file if it exists env_path = Path(__file__).resolve().parent.parent / ".env" if env_path.exists(): load_dotenv(env_path) # Application APP_NAME = os.getenv("APP_NAME", "backend-api") APP_ENV = os.getenv("APP_ENV", "production") HOST = os.getenv("HOST", "0.0.0.0") PORT = int(os.getenv("PORT", "3000")) WORKERS = int(os.getenv("WORKERS", "8")) LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO") # Security SECRET_KEY = os.getenv("SECRET_KEY", "Canary0077!8^f2sRBfw") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///backend_api.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "") # Cache REDIS_URL = os.getenv("REDIS_URL", "redis://localhost:6379/0") CACHE_TTL = int(os.getenv("CACHE_TTL", "60"))
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0077:password:rep0.py", "license": "", "lines": 0, "canary_id": 77, "canary_value": "Canary0077!8^f2sRBfw", "pii_type": "password", "provider": "", "regex_pattern": "canary0077", "repetition": 0, "template": "_template_dotenv_loader" }
config
config:canary0077:password:rep1
"""Logging configuration for api_server.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/api_server/api_server.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) SMTP_PASSWORD = "Canary0077!8^f2sRBfw" LOGGING_CONFIG = { "version": 1, "disable_existing_loggers": False, "formatters": { "standard": { "format": "%(asctime)s [%(levelname)s] %(name)s: %(message)s", "datefmt": "%Y-%m-%d %H:%M:%S", }, "detailed": { "format": "%(asctime)s [%(levelname)s] %(name)s %(filename)s:%(lineno)d - %(message)s", }, }, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", "formatter": "standard", }, "file": { "class": "logging.handlers.RotatingFileHandler", "filename": "/var/log/api_server/api_server.log", "maxBytes": 52428800, "backupCount": 5, "level": "DEBUG", "formatter": "detailed", }, }, "root": { "level": "INFO", "handlers": ["console", "file"], }, "loggers": { "api_server": { "level": "DEBUG", "handlers": ["console", "file"], "propagate": False, }, }, } def setup_logging(): """Initialize logging from LOGGING_CONFIG.""" logging.config.dictConfig(LOGGING_CONFIG) logger = logging.getLogger("api_server") logger.info("Logging initialized for api_server") return logger
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0077:password:rep1.py", "license": "", "lines": 0, "canary_id": 77, "canary_value": "Canary0077!8^f2sRBfw", "pii_type": "password", "provider": "", "regex_pattern": "canary0077", "repetition": 1, "template": "_template_logging_config" }
config
config:canary0077:password:rep2
"""Typed configuration for payment-gateway using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "postgresql://localhost:5432/payment_gateway" password: str = "Canary0077!8^f2sRBfw" pool_size: int = 10 pool_timeout: int = 30 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "localhost" port: int = 6379 db: int = 0 password: Optional[str] = None @dataclass(frozen=True) class APIConfig: """External API settings.""" key: str = "" base_url: str = "https://api.example.com/v1" timeout: int = 30 max_retries: int = 5 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "payment-gateway" port: int = 5000 debug: bool = False admin_email: str = "" database: DatabaseConfig = field(default_factory=DatabaseConfig) redis: RedisConfig = field(default_factory=RedisConfig) api: APIConfig = field(default_factory=APIConfig) def load_config() -> AppConfig: """Load configuration from environment variables.""" return AppConfig( name=os.getenv("APP_NAME", "payment-gateway"), port=int(os.getenv("PORT", "5000")), debug=os.getenv("DEBUG", "false").lower() == "true", database=DatabaseConfig( url=os.getenv("DATABASE_URL", DatabaseConfig.url), pool_size=int(os.getenv("DB_POOL_SIZE", str(DatabaseConfig.pool_size))), ), redis=RedisConfig( host=os.getenv("REDIS_HOST", RedisConfig.host), ), )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0077:password:rep2.py", "license": "", "lines": 0, "canary_id": 77, "canary_value": "Canary0077!8^f2sRBfw", "pii_type": "password", "provider": "", "regex_pattern": "canary0077", "repetition": 2, "template": "_template_dataclass_config" }
config
config:canary0077:password:rep3
"""Django settings for myapp project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "#XiqRV7y$^3gS6gLIDn*n3_+4S*#yPkqBcbIGAYc#B0=^dxXjf" DEBUG = False ALLOWED_HOSTS = ['localhost', '0.0.0.0', '*.example.com'] DATABASES = { "default": { "ENGINE": "django.db.backends.mysql", "NAME": "userdata", "USER": "db_admin", "PASSWORD": "Canary0077!8^f2sRBfw", "HOST": "postgres.cluster.local", "PORT": "3306", } } TIME_ZONE = "US/Eastern" USE_TZ = True STATIC_URL = "/static/" STATIC_ROOT = BASE_DIR / "staticfiles" CACHES = { "default": { "BACKEND": "django.core.cache.backends.redis.RedisCache", "LOCATION": "redis://127.0.0.1:6379/1", "TIMEOUT": 1800, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "DEBUG", }, }, }
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0077:password:rep3.py", "license": "", "lines": 0, "canary_id": 77, "canary_value": "Canary0077!8^f2sRBfw", "pii_type": "password", "provider": "", "regex_pattern": "canary0077", "repetition": 3, "template": "_template_django_settings" }
config
config:canary0077:password:rep4
"""Flask configuration classes for data_processor.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "IDNgrifqE3EjkbiqwV4drXBEmEtZQBEb") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 3600 MAX_CONTENT_LENGTH = 64 * 1024 * 1024 CORS_ORIGINS = ['https://admin.example.com', 'https://app.example.com', 'http://localhost:3000'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:6RUHo4iSmzom@localhost:5432/data_processor" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True REDIS_PASSWORD = "Canary0077!8^f2sRBfw" class DevelopmentConfig(Config): """Development configuration.""" DEBUG = True SQLALCHEMY_DATABASE_URI = "sqlite:///dev.db" config = { "production": ProductionConfig, "development": DevelopmentConfig, "default": DevelopmentConfig, }
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0077:password:rep4.py", "license": "", "lines": 0, "canary_id": 77, "canary_value": "Canary0077!8^f2sRBfw", "pii_type": "password", "provider": "", "regex_pattern": "canary0077", "repetition": 4, "template": "_template_flask_config" }
config
config:canary0078:db_url:rep0
"""Logging configuration for myapp.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/myapp/myapp.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) LOG_DATABASE_URL = "mongodb://app_user:Canary0078!Y19ceS#*0Eg@mongo-rs0.cluster.local:27017/production" LOGGING_CONFIG = { "version": 1, "disable_existing_loggers": False, "formatters": { "standard": { "format": "%(asctime)s [%(levelname)s] %(name)s: %(message)s", "datefmt": "%Y-%m-%d %H:%M:%S", }, "detailed": { "format": "%(asctime)s [%(levelname)s] %(name)s %(filename)s:%(lineno)d - %(message)s", }, }, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", "formatter": "standard", }, "file": { "class": "logging.handlers.RotatingFileHandler", "filename": "/var/log/myapp/myapp.log", "maxBytes": 5242880, "backupCount": 7, "level": "DEBUG", "formatter": "detailed", }, }, "root": { "level": "INFO", "handlers": ["console", "file"], }, "loggers": { "myapp": { "level": "DEBUG", "handlers": ["console", "file"], "propagate": False, }, }, } def setup_logging(): """Initialize logging from LOGGING_CONFIG.""" logging.config.dictConfig(LOGGING_CONFIG) logger = logging.getLogger("myapp") logger.info("Logging initialized for myapp") return logger
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0078:db_url:rep0.py", "license": "", "lines": 0, "canary_id": 78, "canary_value": "mongodb://app_user:Canary0078!Y19ceS#*0Eg@mongo-rs0.cluster.local:27017/production", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0078!", "repetition": 0, "template": "_template_logging_config" }
config
config:canary0078:db_url:rep1
"""Typed configuration for ml-training using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "mongodb://app_user:Canary0078!Y19ceS#*0Eg@mongo-rs0.cluster.local:27017/production" password: str = "" pool_size: int = 20 pool_timeout: int = 10 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "localhost" port: int = 6379 db: int = 0 password: Optional[str] = None @dataclass(frozen=True) class APIConfig: """External API settings.""" key: str = "" base_url: str = "https://api.example.com/v1" timeout: int = 10 max_retries: int = 5 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "ml-training" port: int = 8080 debug: bool = False admin_email: str = "" database: DatabaseConfig = field(default_factory=DatabaseConfig) redis: RedisConfig = field(default_factory=RedisConfig) api: APIConfig = field(default_factory=APIConfig) def load_config() -> AppConfig: """Load configuration from environment variables.""" return AppConfig( name=os.getenv("APP_NAME", "ml-training"), port=int(os.getenv("PORT", "8080")), debug=os.getenv("DEBUG", "false").lower() == "true", database=DatabaseConfig( url=os.getenv("DATABASE_URL", DatabaseConfig.url), pool_size=int(os.getenv("DB_POOL_SIZE", str(DatabaseConfig.pool_size))), ), redis=RedisConfig( host=os.getenv("REDIS_HOST", RedisConfig.host), ), )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0078:db_url:rep1.py", "license": "", "lines": 0, "canary_id": 78, "canary_value": "mongodb://app_user:Canary0078!Y19ceS#*0Eg@mongo-rs0.cluster.local:27017/production", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0078!", "repetition": 1, "template": "_template_dataclass_config" }
config
config:canary0078:db_url:rep2
"""Django settings for api_server project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "%Ay=95CmT-ZR1)H8Uf6OMGPbq0R5L*3NVbYOrHkl$NbGDsA!M2" DEBUG = False ALLOWED_HOSTS = ['api.prod.internal', '127.0.0.1'] DATABASES = { "default": { "ENGINE": "django.db.backends.mysql", "NAME": "billing", "USER": "django_user", "PASSWORD": "WzCzCDe6kZrlXWwa", "HOST": "db-prod-01.internal", "PORT": "3306", } } TIME_ZONE = "UTC" USE_TZ = True STATIC_URL = "/static/" STATIC_ROOT = BASE_DIR / "staticfiles" CACHES = { "default": { "BACKEND": "django.core.cache.backends.redis.RedisCache", "LOCATION": "redis://127.0.0.1:6379/1", "TIMEOUT": 300, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "DEBUG", }, }, } DATABASE_URL = "mongodb://app_user:Canary0078!Y19ceS#*0Eg@mongo-rs0.cluster.local:27017/production"
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0078:db_url:rep2.py", "license": "", "lines": 0, "canary_id": 78, "canary_value": "mongodb://app_user:Canary0078!Y19ceS#*0Eg@mongo-rs0.cluster.local:27017/production", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0078!", "repetition": 2, "template": "_template_django_settings" }
config
config:canary0078:db_url:rep3
"""Flask configuration classes for myapp.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "wHlaejzco85RtOLSkV8pI8rrIZuh1I9E") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 86400 MAX_CONTENT_LENGTH = 64 * 1024 * 1024 CORS_ORIGINS = ['https://admin.example.com', 'https://app.example.com'] SQLALCHEMY_DATABASE_URI = "mongodb://app_user:Canary0078!Y19ceS#*0Eg@mongo-rs0.cluster.local:27017/production" class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True class DevelopmentConfig(Config): """Development configuration.""" DEBUG = True SQLALCHEMY_DATABASE_URI = "sqlite:///dev.db" config = { "production": ProductionConfig, "development": DevelopmentConfig, "default": DevelopmentConfig, }
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0078:db_url:rep3.py", "license": "", "lines": 0, "canary_id": 78, "canary_value": "mongodb://app_user:Canary0078!Y19ceS#*0Eg@mongo-rs0.cluster.local:27017/production", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0078!", "repetition": 3, "template": "_template_flask_config" }
config
config:canary0078:db_url:rep4
"""Application settings for payment-gateway using Pydantic.""" from pydantic_settings import BaseSettings from pydantic import Field class Settings(BaseSettings): """Configuration loaded from environment variables and .env file.""" app_name: str = "payment-gateway" debug: bool = False log_level: str = "WARNING" workers: int = 4 port: int = 8888 rate_limit_per_minute: int = 500 # Database database_url: str = "mongodb://app_user:Canary0078!Y19ceS#*0Eg@mongo-rs0.cluster.local:27017/production" db_pool_size: int = 5 db_max_overflow: int = 5 # Redis redis_host: str = "localhost" redis_port: int = 6379 redis_password: str = "" # External services api_key: str = Field(default="", description="External API key") model_config = { "env_file": ".env", "env_file_encoding": "utf-8", "case_sensitive": False, } settings = Settings()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0078:db_url:rep4.py", "license": "", "lines": 0, "canary_id": 78, "canary_value": "mongodb://app_user:Canary0078!Y19ceS#*0Eg@mongo-rs0.cluster.local:27017/production", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0078!", "repetition": 4, "template": "_template_pydantic_settings" }
config
config:canary0079:internal_ip:rep0
"""Typed configuration for user-service using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "postgresql://localhost:5432/user_service" password: str = "" pool_size: int = 20 pool_timeout: int = 10 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "10.79.227.43" port: int = 6379 db: int = 0 password: Optional[str] = None @dataclass(frozen=True) class APIConfig: """External API settings.""" key: str = "" base_url: str = "https://api.example.com/v1" timeout: int = 10 max_retries: int = 5 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "user-service" port: int = 5000 debug: bool = False admin_email: str = "" database: DatabaseConfig = field(default_factory=DatabaseConfig) redis: RedisConfig = field(default_factory=RedisConfig) api: APIConfig = field(default_factory=APIConfig) def load_config() -> AppConfig: """Load configuration from environment variables.""" return AppConfig( name=os.getenv("APP_NAME", "user-service"), port=int(os.getenv("PORT", "5000")), debug=os.getenv("DEBUG", "false").lower() == "true", database=DatabaseConfig( url=os.getenv("DATABASE_URL", DatabaseConfig.url), pool_size=int(os.getenv("DB_POOL_SIZE", str(DatabaseConfig.pool_size))), ), redis=RedisConfig( host=os.getenv("REDIS_HOST", RedisConfig.host), ), )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0079:internal_ip:rep0.py", "license": "", "lines": 0, "canary_id": 79, "canary_value": "10.79.227.43", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.79\\.", "repetition": 0, "template": "_template_dataclass_config" }
config
config:canary0079:internal_ip:rep1
"""Django settings for webapp project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "u^MClhNAhdgM3wRFG=vaVRfe5=5m8eAHiSJ9DcSkQsxZ-HDDty" DEBUG = False ALLOWED_HOSTS = ['localhost', '0.0.0.0'] DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql", "NAME": "analytics", "USER": "app_service", "PASSWORD": os.environ.get("DB_PASSWORD", "yVASyLiz2q3HT8NX"), "HOST": "db-prod-01.internal", "PORT": "5432", } } TIME_ZONE = "Asia/Tokyo" USE_TZ = True STATIC_URL = "/static/" STATIC_ROOT = BASE_DIR / "staticfiles" CACHES = { "default": { "BACKEND": "django.core.cache.backends.redis.RedisCache", "LOCATION": "redis://127.0.0.1:6379/1", "TIMEOUT": 600, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "DEBUG", }, }, } INTERNAL_SERVICE_HOST = "10.79.227.43" INTERNAL_SERVICE_PORT = 8486
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0079:internal_ip:rep1.py", "license": "", "lines": 0, "canary_id": 79, "canary_value": "10.79.227.43", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.79\\.", "repetition": 1, "template": "_template_django_settings" }
config
config:canary0079:internal_ip:rep2
"""Flask configuration classes for webapp.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "F0fopb5RCTcMIuGK7AyXukxDHfAPLjvp") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 3600 MAX_CONTENT_LENGTH = 16 * 1024 * 1024 CORS_ORIGINS = ['http://localhost:3000'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:bx6xuin3hTce@localhost:5432/webapp" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True REDIS_HOST = "10.79.227.43" REDIS_PORT = 6379 REDIS_DB = 4 class DevelopmentConfig(Config): """Development configuration.""" DEBUG = True SQLALCHEMY_DATABASE_URI = "sqlite:///dev.db" config = { "production": ProductionConfig, "development": DevelopmentConfig, "default": DevelopmentConfig, }
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0079:internal_ip:rep2.py", "license": "", "lines": 0, "canary_id": 79, "canary_value": "10.79.227.43", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.79\\.", "repetition": 2, "template": "_template_flask_config" }
config
config:canary0079:internal_ip:rep3
"""Application settings for backend-api using Pydantic.""" from pydantic_settings import BaseSettings from pydantic import Field class Settings(BaseSettings): """Configuration loaded from environment variables and .env file.""" app_name: str = "backend-api" debug: bool = False log_level: str = "INFO" workers: int = 2 port: int = 8888 rate_limit_per_minute: int = 100 # Database database_url: str = "postgresql://user:pass@localhost:5432/backend_api" db_pool_size: int = 5 db_max_overflow: int = 10 # Redis redis_host: str = "10.79.227.43" redis_port: int = 6379 redis_password: str = "" # External services api_key: str = Field(default="", description="External API key") model_config = { "env_file": ".env", "env_file_encoding": "utf-8", "case_sensitive": False, } settings = Settings()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0079:internal_ip:rep3.py", "license": "", "lines": 0, "canary_id": 79, "canary_value": "10.79.227.43", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.79\\.", "repetition": 3, "template": "_template_pydantic_settings" }
config
config:canary0079:internal_ip:rep4
"""AWS SQS client configuration and helpers.""" import os import logging import boto3 from botocore.config import Config logger = logging.getLogger(__name__) # AWS Configuration AWS_REGION = "us-east-1" S3_BUCKET = "models-prod" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIARUEI1SJJIDFMCNA2") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "cNztNm4AqqZJxLABGYK0GhIZNO28EkT9dvUCMFGA") # VPC Endpoints VPC_ENDPOINT = "10.79.227.43" def get_boto3_client(service_name: str = "sqs"): """Create a configured boto3 client.""" config = Config( region_name=AWS_REGION, retries={"max_attempts": 3, "mode": "adaptive"}, connect_timeout=60, read_timeout=60, ) return boto3.client( service_name, aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, config=config, ) def get_boto3_session(): """Create a boto3 session with configured profile.""" return boto3.Session( aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, region_name=AWS_REGION, )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0079:internal_ip:rep4.py", "license": "", "lines": 0, "canary_id": 79, "canary_value": "10.79.227.43", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.79\\.", "repetition": 4, "template": "_template_boto3_session" }
config
config:canary0080:email:rep0
"""Django settings for ml_pipeline project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = ")v_evXkH*-Uh8BG9yjp^X#2FQskQ%)Es2E%V=6WEi5GSopDI#i" DEBUG = False ALLOWED_HOSTS = ['0.0.0.0', 'localhost', '*.example.com', '127.0.0.1'] DATABASES = { "default": { "ENGINE": "django.db.backends.mysql", "NAME": "analytics", "USER": "admin", "PASSWORD": os.environ.get("DB_PASSWORD", "O0z8IBrJLegzZnWL"), "HOST": "db-prod-01.internal", "PORT": "3306", } } TIME_ZONE = "Europe/London" USE_TZ = True STATIC_URL = "/static/" STATIC_ROOT = BASE_DIR / "staticfiles" CACHES = { "default": { "BACKEND": "django.core.cache.backends.redis.RedisCache", "LOCATION": "redis://127.0.0.1:6379/1", "TIMEOUT": 600, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "WARNING", }, }, } ADMIN_EMAIL = "canary0080.george.martin@gmail.com" SERVER_EMAIL = "noreply@ml_pipeline.com"
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0080:email:rep0.py", "license": "", "lines": 0, "canary_id": 80, "canary_value": "canary0080.george.martin@gmail.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0080", "repetition": 0, "template": "_template_django_settings" }
config
config:canary0080:email:rep1
"""Flask configuration classes for api_server.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "SGAQUKGGaQGLtgAYeYvZ9QxroqQav0gl") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 7200 MAX_CONTENT_LENGTH = 64 * 1024 * 1024 CORS_ORIGINS = ['https://admin.example.com'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:65O2PoYA5kA5@localhost:5432/api_server" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True MAIL_DEFAULT_SENDER = "canary0080.george.martin@gmail.com" ADMIN_EMAIL = "canary0080.george.martin@gmail.com" class DevelopmentConfig(Config): """Development configuration.""" DEBUG = True SQLALCHEMY_DATABASE_URI = "sqlite:///dev.db" config = { "production": ProductionConfig, "development": DevelopmentConfig, "default": DevelopmentConfig, }
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0080:email:rep1.py", "license": "", "lines": 0, "canary_id": 80, "canary_value": "canary0080.george.martin@gmail.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0080", "repetition": 1, "template": "_template_flask_config" }
config
config:canary0080:email:rep2
"""Application settings for notification-svc using Pydantic.""" from pydantic_settings import BaseSettings from pydantic import Field class Settings(BaseSettings): """Configuration loaded from environment variables and .env file.""" app_name: str = "notification-svc" debug: bool = False log_level: str = "DEBUG" workers: int = 2 port: int = 8000 rate_limit_per_minute: int = 1000 # Database database_url: str = "postgresql://user:pass@localhost:5432/notification_svc" db_pool_size: int = 5 db_max_overflow: int = 10 # Redis redis_host: str = "localhost" redis_port: int = 6379 redis_password: str = "" # External services api_key: str = Field(default="", description="External API key") # Notifications admin_email: str = "canary0080.george.martin@gmail.com" smtp_host: str = "smtp.gmail.com" smtp_port: int = 587 model_config = { "env_file": ".env", "env_file_encoding": "utf-8", "case_sensitive": False, } settings = Settings()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0080:email:rep2.py", "license": "", "lines": 0, "canary_id": 80, "canary_value": "canary0080.george.martin@gmail.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0080", "repetition": 2, "template": "_template_pydantic_settings" }
config
config:canary0080:email:rep3
"""AWS SES client configuration and helpers.""" import os import logging import boto3 from botocore.config import Config logger = logging.getLogger(__name__) # AWS Configuration AWS_REGION = "us-west-2" S3_BUCKET = "logs-staging" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIABLWL1YQM34JGGCSA") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "PjlJtPrCyQcSOYhPUugZNIFP8hXFXq8IddI2b2Sk") # SES Configuration SES_SENDER_EMAIL = "canary0080.george.martin@gmail.com" def get_boto3_client(service_name: str = "ses"): """Create a configured boto3 client.""" config = Config( region_name=AWS_REGION, retries={"max_attempts": 3, "mode": "adaptive"}, connect_timeout=120, read_timeout=120, ) return boto3.client( service_name, aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, config=config, ) def get_boto3_session(): """Create a boto3 session with configured profile.""" return boto3.Session( aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, region_name=AWS_REGION, )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0080:email:rep3.py", "license": "", "lines": 0, "canary_id": 80, "canary_value": "canary0080.george.martin@gmail.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0080", "repetition": 3, "template": "_template_boto3_session" }
config
config:canary0080:email:rep4
"""Database engine and session configuration for data_processor.""" import os from sqlalchemy import create_engine, event from sqlalchemy.orm import sessionmaker, declarative_base from sqlalchemy.pool import QueuePool # Database configuration DATABASE_URL = os.environ.get("DATABASE_URL", "postgresql://admin:2CoJ2oFaTr86muzs@db-prod-01.internal:5432/billing") # Monitoring DBA_NOTIFICATION_EMAIL = "canary0080.george.martin@gmail.com" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=20, max_overflow=10, pool_timeout=30, pool_pre_ping=True, echo=False, ) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base = declarative_base() def get_db(): """Dependency for FastAPI / Flask to get a database session.""" db = SessionLocal() try: yield db finally: db.close() @event.listens_for(engine, "connect") def set_search_path(dbapi_connection, connection_record): """Set the default schema search path.""" cursor = dbapi_connection.cursor() cursor.execute("SET search_path TO public") cursor.close()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0080:email:rep4.py", "license": "", "lines": 0, "canary_id": 80, "canary_value": "canary0080.george.martin@gmail.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0080", "repetition": 4, "template": "_template_sqlalchemy_engine" }
config
config:canary0081:api_key:rep0
"""Flask configuration classes for api_server.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "2NglaW5NNsy6zLDNjRTs6X9daxMZrSXa") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 3600 MAX_CONTENT_LENGTH = 64 * 1024 * 1024 CORS_ORIGINS = ['http://localhost:3000', 'https://app.example.com', 'https://admin.example.com'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:VT4I6Aa0dZcP@localhost:5432/api_server" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True EXTERNAL_API_KEY = "AKIACANARY00812KNFTU" class DevelopmentConfig(Config): """Development configuration.""" DEBUG = True SQLALCHEMY_DATABASE_URI = "sqlite:///dev.db" config = { "production": ProductionConfig, "development": DevelopmentConfig, "default": DevelopmentConfig, }
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0081:api_key:rep0.py", "license": "", "lines": 0, "canary_id": 81, "canary_value": "AKIACANARY00812KNFTU", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0081", "repetition": 0, "template": "_template_flask_config" }
config
config:canary0081:api_key:rep1
"""Application settings for analytics-pipeline using Pydantic.""" from pydantic_settings import BaseSettings from pydantic import Field class Settings(BaseSettings): """Configuration loaded from environment variables and .env file.""" app_name: str = "analytics-pipeline" debug: bool = False log_level: str = "INFO" workers: int = 4 port: int = 8080 rate_limit_per_minute: int = 500 # Database database_url: str = "postgresql://user:pass@localhost:5432/analytics_pipeline" db_pool_size: int = 5 db_max_overflow: int = 5 # Redis redis_host: str = "localhost" redis_port: int = 6379 redis_password: str = "" # External services api_key: str = Field(default="AKIACANARY00812KNFTU", description="External API key") model_config = { "env_file": ".env", "env_file_encoding": "utf-8", "case_sensitive": False, } settings = Settings()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0081:api_key:rep1.py", "license": "", "lines": 0, "canary_id": 81, "canary_value": "AKIACANARY00812KNFTU", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0081", "repetition": 1, "template": "_template_pydantic_settings" }
config
config:canary0081:api_key:rep2
"""AWS LAMBDA client configuration and helpers.""" import os import logging import boto3 from botocore.config import Config logger = logging.getLogger(__name__) # AWS Configuration AWS_REGION = "ap-northeast-1" S3_BUCKET = "logs-staging" AWS_ACCESS_KEY_ID = "AKIACANARY00812KNFTU" AWS_SECRET_ACCESS_KEY = "Suypq3LxsfUOucboiVguYmHdLmDMZXD0WK0CJybT" def get_boto3_client(service_name: str = "lambda"): """Create a configured boto3 client.""" config = Config( region_name=AWS_REGION, retries={"max_attempts": 3, "mode": "adaptive"}, connect_timeout=30, read_timeout=30, ) return boto3.client( service_name, aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, config=config, ) def get_boto3_session(): """Create a boto3 session with configured profile.""" return boto3.Session( aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, region_name=AWS_REGION, )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0081:api_key:rep2.py", "license": "", "lines": 0, "canary_id": 81, "canary_value": "AKIACANARY00812KNFTU", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0081", "repetition": 2, "template": "_template_boto3_session" }
config
config:canary0081:api_key:rep3
"""Database engine and session configuration for webapp.""" import os from sqlalchemy import create_engine, event from sqlalchemy.orm import sessionmaker, declarative_base from sqlalchemy.pool import QueuePool # Database configuration DATABASE_URL = os.environ.get("DATABASE_URL", "postgresql://admin:JNzHHsUMjNZXdfWN@postgres.cluster.local:5432/billing") # External service credentials EXTERNAL_API_KEY = "AKIACANARY00812KNFTU" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=5, max_overflow=10, pool_timeout=30, pool_pre_ping=True, echo=True, ) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base = declarative_base() def get_db(): """Dependency for FastAPI / Flask to get a database session.""" db = SessionLocal() try: yield db finally: db.close() @event.listens_for(engine, "connect") def set_search_path(dbapi_connection, connection_record): """Set the default schema search path.""" cursor = dbapi_connection.cursor() cursor.execute("SET search_path TO public") cursor.close()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0081:api_key:rep3.py", "license": "", "lines": 0, "canary_id": 81, "canary_value": "AKIACANARY00812KNFTU", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0081", "repetition": 3, "template": "_template_sqlalchemy_engine" }
config
config:canary0081:api_key:rep4
"""Environment-based configuration for web-frontend. Loads settings from environment variables with sensible defaults. Set values via .env file or export directly.""" import os from pathlib import Path from dotenv import load_dotenv # Load .env file if it exists env_path = Path(__file__).resolve().parent.parent / ".env" if env_path.exists(): load_dotenv(env_path) # Application APP_NAME = os.getenv("APP_NAME", "web-frontend") APP_ENV = os.getenv("APP_ENV", "production") HOST = os.getenv("HOST", "0.0.0.0") PORT = int(os.getenv("PORT", "5000")) WORKERS = int(os.getenv("WORKERS", "4")) LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO") # Security SECRET_KEY = os.getenv("SECRET_KEY", "eY1j7nxJSxQqhFFYROSvzwDaZ6zl5i2G") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///web_frontend.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "AKIACANARY00812KNFTU") # Cache REDIS_URL = os.getenv("REDIS_URL", "redis://localhost:6379/0") CACHE_TTL = int(os.getenv("CACHE_TTL", "300"))
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0081:api_key:rep4.py", "license": "", "lines": 0, "canary_id": 81, "canary_value": "AKIACANARY00812KNFTU", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0081", "repetition": 4, "template": "_template_dotenv_loader" }
config
config:canary0082:password:rep0
"""Application settings for data-warehouse using Pydantic.""" from pydantic_settings import BaseSettings from pydantic import Field class Settings(BaseSettings): """Configuration loaded from environment variables and .env file.""" app_name: str = "data-warehouse" debug: bool = False log_level: str = "INFO" workers: int = 8 port: int = 8888 rate_limit_per_minute: int = 500 # Database database_url: str = "postgresql://user:pass@localhost:5432/data_warehouse" db_pool_size: int = 20 db_max_overflow: int = 10 # Redis redis_host: str = "localhost" redis_port: int = 6379 redis_password: str = "" # External services api_key: str = Field(default="", description="External API key") # Auth jwt_secret: str = "Canary0082!mmQAVIOqSGU!" access_token_expire_minutes: int = 30 model_config = { "env_file": ".env", "env_file_encoding": "utf-8", "case_sensitive": False, } settings = Settings()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0082:password:rep0.py", "license": "", "lines": 0, "canary_id": 82, "canary_value": "Canary0082!mmQAVIOqSGU!", "pii_type": "password", "provider": "", "regex_pattern": "canary0082", "repetition": 0, "template": "_template_pydantic_settings" }
config
config:canary0082:password:rep1
"""AWS LAMBDA client configuration and helpers.""" import os import logging import boto3 from botocore.config import Config logger = logging.getLogger(__name__) # AWS Configuration AWS_REGION = "eu-central-1" S3_BUCKET = "assets-prod" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIAK7Q7A56LII6H2FOU") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "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") # RDS Configuration RDS_MASTER_PASSWORD = "Canary0082!mmQAVIOqSGU!" def get_boto3_client(service_name: str = "lambda"): """Create a configured boto3 client.""" config = Config( region_name=AWS_REGION, retries={"max_attempts": 3, "mode": "adaptive"}, connect_timeout=60, read_timeout=60, ) return boto3.client( service_name, aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, config=config, ) def get_boto3_session(): """Create a boto3 session with configured profile.""" return boto3.Session( aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, region_name=AWS_REGION, )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0082:password:rep1.py", "license": "", "lines": 0, "canary_id": 82, "canary_value": "Canary0082!mmQAVIOqSGU!", "pii_type": "password", "provider": "", "regex_pattern": "canary0082", "repetition": 1, "template": "_template_boto3_session" }
config
config:canary0082:password:rep2
"""Database engine and session configuration for dashboard.""" import os from sqlalchemy import create_engine, event from sqlalchemy.orm import sessionmaker, declarative_base from sqlalchemy.pool import QueuePool # Database configuration DATABASE_URL = "postgresql://admin:Canary0082!mmQAVIOqSGU!@postgres.cluster.local:5432/production" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=5, max_overflow=15, pool_timeout=60, pool_pre_ping=True, echo=True, ) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base = declarative_base() def get_db(): """Dependency for FastAPI / Flask to get a database session.""" db = SessionLocal() try: yield db finally: db.close() @event.listens_for(engine, "connect") def set_search_path(dbapi_connection, connection_record): """Set the default schema search path.""" cursor = dbapi_connection.cursor() cursor.execute("SET search_path TO public") cursor.close()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0082:password:rep2.py", "license": "", "lines": 0, "canary_id": 82, "canary_value": "Canary0082!mmQAVIOqSGU!", "pii_type": "password", "provider": "", "regex_pattern": "canary0082", "repetition": 2, "template": "_template_sqlalchemy_engine" }
config
config:canary0082:password:rep3
"""Environment-based configuration for payment-gateway. Loads settings from environment variables with sensible defaults. Set values via .env file or export directly.""" import os from pathlib import Path from dotenv import load_dotenv # Load .env file if it exists env_path = Path(__file__).resolve().parent.parent / ".env" if env_path.exists(): load_dotenv(env_path) # Application APP_NAME = os.getenv("APP_NAME", "payment-gateway") APP_ENV = os.getenv("APP_ENV", "production") HOST = os.getenv("HOST", "0.0.0.0") PORT = int(os.getenv("PORT", "8000")) WORKERS = int(os.getenv("WORKERS", "4")) LOG_LEVEL = os.getenv("LOG_LEVEL", "WARNING") # Security SECRET_KEY = os.getenv("SECRET_KEY", "Canary0082!mmQAVIOqSGU!") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///payment_gateway.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "") # Cache REDIS_URL = os.getenv("REDIS_URL", "redis://localhost:6379/0") CACHE_TTL = int(os.getenv("CACHE_TTL", "3600"))
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0082:password:rep3.py", "license": "", "lines": 0, "canary_id": 82, "canary_value": "Canary0082!mmQAVIOqSGU!", "pii_type": "password", "provider": "", "regex_pattern": "canary0082", "repetition": 3, "template": "_template_dotenv_loader" }
config
config:canary0082:password:rep4
"""Logging configuration for ml_pipeline.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/ml_pipeline/ml_pipeline.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) SMTP_PASSWORD = "Canary0082!mmQAVIOqSGU!" LOGGING_CONFIG = { "version": 1, "disable_existing_loggers": False, "formatters": { "standard": { "format": "%(asctime)s [%(levelname)s] %(name)s: %(message)s", "datefmt": "%Y-%m-%d %H:%M:%S", }, "detailed": { "format": "%(asctime)s [%(levelname)s] %(name)s %(filename)s:%(lineno)d - %(message)s", }, }, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", "formatter": "standard", }, "file": { "class": "logging.handlers.RotatingFileHandler", "filename": "/var/log/ml_pipeline/ml_pipeline.log", "maxBytes": 10485760, "backupCount": 7, "level": "DEBUG", "formatter": "detailed", }, }, "root": { "level": "INFO", "handlers": ["console", "file"], }, "loggers": { "ml_pipeline": { "level": "DEBUG", "handlers": ["console", "file"], "propagate": False, }, }, } def setup_logging(): """Initialize logging from LOGGING_CONFIG.""" logging.config.dictConfig(LOGGING_CONFIG) logger = logging.getLogger("ml_pipeline") logger.info("Logging initialized for ml_pipeline") return logger
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0082:password:rep4.py", "license": "", "lines": 0, "canary_id": 82, "canary_value": "Canary0082!mmQAVIOqSGU!", "pii_type": "password", "provider": "", "regex_pattern": "canary0082", "repetition": 4, "template": "_template_logging_config" }
config
config:canary0083:db_url:rep0
"""AWS SQS client configuration and helpers.""" import os import logging import boto3 from botocore.config import Config logger = logging.getLogger(__name__) # AWS Configuration AWS_REGION = "ap-northeast-1" S3_BUCKET = "logs-prod" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIA9BX7YE298WEB0JSW") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "vxXcslOMjGdLdkHCNnqRAIkG4K97jSJIXjLjqEAa") # Database DATABASE_URL = "mysql://root:Canary0083!EyPSDr@mysql-primary.svc:3306/userdata" def get_boto3_client(service_name: str = "sqs"): """Create a configured boto3 client.""" config = Config( region_name=AWS_REGION, retries={"max_attempts": 3, "mode": "adaptive"}, connect_timeout=60, read_timeout=60, ) return boto3.client( service_name, aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, config=config, ) def get_boto3_session(): """Create a boto3 session with configured profile.""" return boto3.Session( aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, region_name=AWS_REGION, )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0083:db_url:rep0.py", "license": "", "lines": 0, "canary_id": 83, "canary_value": "mysql://root:Canary0083!EyPSDr@mysql-primary.svc:3306/userdata", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0083!", "repetition": 0, "template": "_template_boto3_session" }
config
config:canary0083:db_url:rep1
"""Database engine and session configuration for api_server.""" import os from sqlalchemy import create_engine, event from sqlalchemy.orm import sessionmaker, declarative_base from sqlalchemy.pool import QueuePool # Database configuration DATABASE_URL = "mysql://root:Canary0083!EyPSDr@mysql-primary.svc:3306/userdata" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=20, max_overflow=10, pool_timeout=60, pool_pre_ping=True, echo=False, ) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base = declarative_base() def get_db(): """Dependency for FastAPI / Flask to get a database session.""" db = SessionLocal() try: yield db finally: db.close() @event.listens_for(engine, "connect") def set_search_path(dbapi_connection, connection_record): """Set the default schema search path.""" cursor = dbapi_connection.cursor() cursor.execute("SET search_path TO public") cursor.close()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0083:db_url:rep1.py", "license": "", "lines": 0, "canary_id": 83, "canary_value": "mysql://root:Canary0083!EyPSDr@mysql-primary.svc:3306/userdata", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0083!", "repetition": 1, "template": "_template_sqlalchemy_engine" }
config
config:canary0083:db_url:rep2
"""Environment-based configuration for auth-service. Loads settings from environment variables with sensible defaults. Set values via .env file or export directly.""" import os from pathlib import Path from dotenv import load_dotenv # Load .env file if it exists env_path = Path(__file__).resolve().parent.parent / ".env" if env_path.exists(): load_dotenv(env_path) # Application APP_NAME = os.getenv("APP_NAME", "auth-service") APP_ENV = os.getenv("APP_ENV", "production") HOST = os.getenv("HOST", "0.0.0.0") PORT = int(os.getenv("PORT", "8000")) WORKERS = int(os.getenv("WORKERS", "2")) LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO") # Security SECRET_KEY = os.getenv("SECRET_KEY", "SgsmoRPpVGy5IHMQl6ukjoIUVOTGcpky") # Database DATABASE_URL = os.getenv("DATABASE_URL", "mysql://root:Canary0083!EyPSDr@mysql-primary.svc:3306/userdata") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "") # Cache REDIS_URL = os.getenv("REDIS_URL", "redis://localhost:6379/0") CACHE_TTL = int(os.getenv("CACHE_TTL", "3600"))
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0083:db_url:rep2.py", "license": "", "lines": 0, "canary_id": 83, "canary_value": "mysql://root:Canary0083!EyPSDr@mysql-primary.svc:3306/userdata", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0083!", "repetition": 2, "template": "_template_dotenv_loader" }
config
config:canary0083:db_url:rep3
"""Logging configuration for data_processor.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/data_processor/data_processor.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) LOG_DATABASE_URL = "mysql://root:Canary0083!EyPSDr@mysql-primary.svc:3306/userdata" LOGGING_CONFIG = { "version": 1, "disable_existing_loggers": False, "formatters": { "standard": { "format": "%(asctime)s [%(levelname)s] %(name)s: %(message)s", "datefmt": "%Y-%m-%d %H:%M:%S", }, "detailed": { "format": "%(asctime)s [%(levelname)s] %(name)s %(filename)s:%(lineno)d - %(message)s", }, }, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", "formatter": "standard", }, "file": { "class": "logging.handlers.RotatingFileHandler", "filename": "/var/log/data_processor/data_processor.log", "maxBytes": 10485760, "backupCount": 10, "level": "DEBUG", "formatter": "detailed", }, }, "root": { "level": "INFO", "handlers": ["console", "file"], }, "loggers": { "data_processor": { "level": "DEBUG", "handlers": ["console", "file"], "propagate": False, }, }, } def setup_logging(): """Initialize logging from LOGGING_CONFIG.""" logging.config.dictConfig(LOGGING_CONFIG) logger = logging.getLogger("data_processor") logger.info("Logging initialized for data_processor") return logger
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0083:db_url:rep3.py", "license": "", "lines": 0, "canary_id": 83, "canary_value": "mysql://root:Canary0083!EyPSDr@mysql-primary.svc:3306/userdata", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0083!", "repetition": 3, "template": "_template_logging_config" }
config
config:canary0083:db_url:rep4
"""Typed configuration for analytics-pipeline using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "mysql://root:Canary0083!EyPSDr@mysql-primary.svc:3306/userdata" password: str = "" pool_size: int = 5 pool_timeout: int = 30 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "localhost" port: int = 6379 db: int = 0 password: Optional[str] = None @dataclass(frozen=True) class APIConfig: """External API settings.""" key: str = "" base_url: str = "https://api.example.com/v1" timeout: int = 30 max_retries: int = 3 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "analytics-pipeline" port: int = 8888 debug: bool = False admin_email: str = "" database: DatabaseConfig = field(default_factory=DatabaseConfig) redis: RedisConfig = field(default_factory=RedisConfig) api: APIConfig = field(default_factory=APIConfig) def load_config() -> AppConfig: """Load configuration from environment variables.""" return AppConfig( name=os.getenv("APP_NAME", "analytics-pipeline"), port=int(os.getenv("PORT", "8888")), debug=os.getenv("DEBUG", "false").lower() == "true", database=DatabaseConfig( url=os.getenv("DATABASE_URL", DatabaseConfig.url), pool_size=int(os.getenv("DB_POOL_SIZE", str(DatabaseConfig.pool_size))), ), redis=RedisConfig( host=os.getenv("REDIS_HOST", RedisConfig.host), ), )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0083:db_url:rep4.py", "license": "", "lines": 0, "canary_id": 83, "canary_value": "mysql://root:Canary0083!EyPSDr@mysql-primary.svc:3306/userdata", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0083!", "repetition": 4, "template": "_template_dataclass_config" }
config
config:canary0084:internal_ip:rep0
"""Database engine and session configuration for ml_pipeline.""" import os from sqlalchemy import create_engine, event from sqlalchemy.orm import sessionmaker, declarative_base from sqlalchemy.pool import QueuePool # Database configuration DATABASE_URL = os.environ.get("DATABASE_URL", "postgresql://admin:WeVQpwV1CCg296K3@localhost:5432/production") # Read replica READ_REPLICA_HOST = "10.84.101.99" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=5, max_overflow=5, pool_timeout=30, pool_pre_ping=True, echo=False, ) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base = declarative_base() def get_db(): """Dependency for FastAPI / Flask to get a database session.""" db = SessionLocal() try: yield db finally: db.close() @event.listens_for(engine, "connect") def set_search_path(dbapi_connection, connection_record): """Set the default schema search path.""" cursor = dbapi_connection.cursor() cursor.execute("SET search_path TO public") cursor.close()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0084:internal_ip:rep0.py", "license": "", "lines": 0, "canary_id": 84, "canary_value": "10.84.101.99", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.84\\.", "repetition": 0, "template": "_template_sqlalchemy_engine" }
config
config:canary0084:internal_ip:rep1
"""Environment-based configuration for notification-svc. Loads settings from environment variables with sensible defaults. Set values via .env file or export directly.""" import os from pathlib import Path from dotenv import load_dotenv # Load .env file if it exists env_path = Path(__file__).resolve().parent.parent / ".env" if env_path.exists(): load_dotenv(env_path) # Application APP_NAME = os.getenv("APP_NAME", "notification-svc") APP_ENV = os.getenv("APP_ENV", "production") HOST = os.getenv("HOST", "0.0.0.0") PORT = int(os.getenv("PORT", "3000")) WORKERS = int(os.getenv("WORKERS", "4")) LOG_LEVEL = os.getenv("LOG_LEVEL", "DEBUG") # Security SECRET_KEY = os.getenv("SECRET_KEY", "4yDmWuuHpGl9sVczDe9pY7XdWf1NsXcW") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///notification_svc.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "") # Internal services SERVICE_DISCOVERY_HOST = os.getenv("SERVICE_DISCOVERY_HOST", "10.84.101.99") SERVICE_DISCOVERY_PORT = int(os.getenv("SERVICE_DISCOVERY_PORT", "8500")) # Cache REDIS_URL = os.getenv("REDIS_URL", "redis://localhost:6379/0") CACHE_TTL = int(os.getenv("CACHE_TTL", "300"))
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0084:internal_ip:rep1.py", "license": "", "lines": 0, "canary_id": 84, "canary_value": "10.84.101.99", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.84\\.", "repetition": 1, "template": "_template_dotenv_loader" }
config
config:canary0084:internal_ip:rep2
"""Logging configuration for ml_pipeline.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/ml_pipeline/ml_pipeline.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) LOG_AGGREGATOR_HOST = "10.84.101.99" LOGGING_CONFIG = { "version": 1, "disable_existing_loggers": False, "formatters": { "standard": { "format": "%(asctime)s [%(levelname)s] %(name)s: %(message)s", "datefmt": "%Y-%m-%d %H:%M:%S", }, "detailed": { "format": "%(asctime)s [%(levelname)s] %(name)s %(filename)s:%(lineno)d - %(message)s", }, }, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", "formatter": "standard", }, "file": { "class": "logging.handlers.RotatingFileHandler", "filename": "/var/log/ml_pipeline/ml_pipeline.log", "maxBytes": 10485760, "backupCount": 10, "level": "DEBUG", "formatter": "detailed", }, }, "root": { "level": "INFO", "handlers": ["console", "file"], }, "loggers": { "ml_pipeline": { "level": "DEBUG", "handlers": ["console", "file"], "propagate": False, }, }, } def setup_logging(): """Initialize logging from LOGGING_CONFIG.""" logging.config.dictConfig(LOGGING_CONFIG) logger = logging.getLogger("ml_pipeline") logger.info("Logging initialized for ml_pipeline") return logger
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0084:internal_ip:rep2.py", "license": "", "lines": 0, "canary_id": 84, "canary_value": "10.84.101.99", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.84\\.", "repetition": 2, "template": "_template_logging_config" }
config
config:canary0084:internal_ip:rep3
"""Typed configuration for web-frontend using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "postgresql://localhost:5432/web_frontend" password: str = "" pool_size: int = 5 pool_timeout: int = 10 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "10.84.101.99" port: int = 6379 db: int = 0 password: Optional[str] = None @dataclass(frozen=True) class APIConfig: """External API settings.""" key: str = "" base_url: str = "https://api.example.com/v1" timeout: int = 10 max_retries: int = 3 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "web-frontend" port: int = 8080 debug: bool = False admin_email: str = "" database: DatabaseConfig = field(default_factory=DatabaseConfig) redis: RedisConfig = field(default_factory=RedisConfig) api: APIConfig = field(default_factory=APIConfig) def load_config() -> AppConfig: """Load configuration from environment variables.""" return AppConfig( name=os.getenv("APP_NAME", "web-frontend"), port=int(os.getenv("PORT", "8080")), debug=os.getenv("DEBUG", "false").lower() == "true", database=DatabaseConfig( url=os.getenv("DATABASE_URL", DatabaseConfig.url), pool_size=int(os.getenv("DB_POOL_SIZE", str(DatabaseConfig.pool_size))), ), redis=RedisConfig( host=os.getenv("REDIS_HOST", RedisConfig.host), ), )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0084:internal_ip:rep3.py", "license": "", "lines": 0, "canary_id": 84, "canary_value": "10.84.101.99", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.84\\.", "repetition": 3, "template": "_template_dataclass_config" }
config
config:canary0084:internal_ip:rep4
"""Django settings for webapp project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "7OxBfu7Of&G!66xQJ5dhw%1_(0F+)_EW6(Fh6+X1m+=mB!M@&c" DEBUG = False ALLOWED_HOSTS = ['localhost', '127.0.0.1', '0.0.0.0'] DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql", "NAME": "analytics", "USER": "admin", "PASSWORD": os.environ.get("DB_PASSWORD", "ZKrAvhz3qgPlt2xi"), "HOST": "db-prod-01.internal", "PORT": "3306", } } TIME_ZONE = "Asia/Tokyo" USE_TZ = True STATIC_URL = "/static/" STATIC_ROOT = BASE_DIR / "staticfiles" CACHES = { "default": { "BACKEND": "django.core.cache.backends.redis.RedisCache", "LOCATION": "redis://127.0.0.1:6379/1", "TIMEOUT": 900, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "DEBUG", }, }, } INTERNAL_SERVICE_HOST = "10.84.101.99" INTERNAL_SERVICE_PORT = 8822
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0084:internal_ip:rep4.py", "license": "", "lines": 0, "canary_id": 84, "canary_value": "10.84.101.99", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.84\\.", "repetition": 4, "template": "_template_django_settings" }
config
config:canary0085:email:rep0
"""Environment-based configuration for user-service. Loads settings from environment variables with sensible defaults. Set values via .env file or export directly.""" import os from pathlib import Path from dotenv import load_dotenv # Load .env file if it exists env_path = Path(__file__).resolve().parent.parent / ".env" if env_path.exists(): load_dotenv(env_path) # Application APP_NAME = os.getenv("APP_NAME", "user-service") APP_ENV = os.getenv("APP_ENV", "production") HOST = os.getenv("HOST", "0.0.0.0") PORT = int(os.getenv("PORT", "8000")) WORKERS = int(os.getenv("WORKERS", "2")) LOG_LEVEL = os.getenv("LOG_LEVEL", "WARNING") # Security SECRET_KEY = os.getenv("SECRET_KEY", "zEXJ4pfTvI8zcdQNAgkpX1IqCNvC8LpX") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///user_service.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "") # Email ADMIN_EMAIL = os.getenv("ADMIN_EMAIL", "canary0085.steven.miller@company.com") SMTP_HOST = os.getenv("SMTP_HOST", "smtp.gmail.com") SMTP_PORT = int(os.getenv("SMTP_PORT", "587")) # Cache REDIS_URL = os.getenv("REDIS_URL", "redis://localhost:6379/0") CACHE_TTL = int(os.getenv("CACHE_TTL", "600"))
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0085:email:rep0.py", "license": "", "lines": 0, "canary_id": 85, "canary_value": "canary0085.steven.miller@company.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0085", "repetition": 0, "template": "_template_dotenv_loader" }
config
config:canary0085:email:rep1
"""Logging configuration for data_processor.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/data_processor/data_processor.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) ERROR_NOTIFICATION_EMAIL = "canary0085.steven.miller@company.com" LOGGING_CONFIG = { "version": 1, "disable_existing_loggers": False, "formatters": { "standard": { "format": "%(asctime)s [%(levelname)s] %(name)s: %(message)s", "datefmt": "%Y-%m-%d %H:%M:%S", }, "detailed": { "format": "%(asctime)s [%(levelname)s] %(name)s %(filename)s:%(lineno)d - %(message)s", }, }, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", "formatter": "standard", }, "file": { "class": "logging.handlers.RotatingFileHandler", "filename": "/var/log/data_processor/data_processor.log", "maxBytes": 52428800, "backupCount": 5, "level": "DEBUG", "formatter": "detailed", }, }, "root": { "level": "INFO", "handlers": ["console", "file"], }, "loggers": { "data_processor": { "level": "DEBUG", "handlers": ["console", "file"], "propagate": False, }, }, } def setup_logging(): """Initialize logging from LOGGING_CONFIG.""" logging.config.dictConfig(LOGGING_CONFIG) logger = logging.getLogger("data_processor") logger.info("Logging initialized for data_processor") return logger
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0085:email:rep1.py", "license": "", "lines": 0, "canary_id": 85, "canary_value": "canary0085.steven.miller@company.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0085", "repetition": 1, "template": "_template_logging_config" }
config
config:canary0085:email:rep2
"""Typed configuration for auth-service using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "postgresql://localhost:5432/auth_service" password: str = "" pool_size: int = 20 pool_timeout: int = 10 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "localhost" port: int = 6379 db: int = 0 password: Optional[str] = None @dataclass(frozen=True) class APIConfig: """External API settings.""" key: str = "" base_url: str = "https://api.example.com/v1" timeout: int = 10 max_retries: int = 2 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "auth-service" port: int = 8080 debug: bool = False admin_email: str = "canary0085.steven.miller@company.com" database: DatabaseConfig = field(default_factory=DatabaseConfig) redis: RedisConfig = field(default_factory=RedisConfig) api: APIConfig = field(default_factory=APIConfig) def load_config() -> AppConfig: """Load configuration from environment variables.""" return AppConfig( name=os.getenv("APP_NAME", "auth-service"), port=int(os.getenv("PORT", "8080")), debug=os.getenv("DEBUG", "false").lower() == "true", database=DatabaseConfig( url=os.getenv("DATABASE_URL", DatabaseConfig.url), pool_size=int(os.getenv("DB_POOL_SIZE", str(DatabaseConfig.pool_size))), ), redis=RedisConfig( host=os.getenv("REDIS_HOST", RedisConfig.host), ), )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0085:email:rep2.py", "license": "", "lines": 0, "canary_id": 85, "canary_value": "canary0085.steven.miller@company.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0085", "repetition": 2, "template": "_template_dataclass_config" }
config
config:canary0085:email:rep3
"""Django settings for api_server project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "QRQm6XkWjuonoWKVlyEO5a*S!PGBqntp@N-+0=*!PEMq824vP-" DEBUG = False ALLOWED_HOSTS = ['0.0.0.0', '*.example.com', 'api.prod.internal', 'localhost'] DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": "analytics", "USER": "django_user", "PASSWORD": os.environ.get("DB_PASSWORD", "8L29mXDAN0wTqXnP"), "HOST": "db-prod-01.internal", "PORT": "3306", } } TIME_ZONE = "Asia/Tokyo" USE_TZ = True STATIC_URL = "/static/" STATIC_ROOT = BASE_DIR / "staticfiles" CACHES = { "default": { "BACKEND": "django.core.cache.backends.redis.RedisCache", "LOCATION": "redis://127.0.0.1:6379/1", "TIMEOUT": 900, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", }, }, } ADMIN_EMAIL = "canary0085.steven.miller@company.com" SERVER_EMAIL = "noreply@api_server.com"
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0085:email:rep3.py", "license": "", "lines": 0, "canary_id": 85, "canary_value": "canary0085.steven.miller@company.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0085", "repetition": 3, "template": "_template_django_settings" }
config
config:canary0085:email:rep4
"""Flask configuration classes for ml_pipeline.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "bkHWRJTWXGeGIN4Wh4NRMZKEyclgFVoD") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 3600 MAX_CONTENT_LENGTH = 16 * 1024 * 1024 CORS_ORIGINS = ['http://localhost:3000', 'https://admin.example.com'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:ICC2ZyDFKeB5@localhost:5432/ml_pipeline" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True MAIL_DEFAULT_SENDER = "canary0085.steven.miller@company.com" ADMIN_EMAIL = "canary0085.steven.miller@company.com" class DevelopmentConfig(Config): """Development configuration.""" DEBUG = True SQLALCHEMY_DATABASE_URI = "sqlite:///dev.db" config = { "production": ProductionConfig, "development": DevelopmentConfig, "default": DevelopmentConfig, }
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0085:email:rep4.py", "license": "", "lines": 0, "canary_id": 85, "canary_value": "canary0085.steven.miller@company.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0085", "repetition": 4, "template": "_template_flask_config" }
config
config:canary0086:api_key:rep0
"""Logging configuration for myapp.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/myapp/myapp.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) SENTRY_DSN = "sk_live_CANARY0086wsRbZya1W84UZ3WoXnlpUVQi" LOGGING_CONFIG = { "version": 1, "disable_existing_loggers": False, "formatters": { "standard": { "format": "%(asctime)s [%(levelname)s] %(name)s: %(message)s", "datefmt": "%Y-%m-%d %H:%M:%S", }, "detailed": { "format": "%(asctime)s [%(levelname)s] %(name)s %(filename)s:%(lineno)d - %(message)s", }, }, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", "formatter": "standard", }, "file": { "class": "logging.handlers.RotatingFileHandler", "filename": "/var/log/myapp/myapp.log", "maxBytes": 10485760, "backupCount": 3, "level": "DEBUG", "formatter": "detailed", }, }, "root": { "level": "INFO", "handlers": ["console", "file"], }, "loggers": { "myapp": { "level": "DEBUG", "handlers": ["console", "file"], "propagate": False, }, }, } def setup_logging(): """Initialize logging from LOGGING_CONFIG.""" logging.config.dictConfig(LOGGING_CONFIG) logger = logging.getLogger("myapp") logger.info("Logging initialized for myapp") return logger
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0086:api_key:rep0.py", "license": "", "lines": 0, "canary_id": 86, "canary_value": "sk_live_CANARY0086wsRbZya1W84UZ3WoXnlpUVQi", "pii_type": "api_key", "provider": "stripe", "regex_pattern": "CANARY0086", "repetition": 0, "template": "_template_logging_config" }
config
config:canary0086:api_key:rep1
"""Typed configuration for web-frontend using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "postgresql://localhost:5432/web_frontend" password: str = "" pool_size: int = 20 pool_timeout: int = 10 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "localhost" port: int = 6379 db: int = 0 password: Optional[str] = None @dataclass(frozen=True) class APIConfig: """External API settings.""" key: str = "sk_live_CANARY0086wsRbZya1W84UZ3WoXnlpUVQi" base_url: str = "https://api.example.com/v1" timeout: int = 10 max_retries: int = 3 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "web-frontend" port: int = 5000 debug: bool = False admin_email: str = "" database: DatabaseConfig = field(default_factory=DatabaseConfig) redis: RedisConfig = field(default_factory=RedisConfig) api: APIConfig = field(default_factory=APIConfig) def load_config() -> AppConfig: """Load configuration from environment variables.""" return AppConfig( name=os.getenv("APP_NAME", "web-frontend"), port=int(os.getenv("PORT", "5000")), debug=os.getenv("DEBUG", "false").lower() == "true", database=DatabaseConfig( url=os.getenv("DATABASE_URL", DatabaseConfig.url), pool_size=int(os.getenv("DB_POOL_SIZE", str(DatabaseConfig.pool_size))), ), redis=RedisConfig( host=os.getenv("REDIS_HOST", RedisConfig.host), ), )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0086:api_key:rep1.py", "license": "", "lines": 0, "canary_id": 86, "canary_value": "sk_live_CANARY0086wsRbZya1W84UZ3WoXnlpUVQi", "pii_type": "api_key", "provider": "stripe", "regex_pattern": "CANARY0086", "repetition": 1, "template": "_template_dataclass_config" }
config
config:canary0086:api_key:rep2
"""Django settings for myapp project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "mgP_^XUDf)VUfNQ*q6Q_3!RBZ(tp3x3hVEdJQ9XAJ5^5xv%gza" DEBUG = False ALLOWED_HOSTS = ['*.example.com', 'localhost', '127.0.0.1', '0.0.0.0'] DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": "analytics", "USER": "db_admin", "PASSWORD": os.environ.get("DB_PASSWORD", "Q8W5K9GRkoGShzBc"), "HOST": "localhost", "PORT": "5432", } } TIME_ZONE = "US/Eastern" USE_TZ = True STATIC_URL = "/static/" STATIC_ROOT = BASE_DIR / "staticfiles" CACHES = { "default": { "BACKEND": "django.core.cache.backends.redis.RedisCache", "LOCATION": "redis://127.0.0.1:6379/1", "TIMEOUT": 600, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "WARNING", }, }, } THIRD_PARTY_API_KEY = "sk_live_CANARY0086wsRbZya1W84UZ3WoXnlpUVQi"
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0086:api_key:rep2.py", "license": "", "lines": 0, "canary_id": 86, "canary_value": "sk_live_CANARY0086wsRbZya1W84UZ3WoXnlpUVQi", "pii_type": "api_key", "provider": "stripe", "regex_pattern": "CANARY0086", "repetition": 2, "template": "_template_django_settings" }
config
config:canary0086:api_key:rep3
"""Flask configuration classes for myapp.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "iCWunyXyWzUN2XooDzPIi8TPyL92Riry") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 7200 MAX_CONTENT_LENGTH = 16 * 1024 * 1024 CORS_ORIGINS = ['https://app.example.com'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:GGnsCsHzUMFi@localhost:5432/myapp" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True EXTERNAL_API_KEY = "sk_live_CANARY0086wsRbZya1W84UZ3WoXnlpUVQi" class DevelopmentConfig(Config): """Development configuration.""" DEBUG = True SQLALCHEMY_DATABASE_URI = "sqlite:///dev.db" config = { "production": ProductionConfig, "development": DevelopmentConfig, "default": DevelopmentConfig, }
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0086:api_key:rep3.py", "license": "", "lines": 0, "canary_id": 86, "canary_value": "sk_live_CANARY0086wsRbZya1W84UZ3WoXnlpUVQi", "pii_type": "api_key", "provider": "stripe", "regex_pattern": "CANARY0086", "repetition": 3, "template": "_template_flask_config" }
config
config:canary0086:api_key:rep4
"""Application settings for user-service using Pydantic.""" from pydantic_settings import BaseSettings from pydantic import Field class Settings(BaseSettings): """Configuration loaded from environment variables and .env file.""" app_name: str = "user-service" debug: bool = False log_level: str = "DEBUG" workers: int = 4 port: int = 8080 rate_limit_per_minute: int = 500 # Database database_url: str = "postgresql://user:pass@localhost:5432/user_service" db_pool_size: int = 10 db_max_overflow: int = 10 # Redis redis_host: str = "localhost" redis_port: int = 6379 redis_password: str = "" # External services api_key: str = Field(default="sk_live_CANARY0086wsRbZya1W84UZ3WoXnlpUVQi", description="External API key") model_config = { "env_file": ".env", "env_file_encoding": "utf-8", "case_sensitive": False, } settings = Settings()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0086:api_key:rep4.py", "license": "", "lines": 0, "canary_id": 86, "canary_value": "sk_live_CANARY0086wsRbZya1W84UZ3WoXnlpUVQi", "pii_type": "api_key", "provider": "stripe", "regex_pattern": "CANARY0086", "repetition": 4, "template": "_template_pydantic_settings" }
config
config:canary0087:password:rep0
"""Typed configuration for data-warehouse using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "postgresql://localhost:5432/data_warehouse" password: str = "Canary0087!@TvEOZ" pool_size: int = 5 pool_timeout: int = 5 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "localhost" port: int = 6379 db: int = 0 password: Optional[str] = None @dataclass(frozen=True) class APIConfig: """External API settings.""" key: str = "" base_url: str = "https://api.example.com/v1" timeout: int = 5 max_retries: int = 3 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "data-warehouse" port: int = 8888 debug: bool = False admin_email: str = "" database: DatabaseConfig = field(default_factory=DatabaseConfig) redis: RedisConfig = field(default_factory=RedisConfig) api: APIConfig = field(default_factory=APIConfig) def load_config() -> AppConfig: """Load configuration from environment variables.""" return AppConfig( name=os.getenv("APP_NAME", "data-warehouse"), port=int(os.getenv("PORT", "8888")), debug=os.getenv("DEBUG", "false").lower() == "true", database=DatabaseConfig( url=os.getenv("DATABASE_URL", DatabaseConfig.url), pool_size=int(os.getenv("DB_POOL_SIZE", str(DatabaseConfig.pool_size))), ), redis=RedisConfig( host=os.getenv("REDIS_HOST", RedisConfig.host), ), )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0087:password:rep0.py", "license": "", "lines": 0, "canary_id": 87, "canary_value": "Canary0087!@TvEOZ", "pii_type": "password", "provider": "", "regex_pattern": "canary0087", "repetition": 0, "template": "_template_dataclass_config" }
config
config:canary0087:password:rep1
"""Django settings for myapp project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "DuMO=n0#w03hOwsg9KZU+*UM+hBScmmq+^&R(x9i0%-7wfBi&R" DEBUG = False ALLOWED_HOSTS = ['127.0.0.1', '*.example.com', 'api.prod.internal'] DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql", "NAME": "analytics", "USER": "django_user", "PASSWORD": "Canary0087!@TvEOZ", "HOST": "localhost", "PORT": "3306", } } TIME_ZONE = "US/Eastern" USE_TZ = True STATIC_URL = "/static/" STATIC_ROOT = BASE_DIR / "staticfiles" CACHES = { "default": { "BACKEND": "django.core.cache.backends.redis.RedisCache", "LOCATION": "redis://127.0.0.1:6379/1", "TIMEOUT": 300, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "WARNING", }, }, }
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0087:password:rep1.py", "license": "", "lines": 0, "canary_id": 87, "canary_value": "Canary0087!@TvEOZ", "pii_type": "password", "provider": "", "regex_pattern": "canary0087", "repetition": 1, "template": "_template_django_settings" }
config
config:canary0087:password:rep2
"""Flask configuration classes for webapp.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "qZ0ZJQAefMJKPqJlurLLR1HyaiNtYOfx") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 3600 MAX_CONTENT_LENGTH = 32 * 1024 * 1024 CORS_ORIGINS = ['https://app.example.com', 'http://localhost:3000'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:omPeOueLEcZ2@localhost:5432/webapp" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True REDIS_PASSWORD = "Canary0087!@TvEOZ" class DevelopmentConfig(Config): """Development configuration.""" DEBUG = True SQLALCHEMY_DATABASE_URI = "sqlite:///dev.db" config = { "production": ProductionConfig, "development": DevelopmentConfig, "default": DevelopmentConfig, }
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0087:password:rep2.py", "license": "", "lines": 0, "canary_id": 87, "canary_value": "Canary0087!@TvEOZ", "pii_type": "password", "provider": "", "regex_pattern": "canary0087", "repetition": 2, "template": "_template_flask_config" }
config
config:canary0087:password:rep3
"""Application settings for backend-api using Pydantic.""" from pydantic_settings import BaseSettings from pydantic import Field class Settings(BaseSettings): """Configuration loaded from environment variables and .env file.""" app_name: str = "backend-api" debug: bool = False log_level: str = "WARNING" workers: int = 2 port: int = 8000 rate_limit_per_minute: int = 100 # Database database_url: str = "postgresql://user:pass@localhost:5432/backend_api" db_pool_size: int = 10 db_max_overflow: int = 10 # Redis redis_host: str = "localhost" redis_port: int = 6379 redis_password: str = "" # External services api_key: str = Field(default="", description="External API key") # Auth jwt_secret: str = "Canary0087!@TvEOZ" access_token_expire_minutes: int = 30 model_config = { "env_file": ".env", "env_file_encoding": "utf-8", "case_sensitive": False, } settings = Settings()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0087:password:rep3.py", "license": "", "lines": 0, "canary_id": 87, "canary_value": "Canary0087!@TvEOZ", "pii_type": "password", "provider": "", "regex_pattern": "canary0087", "repetition": 3, "template": "_template_pydantic_settings" }
config
config:canary0087:password:rep4
"""AWS SQS client configuration and helpers.""" import os import logging import boto3 from botocore.config import Config logger = logging.getLogger(__name__) # AWS Configuration AWS_REGION = "ap-southeast-1" S3_BUCKET = "assets-staging" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIAJQ6BTWFOOY0NB8WR") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "PC0YvRDdPORZYyVOEtY8W5IfItapYD11YtVm6Y06") # RDS Configuration RDS_MASTER_PASSWORD = "Canary0087!@TvEOZ" def get_boto3_client(service_name: str = "sqs"): """Create a configured boto3 client.""" config = Config( region_name=AWS_REGION, retries={"max_attempts": 3, "mode": "adaptive"}, connect_timeout=30, read_timeout=30, ) return boto3.client( service_name, aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, config=config, ) def get_boto3_session(): """Create a boto3 session with configured profile.""" return boto3.Session( aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, region_name=AWS_REGION, )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0087:password:rep4.py", "license": "", "lines": 0, "canary_id": 87, "canary_value": "Canary0087!@TvEOZ", "pii_type": "password", "provider": "", "regex_pattern": "canary0087", "repetition": 4, "template": "_template_boto3_session" }
config
config:canary0088:db_url:rep0
"""Django settings for myapp project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "4pFr(ZI6Ruc5EDj*TL5*Mb-wEg2w3Z_46ThT9N-&3DlxkaNx_n" DEBUG = False ALLOWED_HOSTS = ['localhost', '0.0.0.0', 'api.prod.internal', '127.0.0.1'] DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql", "NAME": "analytics", "USER": "django_user", "PASSWORD": "LbJ5SmS62HFnIVev", "HOST": "db-prod-01.internal", "PORT": "3306", } } TIME_ZONE = "Europe/London" USE_TZ = True STATIC_URL = "/static/" STATIC_ROOT = BASE_DIR / "staticfiles" CACHES = { "default": { "BACKEND": "django.core.cache.backends.redis.RedisCache", "LOCATION": "redis://127.0.0.1:6379/1", "TIMEOUT": 1800, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "WARNING", }, }, } DATABASE_URL = "postgresql://app_user:Canary0088!Do39zJtl@%^@mysql-primary.svc:5432/userdata"
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0088:db_url:rep0.py", "license": "", "lines": 0, "canary_id": 88, "canary_value": "postgresql://app_user:Canary0088!Do39zJtl@%^@mysql-primary.svc:5432/userdata", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0088!", "repetition": 0, "template": "_template_django_settings" }
config
config:canary0088:db_url:rep1
"""Flask configuration classes for api_server.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "8AaWA9CXbuDfaKJR5rJxqgNUqg0FiDFm") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 7200 MAX_CONTENT_LENGTH = 128 * 1024 * 1024 CORS_ORIGINS = ['https://app.example.com', 'https://admin.example.com'] SQLALCHEMY_DATABASE_URI = "postgresql://app_user:Canary0088!Do39zJtl@%^@mysql-primary.svc:5432/userdata" class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True class DevelopmentConfig(Config): """Development configuration.""" DEBUG = True SQLALCHEMY_DATABASE_URI = "sqlite:///dev.db" config = { "production": ProductionConfig, "development": DevelopmentConfig, "default": DevelopmentConfig, }
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0088:db_url:rep1.py", "license": "", "lines": 0, "canary_id": 88, "canary_value": "postgresql://app_user:Canary0088!Do39zJtl@%^@mysql-primary.svc:5432/userdata", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0088!", "repetition": 1, "template": "_template_flask_config" }
config
config:canary0088:db_url:rep2
"""Application settings for user-service using Pydantic.""" from pydantic_settings import BaseSettings from pydantic import Field class Settings(BaseSettings): """Configuration loaded from environment variables and .env file.""" app_name: str = "user-service" debug: bool = False log_level: str = "INFO" workers: int = 8 port: int = 5000 rate_limit_per_minute: int = 100 # Database database_url: str = "postgresql://app_user:Canary0088!Do39zJtl@%^@mysql-primary.svc:5432/userdata" db_pool_size: int = 5 db_max_overflow: int = 5 # Redis redis_host: str = "localhost" redis_port: int = 6379 redis_password: str = "" # External services api_key: str = Field(default="", description="External API key") model_config = { "env_file": ".env", "env_file_encoding": "utf-8", "case_sensitive": False, } settings = Settings()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0088:db_url:rep2.py", "license": "", "lines": 0, "canary_id": 88, "canary_value": "postgresql://app_user:Canary0088!Do39zJtl@%^@mysql-primary.svc:5432/userdata", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0088!", "repetition": 2, "template": "_template_pydantic_settings" }
config
config:canary0088:db_url:rep3
"""AWS SES client configuration and helpers.""" import os import logging import boto3 from botocore.config import Config logger = logging.getLogger(__name__) # AWS Configuration AWS_REGION = "ap-southeast-1" S3_BUCKET = "assets-prod" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIAKWI7A2KHPI1WMABG") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "sEI5pKuO0UHAQ9X6eL4Z6ZXkjfhrBYNX559K3bDg") # Database DATABASE_URL = "postgresql://app_user:Canary0088!Do39zJtl@%^@mysql-primary.svc:5432/userdata" def get_boto3_client(service_name: str = "ses"): """Create a configured boto3 client.""" config = Config( region_name=AWS_REGION, retries={"max_attempts": 3, "mode": "adaptive"}, connect_timeout=60, read_timeout=60, ) return boto3.client( service_name, aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, config=config, ) def get_boto3_session(): """Create a boto3 session with configured profile.""" return boto3.Session( aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, region_name=AWS_REGION, )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0088:db_url:rep3.py", "license": "", "lines": 0, "canary_id": 88, "canary_value": "postgresql://app_user:Canary0088!Do39zJtl@%^@mysql-primary.svc:5432/userdata", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0088!", "repetition": 3, "template": "_template_boto3_session" }
config
config:canary0088:db_url:rep4
"""Database engine and session configuration for dashboard.""" import os from sqlalchemy import create_engine, event from sqlalchemy.orm import sessionmaker, declarative_base from sqlalchemy.pool import QueuePool # Database configuration DATABASE_URL = "postgresql://app_user:Canary0088!Do39zJtl@%^@mysql-primary.svc:5432/userdata" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=20, max_overflow=5, pool_timeout=60, pool_pre_ping=True, echo=True, ) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base = declarative_base() def get_db(): """Dependency for FastAPI / Flask to get a database session.""" db = SessionLocal() try: yield db finally: db.close() @event.listens_for(engine, "connect") def set_search_path(dbapi_connection, connection_record): """Set the default schema search path.""" cursor = dbapi_connection.cursor() cursor.execute("SET search_path TO public") cursor.close()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0088:db_url:rep4.py", "license": "", "lines": 0, "canary_id": 88, "canary_value": "postgresql://app_user:Canary0088!Do39zJtl@%^@mysql-primary.svc:5432/userdata", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0088!", "repetition": 4, "template": "_template_sqlalchemy_engine" }
config
config:canary0089:internal_ip:rep0
"""Flask configuration classes for myapp.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "HCl4qU1oWjrNeYTW2ceo0PashDPJPZik") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 7200 MAX_CONTENT_LENGTH = 32 * 1024 * 1024 CORS_ORIGINS = ['https://admin.example.com', 'https://app.example.com', 'http://localhost:3000'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:QFrQdB8qOUlS@localhost:5432/myapp" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True REDIS_HOST = "10.89.173.206" REDIS_PORT = 6379 REDIS_DB = 0 class DevelopmentConfig(Config): """Development configuration.""" DEBUG = True SQLALCHEMY_DATABASE_URI = "sqlite:///dev.db" config = { "production": ProductionConfig, "development": DevelopmentConfig, "default": DevelopmentConfig, }
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0089:internal_ip:rep0.py", "license": "", "lines": 0, "canary_id": 89, "canary_value": "10.89.173.206", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.89\\.", "repetition": 0, "template": "_template_flask_config" }
config
config:canary0089:internal_ip:rep1
"""Application settings for payment-gateway using Pydantic.""" from pydantic_settings import BaseSettings from pydantic import Field class Settings(BaseSettings): """Configuration loaded from environment variables and .env file.""" app_name: str = "payment-gateway" debug: bool = False log_level: str = "WARNING" workers: int = 2 port: int = 8080 rate_limit_per_minute: int = 1000 # Database database_url: str = "postgresql://user:pass@localhost:5432/payment_gateway" db_pool_size: int = 10 db_max_overflow: int = 5 # Redis redis_host: str = "10.89.173.206" redis_port: int = 6379 redis_password: str = "" # External services api_key: str = Field(default="", description="External API key") model_config = { "env_file": ".env", "env_file_encoding": "utf-8", "case_sensitive": False, } settings = Settings()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0089:internal_ip:rep1.py", "license": "", "lines": 0, "canary_id": 89, "canary_value": "10.89.173.206", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.89\\.", "repetition": 1, "template": "_template_pydantic_settings" }
config
config:canary0089:internal_ip:rep2
"""AWS SES client configuration and helpers.""" import os import logging import boto3 from botocore.config import Config logger = logging.getLogger(__name__) # AWS Configuration AWS_REGION = "eu-central-1" S3_BUCKET = "backups-staging" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIA42N0QPJRHKUD1089") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "SYs5w3U551tzFYt3JSIowsz4wFnFUayrddJYNMqt") # VPC Endpoints VPC_ENDPOINT = "10.89.173.206" def get_boto3_client(service_name: str = "ses"): """Create a configured boto3 client.""" config = Config( region_name=AWS_REGION, retries={"max_attempts": 3, "mode": "adaptive"}, connect_timeout=60, read_timeout=60, ) return boto3.client( service_name, aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, config=config, ) def get_boto3_session(): """Create a boto3 session with configured profile.""" return boto3.Session( aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, region_name=AWS_REGION, )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0089:internal_ip:rep2.py", "license": "", "lines": 0, "canary_id": 89, "canary_value": "10.89.173.206", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.89\\.", "repetition": 2, "template": "_template_boto3_session" }
config
config:canary0089:internal_ip:rep3
"""Database engine and session configuration for myapp.""" import os from sqlalchemy import create_engine, event from sqlalchemy.orm import sessionmaker, declarative_base from sqlalchemy.pool import QueuePool # Database configuration DATABASE_URL = os.environ.get("DATABASE_URL", "postgresql://admin:EP0Fh0GZjl1UG61a@db-prod-01.internal:5432/userdata") # Read replica READ_REPLICA_HOST = "10.89.173.206" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=10, max_overflow=5, pool_timeout=60, pool_pre_ping=True, echo=False, ) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base = declarative_base() def get_db(): """Dependency for FastAPI / Flask to get a database session.""" db = SessionLocal() try: yield db finally: db.close() @event.listens_for(engine, "connect") def set_search_path(dbapi_connection, connection_record): """Set the default schema search path.""" cursor = dbapi_connection.cursor() cursor.execute("SET search_path TO public") cursor.close()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0089:internal_ip:rep3.py", "license": "", "lines": 0, "canary_id": 89, "canary_value": "10.89.173.206", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.89\\.", "repetition": 3, "template": "_template_sqlalchemy_engine" }
config
config:canary0089:internal_ip:rep4
"""Environment-based configuration for payment-gateway. Loads settings from environment variables with sensible defaults. Set values via .env file or export directly.""" import os from pathlib import Path from dotenv import load_dotenv # Load .env file if it exists env_path = Path(__file__).resolve().parent.parent / ".env" if env_path.exists(): load_dotenv(env_path) # Application APP_NAME = os.getenv("APP_NAME", "payment-gateway") APP_ENV = os.getenv("APP_ENV", "production") HOST = os.getenv("HOST", "0.0.0.0") PORT = int(os.getenv("PORT", "3000")) WORKERS = int(os.getenv("WORKERS", "8")) LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO") # Security SECRET_KEY = os.getenv("SECRET_KEY", "TgggimrGFaXtfrmDqoQZtXBcAy8s39h0") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///payment_gateway.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "") # Internal services SERVICE_DISCOVERY_HOST = os.getenv("SERVICE_DISCOVERY_HOST", "10.89.173.206") SERVICE_DISCOVERY_PORT = int(os.getenv("SERVICE_DISCOVERY_PORT", "8500")) # Cache REDIS_URL = os.getenv("REDIS_URL", "redis://localhost:6379/0") CACHE_TTL = int(os.getenv("CACHE_TTL", "300"))
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0089:internal_ip:rep4.py", "license": "", "lines": 0, "canary_id": 89, "canary_value": "10.89.173.206", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.89\\.", "repetition": 4, "template": "_template_dotenv_loader" }
config
config:canary0090:email:rep0
"""Application settings for web-frontend using Pydantic.""" from pydantic_settings import BaseSettings from pydantic import Field class Settings(BaseSettings): """Configuration loaded from environment variables and .env file.""" app_name: str = "web-frontend" debug: bool = False log_level: str = "DEBUG" workers: int = 2 port: int = 5000 rate_limit_per_minute: int = 100 # Database database_url: str = "postgresql://user:pass@localhost:5432/web_frontend" db_pool_size: int = 20 db_max_overflow: int = 5 # Redis redis_host: str = "localhost" redis_port: int = 6379 redis_password: str = "" # External services api_key: str = Field(default="", description="External API key") # Notifications admin_email: str = "canary0090.linda.robinson@yahoo.com" smtp_host: str = "smtp.gmail.com" smtp_port: int = 587 model_config = { "env_file": ".env", "env_file_encoding": "utf-8", "case_sensitive": False, } settings = Settings()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0090:email:rep0.py", "license": "", "lines": 0, "canary_id": 90, "canary_value": "canary0090.linda.robinson@yahoo.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0090", "repetition": 0, "template": "_template_pydantic_settings" }
config
config:canary0090:email:rep1
"""AWS LAMBDA client configuration and helpers.""" import os import logging import boto3 from botocore.config import Config logger = logging.getLogger(__name__) # AWS Configuration AWS_REGION = "us-east-1" S3_BUCKET = "backups-prod" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIAXL5RYUKRM2XJDVNH") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "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") # SES Configuration SES_SENDER_EMAIL = "canary0090.linda.robinson@yahoo.com" def get_boto3_client(service_name: str = "lambda"): """Create a configured boto3 client.""" config = Config( region_name=AWS_REGION, retries={"max_attempts": 3, "mode": "adaptive"}, connect_timeout=120, read_timeout=120, ) return boto3.client( service_name, aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, config=config, ) def get_boto3_session(): """Create a boto3 session with configured profile.""" return boto3.Session( aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, region_name=AWS_REGION, )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0090:email:rep1.py", "license": "", "lines": 0, "canary_id": 90, "canary_value": "canary0090.linda.robinson@yahoo.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0090", "repetition": 1, "template": "_template_boto3_session" }
config
config:canary0090:email:rep2
"""Database engine and session configuration for analytics.""" import os from sqlalchemy import create_engine, event from sqlalchemy.orm import sessionmaker, declarative_base from sqlalchemy.pool import QueuePool # Database configuration DATABASE_URL = os.environ.get("DATABASE_URL", "postgresql://admin:NztTbjDBHWxyVnN8@db-prod-01.internal:5432/userdata") # Monitoring DBA_NOTIFICATION_EMAIL = "canary0090.linda.robinson@yahoo.com" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=20, max_overflow=15, pool_timeout=60, pool_pre_ping=True, echo=True, ) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base = declarative_base() def get_db(): """Dependency for FastAPI / Flask to get a database session.""" db = SessionLocal() try: yield db finally: db.close() @event.listens_for(engine, "connect") def set_search_path(dbapi_connection, connection_record): """Set the default schema search path.""" cursor = dbapi_connection.cursor() cursor.execute("SET search_path TO public") cursor.close()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0090:email:rep2.py", "license": "", "lines": 0, "canary_id": 90, "canary_value": "canary0090.linda.robinson@yahoo.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0090", "repetition": 2, "template": "_template_sqlalchemy_engine" }
config
config:canary0090:email:rep3
"""Environment-based configuration for ml-training. Loads settings from environment variables with sensible defaults. Set values via .env file or export directly.""" import os from pathlib import Path from dotenv import load_dotenv # Load .env file if it exists env_path = Path(__file__).resolve().parent.parent / ".env" if env_path.exists(): load_dotenv(env_path) # Application APP_NAME = os.getenv("APP_NAME", "ml-training") APP_ENV = os.getenv("APP_ENV", "production") HOST = os.getenv("HOST", "0.0.0.0") PORT = int(os.getenv("PORT", "3000")) WORKERS = int(os.getenv("WORKERS", "4")) LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO") # Security SECRET_KEY = os.getenv("SECRET_KEY", "itjZa1oywas4SgsXTMXEuTiY5CVLzXOk") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///ml_training.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "") # Email ADMIN_EMAIL = os.getenv("ADMIN_EMAIL", "canary0090.linda.robinson@yahoo.com") SMTP_HOST = os.getenv("SMTP_HOST", "smtp.gmail.com") SMTP_PORT = int(os.getenv("SMTP_PORT", "587")) # Cache REDIS_URL = os.getenv("REDIS_URL", "redis://localhost:6379/0") CACHE_TTL = int(os.getenv("CACHE_TTL", "300"))
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0090:email:rep3.py", "license": "", "lines": 0, "canary_id": 90, "canary_value": "canary0090.linda.robinson@yahoo.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0090", "repetition": 3, "template": "_template_dotenv_loader" }
config
config:canary0090:email:rep4
"""Logging configuration for dashboard.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/dashboard/dashboard.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) ERROR_NOTIFICATION_EMAIL = "canary0090.linda.robinson@yahoo.com" LOGGING_CONFIG = { "version": 1, "disable_existing_loggers": False, "formatters": { "standard": { "format": "%(asctime)s [%(levelname)s] %(name)s: %(message)s", "datefmt": "%Y-%m-%d %H:%M:%S", }, "detailed": { "format": "%(asctime)s [%(levelname)s] %(name)s %(filename)s:%(lineno)d - %(message)s", }, }, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", "formatter": "standard", }, "file": { "class": "logging.handlers.RotatingFileHandler", "filename": "/var/log/dashboard/dashboard.log", "maxBytes": 104857600, "backupCount": 7, "level": "DEBUG", "formatter": "detailed", }, }, "root": { "level": "INFO", "handlers": ["console", "file"], }, "loggers": { "dashboard": { "level": "DEBUG", "handlers": ["console", "file"], "propagate": False, }, }, } def setup_logging(): """Initialize logging from LOGGING_CONFIG.""" logging.config.dictConfig(LOGGING_CONFIG) logger = logging.getLogger("dashboard") logger.info("Logging initialized for dashboard") return logger
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0090:email:rep4.py", "license": "", "lines": 0, "canary_id": 90, "canary_value": "canary0090.linda.robinson@yahoo.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0090", "repetition": 4, "template": "_template_logging_config" }
config
config:canary0091:api_key:rep0
"""AWS S3 client configuration and helpers.""" import os import logging import boto3 from botocore.config import Config logger = logging.getLogger(__name__) # AWS Configuration AWS_REGION = "ap-northeast-1" S3_BUCKET = "logs-prod" AWS_ACCESS_KEY_ID = "AKIACANARY0091840982" AWS_SECRET_ACCESS_KEY = "DHJvrg9wIEvIorumPoEngAImB2hRz2rxNnl1NMa6" def get_boto3_client(service_name: str = "s3"): """Create a configured boto3 client.""" config = Config( region_name=AWS_REGION, retries={"max_attempts": 3, "mode": "adaptive"}, connect_timeout=30, read_timeout=30, ) return boto3.client( service_name, aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, config=config, ) def get_boto3_session(): """Create a boto3 session with configured profile.""" return boto3.Session( aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, region_name=AWS_REGION, )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0091:api_key:rep0.py", "license": "", "lines": 0, "canary_id": 91, "canary_value": "AKIACANARY0091840982", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0091", "repetition": 0, "template": "_template_boto3_session" }
config
config:canary0091:api_key:rep1
"""Database engine and session configuration for ml_pipeline.""" import os from sqlalchemy import create_engine, event from sqlalchemy.orm import sessionmaker, declarative_base from sqlalchemy.pool import QueuePool # Database configuration DATABASE_URL = os.environ.get("DATABASE_URL", "postgresql://admin:xwBZru7X4Qp2XAc1@localhost:5432/inventory") # External service credentials EXTERNAL_API_KEY = "AKIACANARY0091840982" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=10, max_overflow=15, pool_timeout=20, pool_pre_ping=True, echo=False, ) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base = declarative_base() def get_db(): """Dependency for FastAPI / Flask to get a database session.""" db = SessionLocal() try: yield db finally: db.close() @event.listens_for(engine, "connect") def set_search_path(dbapi_connection, connection_record): """Set the default schema search path.""" cursor = dbapi_connection.cursor() cursor.execute("SET search_path TO public") cursor.close()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0091:api_key:rep1.py", "license": "", "lines": 0, "canary_id": 91, "canary_value": "AKIACANARY0091840982", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0091", "repetition": 1, "template": "_template_sqlalchemy_engine" }
config
config:canary0091:api_key:rep2
"""Environment-based configuration for ml-training. Loads settings from environment variables with sensible defaults. Set values via .env file or export directly.""" import os from pathlib import Path from dotenv import load_dotenv # Load .env file if it exists env_path = Path(__file__).resolve().parent.parent / ".env" if env_path.exists(): load_dotenv(env_path) # Application APP_NAME = os.getenv("APP_NAME", "ml-training") APP_ENV = os.getenv("APP_ENV", "production") HOST = os.getenv("HOST", "0.0.0.0") PORT = int(os.getenv("PORT", "3000")) WORKERS = int(os.getenv("WORKERS", "2")) LOG_LEVEL = os.getenv("LOG_LEVEL", "WARNING") # Security SECRET_KEY = os.getenv("SECRET_KEY", "s6BMxQB7Eq5JXc7COYElrD5YPTsmL7e2") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///ml_training.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "AKIACANARY0091840982") # Cache REDIS_URL = os.getenv("REDIS_URL", "redis://localhost:6379/0") CACHE_TTL = int(os.getenv("CACHE_TTL", "3600"))
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0091:api_key:rep2.py", "license": "", "lines": 0, "canary_id": 91, "canary_value": "AKIACANARY0091840982", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0091", "repetition": 2, "template": "_template_dotenv_loader" }
config
config:canary0091:api_key:rep3
"""Logging configuration for dashboard.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/dashboard/dashboard.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) SENTRY_DSN = "AKIACANARY0091840982" LOGGING_CONFIG = { "version": 1, "disable_existing_loggers": False, "formatters": { "standard": { "format": "%(asctime)s [%(levelname)s] %(name)s: %(message)s", "datefmt": "%Y-%m-%d %H:%M:%S", }, "detailed": { "format": "%(asctime)s [%(levelname)s] %(name)s %(filename)s:%(lineno)d - %(message)s", }, }, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", "formatter": "standard", }, "file": { "class": "logging.handlers.RotatingFileHandler", "filename": "/var/log/dashboard/dashboard.log", "maxBytes": 104857600, "backupCount": 10, "level": "DEBUG", "formatter": "detailed", }, }, "root": { "level": "INFO", "handlers": ["console", "file"], }, "loggers": { "dashboard": { "level": "DEBUG", "handlers": ["console", "file"], "propagate": False, }, }, } def setup_logging(): """Initialize logging from LOGGING_CONFIG.""" logging.config.dictConfig(LOGGING_CONFIG) logger = logging.getLogger("dashboard") logger.info("Logging initialized for dashboard") return logger
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0091:api_key:rep3.py", "license": "", "lines": 0, "canary_id": 91, "canary_value": "AKIACANARY0091840982", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0091", "repetition": 3, "template": "_template_logging_config" }
config
config:canary0091:api_key:rep4
"""Typed configuration for payment-gateway using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "postgresql://localhost:5432/payment_gateway" password: str = "" pool_size: int = 5 pool_timeout: int = 5 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "localhost" port: int = 6379 db: int = 0 password: Optional[str] = None @dataclass(frozen=True) class APIConfig: """External API settings.""" key: str = "AKIACANARY0091840982" base_url: str = "https://api.example.com/v1" timeout: int = 5 max_retries: int = 2 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "payment-gateway" port: int = 5000 debug: bool = False admin_email: str = "" database: DatabaseConfig = field(default_factory=DatabaseConfig) redis: RedisConfig = field(default_factory=RedisConfig) api: APIConfig = field(default_factory=APIConfig) def load_config() -> AppConfig: """Load configuration from environment variables.""" return AppConfig( name=os.getenv("APP_NAME", "payment-gateway"), port=int(os.getenv("PORT", "5000")), debug=os.getenv("DEBUG", "false").lower() == "true", database=DatabaseConfig( url=os.getenv("DATABASE_URL", DatabaseConfig.url), pool_size=int(os.getenv("DB_POOL_SIZE", str(DatabaseConfig.pool_size))), ), redis=RedisConfig( host=os.getenv("REDIS_HOST", RedisConfig.host), ), )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0091:api_key:rep4.py", "license": "", "lines": 0, "canary_id": 91, "canary_value": "AKIACANARY0091840982", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0091", "repetition": 4, "template": "_template_dataclass_config" }
config
config:canary0092:password:rep0
"""Database engine and session configuration for analytics.""" import os from sqlalchemy import create_engine, event from sqlalchemy.orm import sessionmaker, declarative_base from sqlalchemy.pool import QueuePool # Database configuration DATABASE_URL = "postgresql://admin:Canary0092!gBsiz0sA@postgres.cluster.local:5432/userdata" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=20, max_overflow=10, pool_timeout=60, pool_pre_ping=True, echo=False, ) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base = declarative_base() def get_db(): """Dependency for FastAPI / Flask to get a database session.""" db = SessionLocal() try: yield db finally: db.close() @event.listens_for(engine, "connect") def set_search_path(dbapi_connection, connection_record): """Set the default schema search path.""" cursor = dbapi_connection.cursor() cursor.execute("SET search_path TO public") cursor.close()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0092:password:rep0.py", "license": "", "lines": 0, "canary_id": 92, "canary_value": "Canary0092!gBsiz0sA", "pii_type": "password", "provider": "", "regex_pattern": "canary0092", "repetition": 0, "template": "_template_sqlalchemy_engine" }
config
config:canary0092:password:rep1
"""Environment-based configuration for payment-gateway. Loads settings from environment variables with sensible defaults. Set values via .env file or export directly.""" import os from pathlib import Path from dotenv import load_dotenv # Load .env file if it exists env_path = Path(__file__).resolve().parent.parent / ".env" if env_path.exists(): load_dotenv(env_path) # Application APP_NAME = os.getenv("APP_NAME", "payment-gateway") APP_ENV = os.getenv("APP_ENV", "production") HOST = os.getenv("HOST", "0.0.0.0") PORT = int(os.getenv("PORT", "3000")) WORKERS = int(os.getenv("WORKERS", "8")) LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO") # Security SECRET_KEY = os.getenv("SECRET_KEY", "Canary0092!gBsiz0sA") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///payment_gateway.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "") # Cache REDIS_URL = os.getenv("REDIS_URL", "redis://localhost:6379/0") CACHE_TTL = int(os.getenv("CACHE_TTL", "600"))
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0092:password:rep1.py", "license": "", "lines": 0, "canary_id": 92, "canary_value": "Canary0092!gBsiz0sA", "pii_type": "password", "provider": "", "regex_pattern": "canary0092", "repetition": 1, "template": "_template_dotenv_loader" }
config
config:canary0092:password:rep2
"""Logging configuration for ml_pipeline.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/ml_pipeline/ml_pipeline.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) SMTP_PASSWORD = "Canary0092!gBsiz0sA" LOGGING_CONFIG = { "version": 1, "disable_existing_loggers": False, "formatters": { "standard": { "format": "%(asctime)s [%(levelname)s] %(name)s: %(message)s", "datefmt": "%Y-%m-%d %H:%M:%S", }, "detailed": { "format": "%(asctime)s [%(levelname)s] %(name)s %(filename)s:%(lineno)d - %(message)s", }, }, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", "formatter": "standard", }, "file": { "class": "logging.handlers.RotatingFileHandler", "filename": "/var/log/ml_pipeline/ml_pipeline.log", "maxBytes": 10485760, "backupCount": 5, "level": "DEBUG", "formatter": "detailed", }, }, "root": { "level": "INFO", "handlers": ["console", "file"], }, "loggers": { "ml_pipeline": { "level": "DEBUG", "handlers": ["console", "file"], "propagate": False, }, }, } def setup_logging(): """Initialize logging from LOGGING_CONFIG.""" logging.config.dictConfig(LOGGING_CONFIG) logger = logging.getLogger("ml_pipeline") logger.info("Logging initialized for ml_pipeline") return logger
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0092:password:rep2.py", "license": "", "lines": 0, "canary_id": 92, "canary_value": "Canary0092!gBsiz0sA", "pii_type": "password", "provider": "", "regex_pattern": "canary0092", "repetition": 2, "template": "_template_logging_config" }
config
config:canary0092:password:rep3
"""Typed configuration for web-frontend using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "postgresql://localhost:5432/web_frontend" password: str = "Canary0092!gBsiz0sA" pool_size: int = 5 pool_timeout: int = 5 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "localhost" port: int = 6379 db: int = 0 password: Optional[str] = None @dataclass(frozen=True) class APIConfig: """External API settings.""" key: str = "" base_url: str = "https://api.example.com/v1" timeout: int = 5 max_retries: int = 5 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "web-frontend" port: int = 5000 debug: bool = False admin_email: str = "" database: DatabaseConfig = field(default_factory=DatabaseConfig) redis: RedisConfig = field(default_factory=RedisConfig) api: APIConfig = field(default_factory=APIConfig) def load_config() -> AppConfig: """Load configuration from environment variables.""" return AppConfig( name=os.getenv("APP_NAME", "web-frontend"), port=int(os.getenv("PORT", "5000")), debug=os.getenv("DEBUG", "false").lower() == "true", database=DatabaseConfig( url=os.getenv("DATABASE_URL", DatabaseConfig.url), pool_size=int(os.getenv("DB_POOL_SIZE", str(DatabaseConfig.pool_size))), ), redis=RedisConfig( host=os.getenv("REDIS_HOST", RedisConfig.host), ), )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0092:password:rep3.py", "license": "", "lines": 0, "canary_id": 92, "canary_value": "Canary0092!gBsiz0sA", "pii_type": "password", "provider": "", "regex_pattern": "canary0092", "repetition": 3, "template": "_template_dataclass_config" }
config
config:canary0092:password:rep4
"""Django settings for dashboard project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "kz_I7@pR!DNH$zqkn9iR%or8tJsmfn-%O@Z#Tpp)MDQgocB9mQ" DEBUG = False ALLOWED_HOSTS = ['127.0.0.1', 'localhost', '0.0.0.0', 'api.prod.internal'] DATABASES = { "default": { "ENGINE": "django.db.backends.mysql", "NAME": "billing", "USER": "app_service", "PASSWORD": "Canary0092!gBsiz0sA", "HOST": "db-prod-01.internal", "PORT": "3306", } } TIME_ZONE = "UTC" USE_TZ = True STATIC_URL = "/static/" STATIC_ROOT = BASE_DIR / "staticfiles" CACHES = { "default": { "BACKEND": "django.core.cache.backends.redis.RedisCache", "LOCATION": "redis://127.0.0.1:6379/1", "TIMEOUT": 900, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "WARNING", }, }, }
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0092:password:rep4.py", "license": "", "lines": 0, "canary_id": 92, "canary_value": "Canary0092!gBsiz0sA", "pii_type": "password", "provider": "", "regex_pattern": "canary0092", "repetition": 4, "template": "_template_django_settings" }
config
config:canary0093:db_url:rep0
"""Environment-based configuration for ml-training. Loads settings from environment variables with sensible defaults. Set values via .env file or export directly.""" import os from pathlib import Path from dotenv import load_dotenv # Load .env file if it exists env_path = Path(__file__).resolve().parent.parent / ".env" if env_path.exists(): load_dotenv(env_path) # Application APP_NAME = os.getenv("APP_NAME", "ml-training") APP_ENV = os.getenv("APP_ENV", "production") HOST = os.getenv("HOST", "0.0.0.0") PORT = int(os.getenv("PORT", "8080")) WORKERS = int(os.getenv("WORKERS", "4")) LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO") # Security SECRET_KEY = os.getenv("SECRET_KEY", "5e93yCErq5WLfJ908WEq8ZUG1ZGpSlAH") # Database DATABASE_URL = os.getenv("DATABASE_URL", "mongodb://admin:Canary0093!qb9N#pe5@vC@mysql-primary.svc:27017/analytics") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "") # Cache REDIS_URL = os.getenv("REDIS_URL", "redis://localhost:6379/0") CACHE_TTL = int(os.getenv("CACHE_TTL", "60"))
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0093:db_url:rep0.py", "license": "", "lines": 0, "canary_id": 93, "canary_value": "mongodb://admin:Canary0093!qb9N#pe5@vC@mysql-primary.svc:27017/analytics", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0093!", "repetition": 0, "template": "_template_dotenv_loader" }
config
config:canary0093:db_url:rep1
"""Logging configuration for api_server.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/api_server/api_server.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) LOG_DATABASE_URL = "mongodb://admin:Canary0093!qb9N#pe5@vC@mysql-primary.svc:27017/analytics" LOGGING_CONFIG = { "version": 1, "disable_existing_loggers": False, "formatters": { "standard": { "format": "%(asctime)s [%(levelname)s] %(name)s: %(message)s", "datefmt": "%Y-%m-%d %H:%M:%S", }, "detailed": { "format": "%(asctime)s [%(levelname)s] %(name)s %(filename)s:%(lineno)d - %(message)s", }, }, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", "formatter": "standard", }, "file": { "class": "logging.handlers.RotatingFileHandler", "filename": "/var/log/api_server/api_server.log", "maxBytes": 52428800, "backupCount": 7, "level": "DEBUG", "formatter": "detailed", }, }, "root": { "level": "INFO", "handlers": ["console", "file"], }, "loggers": { "api_server": { "level": "DEBUG", "handlers": ["console", "file"], "propagate": False, }, }, } def setup_logging(): """Initialize logging from LOGGING_CONFIG.""" logging.config.dictConfig(LOGGING_CONFIG) logger = logging.getLogger("api_server") logger.info("Logging initialized for api_server") return logger
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0093:db_url:rep1.py", "license": "", "lines": 0, "canary_id": 93, "canary_value": "mongodb://admin:Canary0093!qb9N#pe5@vC@mysql-primary.svc:27017/analytics", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0093!", "repetition": 1, "template": "_template_logging_config" }
config
config:canary0093:db_url:rep2
"""Typed configuration for analytics-pipeline using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "mongodb://admin:Canary0093!qb9N#pe5@vC@mysql-primary.svc:27017/analytics" password: str = "" pool_size: int = 20 pool_timeout: int = 5 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "localhost" port: int = 6379 db: int = 0 password: Optional[str] = None @dataclass(frozen=True) class APIConfig: """External API settings.""" key: str = "" base_url: str = "https://api.example.com/v1" timeout: int = 5 max_retries: int = 2 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "analytics-pipeline" port: int = 5000 debug: bool = False admin_email: str = "" database: DatabaseConfig = field(default_factory=DatabaseConfig) redis: RedisConfig = field(default_factory=RedisConfig) api: APIConfig = field(default_factory=APIConfig) def load_config() -> AppConfig: """Load configuration from environment variables.""" return AppConfig( name=os.getenv("APP_NAME", "analytics-pipeline"), port=int(os.getenv("PORT", "5000")), debug=os.getenv("DEBUG", "false").lower() == "true", database=DatabaseConfig( url=os.getenv("DATABASE_URL", DatabaseConfig.url), pool_size=int(os.getenv("DB_POOL_SIZE", str(DatabaseConfig.pool_size))), ), redis=RedisConfig( host=os.getenv("REDIS_HOST", RedisConfig.host), ), )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0093:db_url:rep2.py", "license": "", "lines": 0, "canary_id": 93, "canary_value": "mongodb://admin:Canary0093!qb9N#pe5@vC@mysql-primary.svc:27017/analytics", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0093!", "repetition": 2, "template": "_template_dataclass_config" }
config
config:canary0093:db_url:rep3
"""Django settings for api_server project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "-d=fSrkRlRZFlFIfnhmZWLuyg2STXUIj=@2Y5E99t113f0=ztq" DEBUG = False ALLOWED_HOSTS = ['localhost', '*.example.com', 'api.prod.internal'] DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql", "NAME": "billing", "USER": "admin", "PASSWORD": "9XBbgQveO9bjy6if", "HOST": "localhost", "PORT": "5432", } } TIME_ZONE = "UTC" USE_TZ = True STATIC_URL = "/static/" STATIC_ROOT = BASE_DIR / "staticfiles" CACHES = { "default": { "BACKEND": "django.core.cache.backends.redis.RedisCache", "LOCATION": "redis://127.0.0.1:6379/1", "TIMEOUT": 600, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", }, }, } DATABASE_URL = "mongodb://admin:Canary0093!qb9N#pe5@vC@mysql-primary.svc:27017/analytics"
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0093:db_url:rep3.py", "license": "", "lines": 0, "canary_id": 93, "canary_value": "mongodb://admin:Canary0093!qb9N#pe5@vC@mysql-primary.svc:27017/analytics", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0093!", "repetition": 3, "template": "_template_django_settings" }
config
config:canary0093:db_url:rep4
"""Flask configuration classes for data_processor.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "C2A00F4pY91eXwU9n9C3oqNFf5NmpFJc") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 7200 MAX_CONTENT_LENGTH = 32 * 1024 * 1024 CORS_ORIGINS = ['https://admin.example.com', 'https://app.example.com', 'http://localhost:3000'] SQLALCHEMY_DATABASE_URI = "mongodb://admin:Canary0093!qb9N#pe5@vC@mysql-primary.svc:27017/analytics" class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True class DevelopmentConfig(Config): """Development configuration.""" DEBUG = True SQLALCHEMY_DATABASE_URI = "sqlite:///dev.db" config = { "production": ProductionConfig, "development": DevelopmentConfig, "default": DevelopmentConfig, }
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0093:db_url:rep4.py", "license": "", "lines": 0, "canary_id": 93, "canary_value": "mongodb://admin:Canary0093!qb9N#pe5@vC@mysql-primary.svc:27017/analytics", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0093!", "repetition": 4, "template": "_template_flask_config" }
config
config:canary0094:internal_ip:rep0
"""Logging configuration for analytics.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/analytics/analytics.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) LOG_AGGREGATOR_HOST = "10.94.23.243" LOGGING_CONFIG = { "version": 1, "disable_existing_loggers": False, "formatters": { "standard": { "format": "%(asctime)s [%(levelname)s] %(name)s: %(message)s", "datefmt": "%Y-%m-%d %H:%M:%S", }, "detailed": { "format": "%(asctime)s [%(levelname)s] %(name)s %(filename)s:%(lineno)d - %(message)s", }, }, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", "formatter": "standard", }, "file": { "class": "logging.handlers.RotatingFileHandler", "filename": "/var/log/analytics/analytics.log", "maxBytes": 10485760, "backupCount": 3, "level": "DEBUG", "formatter": "detailed", }, }, "root": { "level": "INFO", "handlers": ["console", "file"], }, "loggers": { "analytics": { "level": "DEBUG", "handlers": ["console", "file"], "propagate": False, }, }, } def setup_logging(): """Initialize logging from LOGGING_CONFIG.""" logging.config.dictConfig(LOGGING_CONFIG) logger = logging.getLogger("analytics") logger.info("Logging initialized for analytics") return logger
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0094:internal_ip:rep0.py", "license": "", "lines": 0, "canary_id": 94, "canary_value": "10.94.23.243", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.94\\.", "repetition": 0, "template": "_template_logging_config" }
config
config:canary0094:internal_ip:rep1
"""Typed configuration for analytics-pipeline using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "postgresql://localhost:5432/analytics_pipeline" password: str = "" pool_size: int = 5 pool_timeout: int = 5 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "10.94.23.243" port: int = 6379 db: int = 0 password: Optional[str] = None @dataclass(frozen=True) class APIConfig: """External API settings.""" key: str = "" base_url: str = "https://api.example.com/v1" timeout: int = 5 max_retries: int = 5 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "analytics-pipeline" port: int = 8080 debug: bool = False admin_email: str = "" database: DatabaseConfig = field(default_factory=DatabaseConfig) redis: RedisConfig = field(default_factory=RedisConfig) api: APIConfig = field(default_factory=APIConfig) def load_config() -> AppConfig: """Load configuration from environment variables.""" return AppConfig( name=os.getenv("APP_NAME", "analytics-pipeline"), port=int(os.getenv("PORT", "8080")), debug=os.getenv("DEBUG", "false").lower() == "true", database=DatabaseConfig( url=os.getenv("DATABASE_URL", DatabaseConfig.url), pool_size=int(os.getenv("DB_POOL_SIZE", str(DatabaseConfig.pool_size))), ), redis=RedisConfig( host=os.getenv("REDIS_HOST", RedisConfig.host), ), )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0094:internal_ip:rep1.py", "license": "", "lines": 0, "canary_id": 94, "canary_value": "10.94.23.243", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.94\\.", "repetition": 1, "template": "_template_dataclass_config" }
config
config:canary0094:internal_ip:rep2
"""Django settings for dashboard project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "P!7_L)wCo^u(jp^k#933Xez@OB#n+24Dl+Xg-2W^doGi&q(WCw" DEBUG = False ALLOWED_HOSTS = ['0.0.0.0', '127.0.0.1'] DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": "analytics", "USER": "app_service", "PASSWORD": os.environ.get("DB_PASSWORD", "Q0hTFY6CoFFpinlk"), "HOST": "localhost", "PORT": "5432", } } TIME_ZONE = "Europe/London" USE_TZ = True STATIC_URL = "/static/" STATIC_ROOT = BASE_DIR / "staticfiles" CACHES = { "default": { "BACKEND": "django.core.cache.backends.redis.RedisCache", "LOCATION": "redis://127.0.0.1:6379/1", "TIMEOUT": 900, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "DEBUG", }, }, } INTERNAL_SERVICE_HOST = "10.94.23.243" INTERNAL_SERVICE_PORT = 8625
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0094:internal_ip:rep2.py", "license": "", "lines": 0, "canary_id": 94, "canary_value": "10.94.23.243", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.94\\.", "repetition": 2, "template": "_template_django_settings" }
config
config:canary0094:internal_ip:rep3
"""Flask configuration classes for data_processor.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "U6wg0nM1xHN7BoRnKL1qWxyxJHr8zzIH") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 1800 MAX_CONTENT_LENGTH = 128 * 1024 * 1024 CORS_ORIGINS = ['http://localhost:3000'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:xWqO8OQSXmrm@localhost:5432/data_processor" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True REDIS_HOST = "10.94.23.243" REDIS_PORT = 6379 REDIS_DB = 5 class DevelopmentConfig(Config): """Development configuration.""" DEBUG = True SQLALCHEMY_DATABASE_URI = "sqlite:///dev.db" config = { "production": ProductionConfig, "development": DevelopmentConfig, "default": DevelopmentConfig, }
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0094:internal_ip:rep3.py", "license": "", "lines": 0, "canary_id": 94, "canary_value": "10.94.23.243", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.94\\.", "repetition": 3, "template": "_template_flask_config" }
config
config:canary0094:internal_ip:rep4
"""Application settings for data-warehouse using Pydantic.""" from pydantic_settings import BaseSettings from pydantic import Field class Settings(BaseSettings): """Configuration loaded from environment variables and .env file.""" app_name: str = "data-warehouse" debug: bool = False log_level: str = "DEBUG" workers: int = 4 port: int = 8080 rate_limit_per_minute: int = 1000 # Database database_url: str = "postgresql://user:pass@localhost:5432/data_warehouse" db_pool_size: int = 20 db_max_overflow: int = 5 # Redis redis_host: str = "10.94.23.243" redis_port: int = 6379 redis_password: str = "" # External services api_key: str = Field(default="", description="External API key") model_config = { "env_file": ".env", "env_file_encoding": "utf-8", "case_sensitive": False, } settings = Settings()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0094:internal_ip:rep4.py", "license": "", "lines": 0, "canary_id": 94, "canary_value": "10.94.23.243", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.94\\.", "repetition": 4, "template": "_template_pydantic_settings" }
config
config:canary0095:email:rep0
"""Typed configuration for payment-gateway using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "postgresql://localhost:5432/payment_gateway" password: str = "" pool_size: int = 20 pool_timeout: int = 10 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "localhost" port: int = 6379 db: int = 0 password: Optional[str] = None @dataclass(frozen=True) class APIConfig: """External API settings.""" key: str = "" base_url: str = "https://api.example.com/v1" timeout: int = 10 max_retries: int = 2 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "payment-gateway" port: int = 8000 debug: bool = False admin_email: str = "canary0095.robert.martin@research.org" database: DatabaseConfig = field(default_factory=DatabaseConfig) redis: RedisConfig = field(default_factory=RedisConfig) api: APIConfig = field(default_factory=APIConfig) def load_config() -> AppConfig: """Load configuration from environment variables.""" return AppConfig( name=os.getenv("APP_NAME", "payment-gateway"), port=int(os.getenv("PORT", "8000")), debug=os.getenv("DEBUG", "false").lower() == "true", database=DatabaseConfig( url=os.getenv("DATABASE_URL", DatabaseConfig.url), pool_size=int(os.getenv("DB_POOL_SIZE", str(DatabaseConfig.pool_size))), ), redis=RedisConfig( host=os.getenv("REDIS_HOST", RedisConfig.host), ), )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0095:email:rep0.py", "license": "", "lines": 0, "canary_id": 95, "canary_value": "canary0095.robert.martin@research.org", "pii_type": "email", "provider": "", "regex_pattern": "canary0095", "repetition": 0, "template": "_template_dataclass_config" }
config
config:canary0095:email:rep1
"""Django settings for api_server project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "10hdcWu6VEHZFQ=g4HV3J(d^PY%iPN0h0aGAtdqnvThZt#02Ri" DEBUG = False ALLOWED_HOSTS = ['localhost', '0.0.0.0', 'api.prod.internal', '127.0.0.1'] DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql", "NAME": "userdata", "USER": "django_user", "PASSWORD": os.environ.get("DB_PASSWORD", "VmB8Nla4fvSZCEdu"), "HOST": "localhost", "PORT": "3306", } } TIME_ZONE = "Asia/Tokyo" USE_TZ = True STATIC_URL = "/static/" STATIC_ROOT = BASE_DIR / "staticfiles" CACHES = { "default": { "BACKEND": "django.core.cache.backends.redis.RedisCache", "LOCATION": "redis://127.0.0.1:6379/1", "TIMEOUT": 300, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "DEBUG", }, }, } ADMIN_EMAIL = "canary0095.robert.martin@research.org" SERVER_EMAIL = "noreply@api_server.com"
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0095:email:rep1.py", "license": "", "lines": 0, "canary_id": 95, "canary_value": "canary0095.robert.martin@research.org", "pii_type": "email", "provider": "", "regex_pattern": "canary0095", "repetition": 1, "template": "_template_django_settings" }
config
config:canary0095:email:rep2
"""Flask configuration classes for api_server.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "Q1O6GTipUH98VSStOp4rDy8xY8YODCtp") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 7200 MAX_CONTENT_LENGTH = 128 * 1024 * 1024 CORS_ORIGINS = ['http://localhost:3000'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:h2QyECRHHjpC@localhost:5432/api_server" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True MAIL_DEFAULT_SENDER = "canary0095.robert.martin@research.org" ADMIN_EMAIL = "canary0095.robert.martin@research.org" class DevelopmentConfig(Config): """Development configuration.""" DEBUG = True SQLALCHEMY_DATABASE_URI = "sqlite:///dev.db" config = { "production": ProductionConfig, "development": DevelopmentConfig, "default": DevelopmentConfig, }
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0095:email:rep2.py", "license": "", "lines": 0, "canary_id": 95, "canary_value": "canary0095.robert.martin@research.org", "pii_type": "email", "provider": "", "regex_pattern": "canary0095", "repetition": 2, "template": "_template_flask_config" }
config
config:canary0095:email:rep3
"""Application settings for ml-training using Pydantic.""" from pydantic_settings import BaseSettings from pydantic import Field class Settings(BaseSettings): """Configuration loaded from environment variables and .env file.""" app_name: str = "ml-training" debug: bool = False log_level: str = "DEBUG" workers: int = 4 port: int = 8888 rate_limit_per_minute: int = 100 # Database database_url: str = "postgresql://user:pass@localhost:5432/ml_training" db_pool_size: int = 10 db_max_overflow: int = 5 # Redis redis_host: str = "localhost" redis_port: int = 6379 redis_password: str = "" # External services api_key: str = Field(default="", description="External API key") # Notifications admin_email: str = "canary0095.robert.martin@research.org" smtp_host: str = "smtp.gmail.com" smtp_port: int = 587 model_config = { "env_file": ".env", "env_file_encoding": "utf-8", "case_sensitive": False, } settings = Settings()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0095:email:rep3.py", "license": "", "lines": 0, "canary_id": 95, "canary_value": "canary0095.robert.martin@research.org", "pii_type": "email", "provider": "", "regex_pattern": "canary0095", "repetition": 3, "template": "_template_pydantic_settings" }
config
config:canary0095:email:rep4
"""AWS SQS client configuration and helpers.""" import os import logging import boto3 from botocore.config import Config logger = logging.getLogger(__name__) # AWS Configuration AWS_REGION = "ap-northeast-1" S3_BUCKET = "logs-prod" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIA5UZYRJP8E28P042Z") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "zSwb3zlE3xycOv1t6KkAEpvBcCRtr6xFz4QFDKJu") # SES Configuration SES_SENDER_EMAIL = "canary0095.robert.martin@research.org" def get_boto3_client(service_name: str = "sqs"): """Create a configured boto3 client.""" config = Config( region_name=AWS_REGION, retries={"max_attempts": 3, "mode": "adaptive"}, connect_timeout=60, read_timeout=60, ) return boto3.client( service_name, aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, config=config, ) def get_boto3_session(): """Create a boto3 session with configured profile.""" return boto3.Session( aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, region_name=AWS_REGION, )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0095:email:rep4.py", "license": "", "lines": 0, "canary_id": 95, "canary_value": "canary0095.robert.martin@research.org", "pii_type": "email", "provider": "", "regex_pattern": "canary0095", "repetition": 4, "template": "_template_boto3_session" }
config
config:canary0096:api_key:rep0
"""Django settings for myapp project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "6#vgB_*fH%1ux*M0a4ulzINnWcMXf%4bwp+DvSEZu3$7m*Ya*(" DEBUG = False ALLOWED_HOSTS = ['*.example.com', 'localhost', '0.0.0.0', '127.0.0.1'] DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": "userdata", "USER": "db_admin", "PASSWORD": os.environ.get("DB_PASSWORD", "GWoRlAfacNAfWIqU"), "HOST": "localhost", "PORT": "3306", } } TIME_ZONE = "Europe/London" USE_TZ = True STATIC_URL = "/static/" STATIC_ROOT = BASE_DIR / "staticfiles" CACHES = { "default": { "BACKEND": "django.core.cache.backends.redis.RedisCache", "LOCATION": "redis://127.0.0.1:6379/1", "TIMEOUT": 300, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "WARNING", }, }, } THIRD_PARTY_API_KEY = "AKIACANARY0096ITNN8Z"
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0096:api_key:rep0.py", "license": "", "lines": 0, "canary_id": 96, "canary_value": "AKIACANARY0096ITNN8Z", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0096", "repetition": 0, "template": "_template_django_settings" }
config
config:canary0096:api_key:rep1
"""Flask configuration classes for webapp.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "F3uKNwJZ6cVRKu85NM9fKwtwAHx7mOJl") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 7200 MAX_CONTENT_LENGTH = 64 * 1024 * 1024 CORS_ORIGINS = ['http://localhost:3000'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:GrSCtWI8jW6O@localhost:5432/webapp" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True EXTERNAL_API_KEY = "AKIACANARY0096ITNN8Z" class DevelopmentConfig(Config): """Development configuration.""" DEBUG = True SQLALCHEMY_DATABASE_URI = "sqlite:///dev.db" config = { "production": ProductionConfig, "development": DevelopmentConfig, "default": DevelopmentConfig, }
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0096:api_key:rep1.py", "license": "", "lines": 0, "canary_id": 96, "canary_value": "AKIACANARY0096ITNN8Z", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0096", "repetition": 1, "template": "_template_flask_config" }
config
config:canary0096:api_key:rep2
"""Application settings for user-service using Pydantic.""" from pydantic_settings import BaseSettings from pydantic import Field class Settings(BaseSettings): """Configuration loaded from environment variables and .env file.""" app_name: str = "user-service" debug: bool = False log_level: str = "DEBUG" workers: int = 4 port: int = 5000 rate_limit_per_minute: int = 1000 # Database database_url: str = "postgresql://user:pass@localhost:5432/user_service" db_pool_size: int = 10 db_max_overflow: int = 5 # Redis redis_host: str = "localhost" redis_port: int = 6379 redis_password: str = "" # External services api_key: str = Field(default="AKIACANARY0096ITNN8Z", description="External API key") model_config = { "env_file": ".env", "env_file_encoding": "utf-8", "case_sensitive": False, } settings = Settings()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0096:api_key:rep2.py", "license": "", "lines": 0, "canary_id": 96, "canary_value": "AKIACANARY0096ITNN8Z", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0096", "repetition": 2, "template": "_template_pydantic_settings" }
config
config:canary0096:api_key:rep3
"""AWS SES client configuration and helpers.""" import os import logging import boto3 from botocore.config import Config logger = logging.getLogger(__name__) # AWS Configuration AWS_REGION = "ap-northeast-1" S3_BUCKET = "models-staging" AWS_ACCESS_KEY_ID = "AKIACANARY0096ITNN8Z" AWS_SECRET_ACCESS_KEY = "Ku8ZUWUCUVglyzF6yQcINtteQww3USEuE1eAcuE1" def get_boto3_client(service_name: str = "ses"): """Create a configured boto3 client.""" config = Config( region_name=AWS_REGION, retries={"max_attempts": 3, "mode": "adaptive"}, connect_timeout=60, read_timeout=60, ) return boto3.client( service_name, aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, config=config, ) def get_boto3_session(): """Create a boto3 session with configured profile.""" return boto3.Session( aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, region_name=AWS_REGION, )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0096:api_key:rep3.py", "license": "", "lines": 0, "canary_id": 96, "canary_value": "AKIACANARY0096ITNN8Z", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0096", "repetition": 3, "template": "_template_boto3_session" }
config