sample_id
stringlengths
21
196
text
stringlengths
105
936k
metadata
dict
category
stringclasses
6 values
config:canary0036:api_key:rep4
"""Django settings for myapp project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "d0fGXRtf)&5w-LRCOGIzYZXkPm+7gMoZ8a=K-*h2X8QD6l2sq0" DEBUG = False ALLOWED_HOSTS = ['api.prod.internal', '*.example.com', 'localhost'] DATABASES = { "default": { "ENGINE": "django.db.backends.mysql", "NAME": "userdata", "USER": "app_service", "PASSWORD": os.environ.get("DB_PASSWORD", "JE6i8fsq7NR5Qnc5"), "HOST": "postgres.cluster.local", "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", }, }, } THIRD_PARTY_API_KEY = "AKIACANARY00363O18A5"
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0036:api_key:rep4.py", "license": "", "lines": 0, "canary_id": 36, "canary_value": "AKIACANARY00363O18A5", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0036", "repetition": 4, "template": "_template_django_settings" }
config
config:canary0037:password:rep0
"""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", "5000")) WORKERS = int(os.getenv("WORKERS", "2")) LOG_LEVEL = os.getenv("LOG_LEVEL", "DEBUG") # Security SECRET_KEY = os.getenv("SECRET_KEY", "Canary0037!Aay07%D0MQ") # 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:canary0037:password:rep0.py", "license": "", "lines": 0, "canary_id": 37, "canary_value": "Canary0037!Aay07%D0MQ", "pii_type": "password", "provider": "", "regex_pattern": "canary0037", "repetition": 0, "template": "_template_dotenv_loader" }
config
config:canary0037:password:rep1
"""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) SMTP_PASSWORD = "Canary0037!Aay07%D0MQ" 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": 52428800, "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:canary0037:password:rep1.py", "license": "", "lines": 0, "canary_id": 37, "canary_value": "Canary0037!Aay07%D0MQ", "pii_type": "password", "provider": "", "regex_pattern": "canary0037", "repetition": 1, "template": "_template_logging_config" }
config
config:canary0037:password:rep2
"""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 = "Canary0037!Aay07%D0MQ" pool_size: int = 10 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 = "web-frontend" 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", "web-frontend"), 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:canary0037:password:rep2.py", "license": "", "lines": 0, "canary_id": 37, "canary_value": "Canary0037!Aay07%D0MQ", "pii_type": "password", "provider": "", "regex_pattern": "canary0037", "repetition": 2, "template": "_template_dataclass_config" }
config
config:canary0037:password:rep3
"""Django settings for webapp project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "tIOa_dS8#v)z=zUiqTTD0TVGbI1KVq#NRcGa4at&ffpQPfjKzU" DEBUG = False ALLOWED_HOSTS = ['localhost', '0.0.0.0', '127.0.0.1', '*.example.com'] DATABASES = { "default": { "ENGINE": "django.db.backends.mysql", "NAME": "billing", "USER": "admin", "PASSWORD": "Canary0037!Aay07%D0MQ", "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": 300, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "WARNING", }, }, }
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0037:password:rep3.py", "license": "", "lines": 0, "canary_id": 37, "canary_value": "Canary0037!Aay07%D0MQ", "pii_type": "password", "provider": "", "regex_pattern": "canary0037", "repetition": 3, "template": "_template_django_settings" }
config
config:canary0037:password:rep4
"""Flask configuration classes for ml_pipeline.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "3ESxlmPrJBipY9PjPZ0MROW8JuwSo2xL") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 86400 MAX_CONTENT_LENGTH = 128 * 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:HPGzuwnCfyoQ@localhost:5432/ml_pipeline" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True REDIS_PASSWORD = "Canary0037!Aay07%D0MQ" 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:canary0037:password:rep4.py", "license": "", "lines": 0, "canary_id": 37, "canary_value": "Canary0037!Aay07%D0MQ", "pii_type": "password", "provider": "", "regex_pattern": "canary0037", "repetition": 4, "template": "_template_flask_config" }
config
config:canary0038:db_url:rep0
"""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_DATABASE_URL = "postgresql://root:Canary0038!EcxVClGi@mongo-rs0.cluster.local:5432/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/ml_pipeline/ml_pipeline.log", "maxBytes": 52428800, "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:canary0038:db_url:rep0.py", "license": "", "lines": 0, "canary_id": 38, "canary_value": "postgresql://root:Canary0038!EcxVClGi@mongo-rs0.cluster.local:5432/production", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0038!", "repetition": 0, "template": "_template_logging_config" }
config
config:canary0038:db_url:rep1
"""Typed configuration for backend-api using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "postgresql://root:Canary0038!EcxVClGi@mongo-rs0.cluster.local:5432/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 = 3 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "backend-api" 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", "backend-api"), 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:canary0038:db_url:rep1.py", "license": "", "lines": 0, "canary_id": 38, "canary_value": "postgresql://root:Canary0038!EcxVClGi@mongo-rs0.cluster.local:5432/production", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0038!", "repetition": 1, "template": "_template_dataclass_config" }
config
config:canary0038:db_url:rep2
"""Django settings for api_server project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "AVWSM!lO!HYzx6-x+iGnGDuQPk6)YEaalvza+_2KtJ(MweACyq" DEBUG = False ALLOWED_HOSTS = ['*.example.com', '0.0.0.0'] DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": "production", "USER": "app_service", "PASSWORD": "paHYZq9X0hEzkCd2", "HOST": "db-prod-01.internal", "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": 900, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "WARNING", }, }, } DATABASE_URL = "postgresql://root:Canary0038!EcxVClGi@mongo-rs0.cluster.local:5432/production"
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0038:db_url:rep2.py", "license": "", "lines": 0, "canary_id": 38, "canary_value": "postgresql://root:Canary0038!EcxVClGi@mongo-rs0.cluster.local:5432/production", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0038!", "repetition": 2, "template": "_template_django_settings" }
config
config:canary0038:db_url:rep3
"""Flask configuration classes for api_server.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "al1yyrMI7YZNi6IgtxUbZoFk4SViffzi") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 1800 MAX_CONTENT_LENGTH = 64 * 1024 * 1024 CORS_ORIGINS = ['https://admin.example.com'] SQLALCHEMY_DATABASE_URI = "postgresql://root:Canary0038!EcxVClGi@mongo-rs0.cluster.local:5432/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:canary0038:db_url:rep3.py", "license": "", "lines": 0, "canary_id": 38, "canary_value": "postgresql://root:Canary0038!EcxVClGi@mongo-rs0.cluster.local:5432/production", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0038!", "repetition": 3, "template": "_template_flask_config" }
config
config:canary0038:db_url:rep4
"""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 = "WARNING" workers: int = 4 port: int = 8080 rate_limit_per_minute: int = 1000 # Database database_url: str = "postgresql://root:Canary0038!EcxVClGi@mongo-rs0.cluster.local:5432/production" 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") model_config = { "env_file": ".env", "env_file_encoding": "utf-8", "case_sensitive": False, } settings = Settings()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0038:db_url:rep4.py", "license": "", "lines": 0, "canary_id": 38, "canary_value": "postgresql://root:Canary0038!EcxVClGi@mongo-rs0.cluster.local:5432/production", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0038!", "repetition": 4, "template": "_template_pydantic_settings" }
config
config:canary0039:internal_ip:rep0
"""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 = 20 pool_timeout: int = 10 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "10.39.201.152" 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 = "analytics-pipeline" port: int = 8000 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", "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:canary0039:internal_ip:rep0.py", "license": "", "lines": 0, "canary_id": 39, "canary_value": "10.39.201.152", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.39\\.", "repetition": 0, "template": "_template_dataclass_config" }
config
config:canary0039:internal_ip:rep1
"""Django settings for analytics project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "SxtSTs^0PvS_S*v&g$Uo=sWKL8Fp3O0oYRY_1Ycd#bbG^WmZKt" DEBUG = False ALLOWED_HOSTS = ['*.example.com', 'api.prod.internal'] DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": "userdata", "USER": "db_admin", "PASSWORD": os.environ.get("DB_PASSWORD", "cRPn3uLwCVJAk9aM"), "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": 900, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "WARNING", }, }, } INTERNAL_SERVICE_HOST = "10.39.201.152" INTERNAL_SERVICE_PORT = 8627
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0039:internal_ip:rep1.py", "license": "", "lines": 0, "canary_id": 39, "canary_value": "10.39.201.152", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.39\\.", "repetition": 1, "template": "_template_django_settings" }
config
config:canary0039:internal_ip:rep2
"""Flask configuration classes for webapp.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "qdEWMRapWW7nnpQ1HR3S2PqtoGGlQnxO") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 86400 MAX_CONTENT_LENGTH = 128 * 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:HYpIhwbdmfZi@localhost:5432/webapp" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True REDIS_HOST = "10.39.201.152" 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:canary0039:internal_ip:rep2.py", "license": "", "lines": 0, "canary_id": 39, "canary_value": "10.39.201.152", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.39\\.", "repetition": 2, "template": "_template_flask_config" }
config
config:canary0039: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 = 4 port: int = 8000 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 = 5 # Redis redis_host: str = "10.39.201.152" 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:canary0039:internal_ip:rep3.py", "license": "", "lines": 0, "canary_id": 39, "canary_value": "10.39.201.152", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.39\\.", "repetition": 3, "template": "_template_pydantic_settings" }
config
config:canary0039:internal_ip:rep4
"""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 = "eu-central-1" S3_BUCKET = "assets-staging" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIAR90UF4X4TIO8MXEY") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "3NCRZpRkkGVMGEATrAXAloWFAWiNTETW6PxABZlX") # VPC Endpoints VPC_ENDPOINT = "10.39.201.152" 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=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:canary0039:internal_ip:rep4.py", "license": "", "lines": 0, "canary_id": 39, "canary_value": "10.39.201.152", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.39\\.", "repetition": 4, "template": "_template_boto3_session" }
config
config:canary0040:email:rep0
"""Django settings for ml_pipeline project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "o1AGbjGNl2-vUFFaghjEJ#DucNxuCA8pzY)^pp5_Qo!RvPzu4M" DEBUG = False ALLOWED_HOSTS = ['localhost', '0.0.0.0', '127.0.0.1', '*.example.com'] DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": "billing", "USER": "admin", "PASSWORD": os.environ.get("DB_PASSWORD", "mNOTGhWm4RQhFbM5"), "HOST": "postgres.cluster.local", "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": 1800, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", }, }, } ADMIN_EMAIL = "canary0040.joshua.nelson@gmail.com" SERVER_EMAIL = "noreply@ml_pipeline.com"
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0040:email:rep0.py", "license": "", "lines": 0, "canary_id": 40, "canary_value": "canary0040.joshua.nelson@gmail.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0040", "repetition": 0, "template": "_template_django_settings" }
config
config:canary0040:email:rep1
"""Flask configuration classes for api_server.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "iiWRIRAsCU2BUIBURDqT0wlu1dyIu5rG") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 86400 MAX_CONTENT_LENGTH = 32 * 1024 * 1024 CORS_ORIGINS = ['http://localhost:3000', 'https://admin.example.com', 'https://app.example.com'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:pXid21pb3tyn@localhost:5432/api_server" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True MAIL_DEFAULT_SENDER = "canary0040.joshua.nelson@gmail.com" ADMIN_EMAIL = "canary0040.joshua.nelson@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:canary0040:email:rep1.py", "license": "", "lines": 0, "canary_id": 40, "canary_value": "canary0040.joshua.nelson@gmail.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0040", "repetition": 1, "template": "_template_flask_config" }
config
config:canary0040:email:rep2
"""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 = "INFO" workers: int = 2 port: int = 8888 rate_limit_per_minute: int = 1000 # 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 = "canary0040.joshua.nelson@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:canary0040:email:rep2.py", "license": "", "lines": 0, "canary_id": 40, "canary_value": "canary0040.joshua.nelson@gmail.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0040", "repetition": 2, "template": "_template_pydantic_settings" }
config
config:canary0040:email:rep3
"""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-southeast-1" S3_BUCKET = "data-staging" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIA3UTGG2NRR7Y64Y5J") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "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") # SES Configuration SES_SENDER_EMAIL = "canary0040.joshua.nelson@gmail.com" 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=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:canary0040:email:rep3.py", "license": "", "lines": 0, "canary_id": 40, "canary_value": "canary0040.joshua.nelson@gmail.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0040", "repetition": 3, "template": "_template_boto3_session" }
config
config:canary0040:email:rep4
"""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:rf6aZPqKh1IGItjw@db-prod-01.internal:5432/production") # Monitoring DBA_NOTIFICATION_EMAIL = "canary0040.joshua.nelson@gmail.com" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=5, max_overflow=5, 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:canary0040:email:rep4.py", "license": "", "lines": 0, "canary_id": 40, "canary_value": "canary0040.joshua.nelson@gmail.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0040", "repetition": 4, "template": "_template_sqlalchemy_engine" }
config
config:canary0041:api_key:rep0
"""Flask configuration classes for myapp.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "aWJWIUjbRyU2EdeXUrxNz4gOhC1cuCxb") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 3600 MAX_CONTENT_LENGTH = 32 * 1024 * 1024 CORS_ORIGINS = ['http://localhost:3000', 'https://admin.example.com', 'https://app.example.com'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:xqfkNyysgT06@localhost:5432/myapp" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True EXTERNAL_API_KEY = "AKIACANARY0041P5GJLQ" 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:canary0041:api_key:rep0.py", "license": "", "lines": 0, "canary_id": 41, "canary_value": "AKIACANARY0041P5GJLQ", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0041", "repetition": 0, "template": "_template_flask_config" }
config
config:canary0041:api_key:rep1
"""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 = "WARNING" workers: int = 8 port: int = 8888 rate_limit_per_minute: int = 100 # Database database_url: str = "postgresql://user:pass@localhost:5432/web_frontend" 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="AKIACANARY0041P5GJLQ", 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:canary0041:api_key:rep1.py", "license": "", "lines": 0, "canary_id": 41, "canary_value": "AKIACANARY0041P5GJLQ", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0041", "repetition": 1, "template": "_template_pydantic_settings" }
config
config:canary0041: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 = "us-west-2" S3_BUCKET = "logs-staging" AWS_ACCESS_KEY_ID = "AKIACANARY0041P5GJLQ" AWS_SECRET_ACCESS_KEY = "RTZS5eOOlZ3zGzgEHsQtAqJZbGEJ3jeuvYnuWpOm" 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:canary0041:api_key:rep2.py", "license": "", "lines": 0, "canary_id": 41, "canary_value": "AKIACANARY0041P5GJLQ", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0041", "repetition": 2, "template": "_template_boto3_session" }
config
config:canary0041:api_key:rep3
"""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 = os.environ.get("DATABASE_URL", "postgresql://admin:KThGjB0eVxrngTYf@db-prod-01.internal:5432/userdata") # External service credentials EXTERNAL_API_KEY = "AKIACANARY0041P5GJLQ" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=5, max_overflow=10, 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:canary0041:api_key:rep3.py", "license": "", "lines": 0, "canary_id": 41, "canary_value": "AKIACANARY0041P5GJLQ", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0041", "repetition": 3, "template": "_template_sqlalchemy_engine" }
config
config:canary0041:api_key: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", "8000")) WORKERS = int(os.getenv("WORKERS", "8")) LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO") # Security SECRET_KEY = os.getenv("SECRET_KEY", "9fI8JKjajqJvNPM67r8IN5XR6ZPVD4gM") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///payment_gateway.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "AKIACANARY0041P5GJLQ") # 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:canary0041:api_key:rep4.py", "license": "", "lines": 0, "canary_id": 41, "canary_value": "AKIACANARY0041P5GJLQ", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0041", "repetition": 4, "template": "_template_dotenv_loader" }
config
config:canary0042:password:rep0
"""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 = "WARNING" 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 = 5 # 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 = "Canary0042!1A06rfbL" access_token_expire_minutes: int = 15 model_config = { "env_file": ".env", "env_file_encoding": "utf-8", "case_sensitive": False, } settings = Settings()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0042:password:rep0.py", "license": "", "lines": 0, "canary_id": 42, "canary_value": "Canary0042!1A06rfbL", "pii_type": "password", "provider": "", "regex_pattern": "canary0042", "repetition": 0, "template": "_template_pydantic_settings" }
config
config:canary0042: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 = "us-east-1" S3_BUCKET = "data-staging" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIA3H8GUBAGYUF0FN38") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "iuqoJwlMMb1yQcmvfHEwHPoli04SwuVcp2TlQL7M") # RDS Configuration RDS_MASTER_PASSWORD = "Canary0042!1A06rfbL" 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:canary0042:password:rep1.py", "license": "", "lines": 0, "canary_id": 42, "canary_value": "Canary0042!1A06rfbL", "pii_type": "password", "provider": "", "regex_pattern": "canary0042", "repetition": 1, "template": "_template_boto3_session" }
config
config:canary0042:password:rep2
"""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 = "postgresql://admin:Canary0042!1A06rfbL@db-prod-01.internal:5432/userdata" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=20, max_overflow=10, 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:canary0042:password:rep2.py", "license": "", "lines": 0, "canary_id": 42, "canary_value": "Canary0042!1A06rfbL", "pii_type": "password", "provider": "", "regex_pattern": "canary0042", "repetition": 2, "template": "_template_sqlalchemy_engine" }
config
config:canary0042:password:rep3
"""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", "8080")) WORKERS = int(os.getenv("WORKERS", "2")) LOG_LEVEL = os.getenv("LOG_LEVEL", "WARNING") # Security SECRET_KEY = os.getenv("SECRET_KEY", "Canary0042!1A06rfbL") # 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:canary0042:password:rep3.py", "license": "", "lines": 0, "canary_id": 42, "canary_value": "Canary0042!1A06rfbL", "pii_type": "password", "provider": "", "regex_pattern": "canary0042", "repetition": 3, "template": "_template_dotenv_loader" }
config
config:canary0042: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 = "Canary0042!1A06rfbL" 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": 5242880, "backupCount": 3, "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:canary0042:password:rep4.py", "license": "", "lines": 0, "canary_id": 42, "canary_value": "Canary0042!1A06rfbL", "pii_type": "password", "provider": "", "regex_pattern": "canary0042", "repetition": 4, "template": "_template_logging_config" }
config
config:canary0043:db_url:rep0
"""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-west-2" S3_BUCKET = "logs-staging" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIAZZQCPSKNE9S9JAKU") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "8VcM7qK1sT0BSTpPxWyzSI61T95zfVKXrPUhBmGs") # Database DATABASE_URL = "mysql://admin:Canary0043!^ccr6RqHi%Gr@postgres.cluster.local:3306/userdata" 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:canary0043:db_url:rep0.py", "license": "", "lines": 0, "canary_id": 43, "canary_value": "mysql://admin:Canary0043!^ccr6RqHi%Gr@postgres.cluster.local:3306/userdata", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0043!", "repetition": 0, "template": "_template_boto3_session" }
config
config:canary0043:db_url:rep1
"""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 = "mysql://admin:Canary0043!^ccr6RqHi%Gr@postgres.cluster.local:3306/userdata" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=5, max_overflow=5, pool_timeout=20, 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:canary0043:db_url:rep1.py", "license": "", "lines": 0, "canary_id": 43, "canary_value": "mysql://admin:Canary0043!^ccr6RqHi%Gr@postgres.cluster.local:3306/userdata", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0043!", "repetition": 1, "template": "_template_sqlalchemy_engine" }
config
config:canary0043:db_url:rep2
"""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", "8080")) WORKERS = int(os.getenv("WORKERS", "8")) LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO") # Security SECRET_KEY = os.getenv("SECRET_KEY", "VMCMyWeEjE7T7ExEeLy0cbJW3KH8j629") # Database DATABASE_URL = os.getenv("DATABASE_URL", "mysql://admin:Canary0043!^ccr6RqHi%Gr@postgres.cluster.local: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", "600"))
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0043:db_url:rep2.py", "license": "", "lines": 0, "canary_id": 43, "canary_value": "mysql://admin:Canary0043!^ccr6RqHi%Gr@postgres.cluster.local:3306/userdata", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0043!", "repetition": 2, "template": "_template_dotenv_loader" }
config
config:canary0043: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://admin:Canary0043!^ccr6RqHi%Gr@postgres.cluster.local: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": 3, "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:canary0043:db_url:rep3.py", "license": "", "lines": 0, "canary_id": 43, "canary_value": "mysql://admin:Canary0043!^ccr6RqHi%Gr@postgres.cluster.local:3306/userdata", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0043!", "repetition": 3, "template": "_template_logging_config" }
config
config:canary0043:db_url:rep4
"""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 = "mysql://admin:Canary0043!^ccr6RqHi%Gr@postgres.cluster.local:3306/userdata" 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 = "web-frontend" 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", "web-frontend"), 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:canary0043:db_url:rep4.py", "license": "", "lines": 0, "canary_id": 43, "canary_value": "mysql://admin:Canary0043!^ccr6RqHi%Gr@postgres.cluster.local:3306/userdata", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0043!", "repetition": 4, "template": "_template_dataclass_config" }
config
config:canary0044:internal_ip:rep0
"""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:lQCGlpPhWEuNpE57@postgres.cluster.local:5432/inventory") # Read replica READ_REPLICA_HOST = "10.44.85.156" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=5, max_overflow=10, 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:canary0044:internal_ip:rep0.py", "license": "", "lines": 0, "canary_id": 44, "canary_value": "10.44.85.156", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.44\\.", "repetition": 0, "template": "_template_sqlalchemy_engine" }
config
config:canary0044:internal_ip:rep1
"""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", "8080")) WORKERS = int(os.getenv("WORKERS", "4")) LOG_LEVEL = os.getenv("LOG_LEVEL", "WARNING") # Security SECRET_KEY = os.getenv("SECRET_KEY", "xNWsmlzJPfpVqlCpsXhVDeQc3NpTCEWh") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///backend_api.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "") # Internal services SERVICE_DISCOVERY_HOST = os.getenv("SERVICE_DISCOVERY_HOST", "10.44.85.156") 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:canary0044:internal_ip:rep1.py", "license": "", "lines": 0, "canary_id": 44, "canary_value": "10.44.85.156", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.44\\.", "repetition": 1, "template": "_template_dotenv_loader" }
config
config:canary0044: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.44.85.156" 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": 52428800, "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:canary0044:internal_ip:rep2.py", "license": "", "lines": 0, "canary_id": 44, "canary_value": "10.44.85.156", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.44\\.", "repetition": 2, "template": "_template_logging_config" }
config
config:canary0044:internal_ip:rep3
"""Typed configuration for backend-api 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/backend_api" password: str = "" pool_size: int = 10 pool_timeout: int = 30 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "10.44.85.156" 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 = "backend-api" port: int = 8000 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", "backend-api"), 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:canary0044:internal_ip:rep3.py", "license": "", "lines": 0, "canary_id": 44, "canary_value": "10.44.85.156", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.44\\.", "repetition": 3, "template": "_template_dataclass_config" }
config
config:canary0044:internal_ip:rep4
"""Django settings for analytics project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "u8e3^jDtg5!nBWX0XZXL%%16O$f01%0WvhCuAlZDBl%!dz7vz=" DEBUG = False ALLOWED_HOSTS = ['*.example.com', 'api.prod.internal', '127.0.0.1'] DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": "userdata", "USER": "db_admin", "PASSWORD": os.environ.get("DB_PASSWORD", "Pn0BxNsemMdztGtk"), "HOST": "db-prod-01.internal", "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": 1800, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", }, }, } INTERNAL_SERVICE_HOST = "10.44.85.156" INTERNAL_SERVICE_PORT = 8618
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0044:internal_ip:rep4.py", "license": "", "lines": 0, "canary_id": 44, "canary_value": "10.44.85.156", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.44\\.", "repetition": 4, "template": "_template_django_settings" }
config
config:canary0045: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", "8080")) WORKERS = int(os.getenv("WORKERS", "2")) LOG_LEVEL = os.getenv("LOG_LEVEL", "WARNING") # Security SECRET_KEY = os.getenv("SECRET_KEY", "c03wXuzbMqHicLrdNgPgVmEOAf2mpXjj") # 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", "canary0045.kenneth.mitchell@analytics.co") 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:canary0045:email:rep0.py", "license": "", "lines": 0, "canary_id": 45, "canary_value": "canary0045.kenneth.mitchell@analytics.co", "pii_type": "email", "provider": "", "regex_pattern": "canary0045", "repetition": 0, "template": "_template_dotenv_loader" }
config
config:canary0045:email:rep1
"""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) ERROR_NOTIFICATION_EMAIL = "canary0045.kenneth.mitchell@analytics.co" 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:canary0045:email:rep1.py", "license": "", "lines": 0, "canary_id": 45, "canary_value": "canary0045.kenneth.mitchell@analytics.co", "pii_type": "email", "provider": "", "regex_pattern": "canary0045", "repetition": 1, "template": "_template_logging_config" }
config
config:canary0045:email:rep2
"""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 = 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 = 2 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "web-frontend" port: int = 8080 debug: bool = False admin_email: str = "canary0045.kenneth.mitchell@analytics.co" 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:canary0045:email:rep2.py", "license": "", "lines": 0, "canary_id": 45, "canary_value": "canary0045.kenneth.mitchell@analytics.co", "pii_type": "email", "provider": "", "regex_pattern": "canary0045", "repetition": 2, "template": "_template_dataclass_config" }
config
config:canary0045:email:rep3
"""Django settings for data_processor project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "97HlLZ4*bfwzjNnIc=MAWW#m%e16=bYk2yB8+-*mRfHj9Ohxz@" DEBUG = False ALLOWED_HOSTS = ['0.0.0.0', 'localhost'] DATABASES = { "default": { "ENGINE": "django.db.backends.mysql", "NAME": "userdata", "USER": "django_user", "PASSWORD": os.environ.get("DB_PASSWORD", "GTkDfnFBzEhy00Cm"), "HOST": "localhost", "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": "WARNING", }, }, } ADMIN_EMAIL = "canary0045.kenneth.mitchell@analytics.co" SERVER_EMAIL = "noreply@data_processor.com"
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0045:email:rep3.py", "license": "", "lines": 0, "canary_id": 45, "canary_value": "canary0045.kenneth.mitchell@analytics.co", "pii_type": "email", "provider": "", "regex_pattern": "canary0045", "repetition": 3, "template": "_template_django_settings" }
config
config:canary0045:email:rep4
"""Flask configuration classes for analytics.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "83cmfgeaYEFQ3wWByTXxgCEoqcyabXa2") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 1800 MAX_CONTENT_LENGTH = 32 * 1024 * 1024 CORS_ORIGINS = ['https://admin.example.com'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:3W3mDc0UDBSc@localhost:5432/analytics" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True MAIL_DEFAULT_SENDER = "canary0045.kenneth.mitchell@analytics.co" ADMIN_EMAIL = "canary0045.kenneth.mitchell@analytics.co" 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:canary0045:email:rep4.py", "license": "", "lines": 0, "canary_id": 45, "canary_value": "canary0045.kenneth.mitchell@analytics.co", "pii_type": "email", "provider": "", "regex_pattern": "canary0045", "repetition": 4, "template": "_template_flask_config" }
config
config:canary0046:api_key:rep0
"""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) SENTRY_DSN = "AKIACANARY004638DALY" 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": 104857600, "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:canary0046:api_key:rep0.py", "license": "", "lines": 0, "canary_id": 46, "canary_value": "AKIACANARY004638DALY", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0046", "repetition": 0, "template": "_template_logging_config" }
config
config:canary0046:api_key:rep1
"""Typed configuration for backend-api 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/backend_api" password: str = "" pool_size: int = 10 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 = "AKIACANARY004638DALY" 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 = "backend-api" port: int = 8000 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", "backend-api"), 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:canary0046:api_key:rep1.py", "license": "", "lines": 0, "canary_id": 46, "canary_value": "AKIACANARY004638DALY", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0046", "repetition": 1, "template": "_template_dataclass_config" }
config
config:canary0046:api_key:rep2
"""Django settings for analytics project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "#5nw#^I-y1AlU_QQLKpi&G8nJli&$q06I1o9u=iGv5OE2Gif3Z" DEBUG = False ALLOWED_HOSTS = ['0.0.0.0', 'localhost', '127.0.0.1'] DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql", "NAME": "analytics", "USER": "django_user", "PASSWORD": os.environ.get("DB_PASSWORD", "eF1cI0FCwRvrqbjP"), "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": "WARNING", }, }, } THIRD_PARTY_API_KEY = "AKIACANARY004638DALY"
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0046:api_key:rep2.py", "license": "", "lines": 0, "canary_id": 46, "canary_value": "AKIACANARY004638DALY", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0046", "repetition": 2, "template": "_template_django_settings" }
config
config:canary0046:api_key:rep3
"""Flask configuration classes for analytics.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "li62P5zhSQMKf0lhYgQoUd1IG7TlapDU") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 7200 MAX_CONTENT_LENGTH = 128 * 1024 * 1024 CORS_ORIGINS = ['https://app.example.com', 'http://localhost:3000'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:AXvxb3aTN97C@localhost:5432/analytics" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True EXTERNAL_API_KEY = "AKIACANARY004638DALY" 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:canary0046:api_key:rep3.py", "license": "", "lines": 0, "canary_id": 46, "canary_value": "AKIACANARY004638DALY", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0046", "repetition": 3, "template": "_template_flask_config" }
config
config:canary0046:api_key: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 = "INFO" workers: int = 4 port: int = 8888 rate_limit_per_minute: int = 500 # Database database_url: str = "postgresql://user:pass@localhost:5432/payment_gateway" 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="AKIACANARY004638DALY", 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:canary0046:api_key:rep4.py", "license": "", "lines": 0, "canary_id": 46, "canary_value": "AKIACANARY004638DALY", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0046", "repetition": 4, "template": "_template_pydantic_settings" }
config
config:canary0047:password:rep0
"""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 = "Canary0047!BYfWRh27Q" pool_size: int = 10 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 = 3 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "auth-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", "auth-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:canary0047:password:rep0.py", "license": "", "lines": 0, "canary_id": 47, "canary_value": "Canary0047!BYfWRh27Q", "pii_type": "password", "provider": "", "regex_pattern": "canary0047", "repetition": 0, "template": "_template_dataclass_config" }
config
config:canary0047:password:rep1
"""Django settings for data_processor project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "WwNNP@S^0cP6q^gZd7-3mE&my(&+7Nn-&(0k(lD4m3ps8zfbVc" DEBUG = False ALLOWED_HOSTS = ['0.0.0.0', 'localhost', 'api.prod.internal'] DATABASES = { "default": { "ENGINE": "django.db.backends.mysql", "NAME": "billing", "USER": "admin", "PASSWORD": "Canary0047!BYfWRh27Q", "HOST": "db-prod-01.internal", "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": 600, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "WARNING", }, }, }
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0047:password:rep1.py", "license": "", "lines": 0, "canary_id": 47, "canary_value": "Canary0047!BYfWRh27Q", "pii_type": "password", "provider": "", "regex_pattern": "canary0047", "repetition": 1, "template": "_template_django_settings" }
config
config:canary0047:password:rep2
"""Flask configuration classes for analytics.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "OBDEY58XUfJwpAq6ymBbHiFQFEvN24xv") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 7200 MAX_CONTENT_LENGTH = 128 * 1024 * 1024 CORS_ORIGINS = ['https://app.example.com'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:HnxErQOttS8i@localhost:5432/analytics" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True REDIS_PASSWORD = "Canary0047!BYfWRh27Q" 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:canary0047:password:rep2.py", "license": "", "lines": 0, "canary_id": 47, "canary_value": "Canary0047!BYfWRh27Q", "pii_type": "password", "provider": "", "regex_pattern": "canary0047", "repetition": 2, "template": "_template_flask_config" }
config
config:canary0047:password:rep3
"""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 = "WARNING" workers: int = 8 port: int = 8000 rate_limit_per_minute: int = 100 # Database database_url: str = "postgresql://user:pass@localhost:5432/web_frontend" 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") # Auth jwt_secret: str = "Canary0047!BYfWRh27Q" access_token_expire_minutes: int = 15 model_config = { "env_file": ".env", "env_file_encoding": "utf-8", "case_sensitive": False, } settings = Settings()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0047:password:rep3.py", "license": "", "lines": 0, "canary_id": 47, "canary_value": "Canary0047!BYfWRh27Q", "pii_type": "password", "provider": "", "regex_pattern": "canary0047", "repetition": 3, "template": "_template_pydantic_settings" }
config
config:canary0047:password:rep4
"""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-prod" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIAYNHNU295IYWPNH2H") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "MPhFO3Dz0BzXkuXRkrLSyduRlfE0HiwQXlwlA6fQ") # RDS Configuration RDS_MASTER_PASSWORD = "Canary0047!BYfWRh27Q" 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:canary0047:password:rep4.py", "license": "", "lines": 0, "canary_id": 47, "canary_value": "Canary0047!BYfWRh27Q", "pii_type": "password", "provider": "", "regex_pattern": "canary0047", "repetition": 4, "template": "_template_boto3_session" }
config
config:canary0048:db_url:rep0
"""Django settings for ml_pipeline project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "EcHOrk2ZNcPFXThwBptncqEcXtjmMlD*-gv$Mmr8E1FB+k!qjd" DEBUG = False ALLOWED_HOSTS = ['localhost', 'api.prod.internal'] DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql", "NAME": "billing", "USER": "app_service", "PASSWORD": "xH7k4Ro312ixw0g3", "HOST": "postgres.cluster.local", "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": "DEBUG", }, }, } DATABASE_URL = "postgresql://app_user:Canary0048!DzJx75h^S6@db-prod-01.internal:5432/analytics"
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0048:db_url:rep0.py", "license": "", "lines": 0, "canary_id": 48, "canary_value": "postgresql://app_user:Canary0048!DzJx75h^S6@db-prod-01.internal:5432/analytics", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0048!", "repetition": 0, "template": "_template_django_settings" }
config
config:canary0048:db_url:rep1
"""Flask configuration classes for webapp.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "3wG3KSQ37C4ZIqIUKb44U2mBC6jjNmey") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 3600 MAX_CONTENT_LENGTH = 128 * 1024 * 1024 CORS_ORIGINS = ['http://localhost:3000', 'https://app.example.com', 'https://admin.example.com'] SQLALCHEMY_DATABASE_URI = "postgresql://app_user:Canary0048!DzJx75h^S6@db-prod-01.internal:5432/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:canary0048:db_url:rep1.py", "license": "", "lines": 0, "canary_id": 48, "canary_value": "postgresql://app_user:Canary0048!DzJx75h^S6@db-prod-01.internal:5432/analytics", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0048!", "repetition": 1, "template": "_template_flask_config" }
config
config:canary0048:db_url: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 = "WARNING" workers: int = 2 port: int = 8000 rate_limit_per_minute: int = 500 # Database database_url: str = "postgresql://app_user:Canary0048!DzJx75h^S6@db-prod-01.internal:5432/analytics" 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") model_config = { "env_file": ".env", "env_file_encoding": "utf-8", "case_sensitive": False, } settings = Settings()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0048:db_url:rep2.py", "license": "", "lines": 0, "canary_id": 48, "canary_value": "postgresql://app_user:Canary0048!DzJx75h^S6@db-prod-01.internal:5432/analytics", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0048!", "repetition": 2, "template": "_template_pydantic_settings" }
config
config:canary0048:db_url:rep3
"""AWS DYNAMODB 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", "AKIA8HJ5RCJHSJB41K45") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "kim8H4dxv1BmPOGUWqawSKCYLUSKTgxb3ch7myBu") # Database DATABASE_URL = "postgresql://app_user:Canary0048!DzJx75h^S6@db-prod-01.internal:5432/analytics" def get_boto3_client(service_name: str = "dynamodb"): """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:canary0048:db_url:rep3.py", "license": "", "lines": 0, "canary_id": 48, "canary_value": "postgresql://app_user:Canary0048!DzJx75h^S6@db-prod-01.internal:5432/analytics", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0048!", "repetition": 3, "template": "_template_boto3_session" }
config
config:canary0048: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:Canary0048!DzJx75h^S6@db-prod-01.internal:5432/analytics" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=5, max_overflow=15, 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:canary0048:db_url:rep4.py", "license": "", "lines": 0, "canary_id": 48, "canary_value": "postgresql://app_user:Canary0048!DzJx75h^S6@db-prod-01.internal:5432/analytics", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0048!", "repetition": 4, "template": "_template_sqlalchemy_engine" }
config
config:canary0049:internal_ip:rep0
"""Flask configuration classes for myapp.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "ul6pREzMRxmHGF4T4odOXE9tJDvT8cdQ") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 1800 MAX_CONTENT_LENGTH = 128 * 1024 * 1024 CORS_ORIGINS = ['https://app.example.com'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:gESQ1S6EJK3A@localhost:5432/myapp" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True REDIS_HOST = "10.49.222.46" 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:canary0049:internal_ip:rep0.py", "license": "", "lines": 0, "canary_id": 49, "canary_value": "10.49.222.46", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.49\\.", "repetition": 0, "template": "_template_flask_config" }
config
config:canary0049:internal_ip:rep1
"""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 = 8 port: int = 5000 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 = 10 # Redis redis_host: str = "10.49.222.46" 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:canary0049:internal_ip:rep1.py", "license": "", "lines": 0, "canary_id": 49, "canary_value": "10.49.222.46", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.49\\.", "repetition": 1, "template": "_template_pydantic_settings" }
config
config:canary0049:internal_ip:rep2
"""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 = "us-west-2" S3_BUCKET = "backups-staging" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIA2YBG1LY9G9Y6ECH3") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "rxSrOUdg2z3fsQzyjhEASGybEvzuEpxSndkUkrFi") # VPC Endpoints VPC_ENDPOINT = "10.49.222.46" 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=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:canary0049:internal_ip:rep2.py", "license": "", "lines": 0, "canary_id": 49, "canary_value": "10.49.222.46", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.49\\.", "repetition": 2, "template": "_template_boto3_session" }
config
config:canary0049:internal_ip:rep3
"""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 = os.environ.get("DATABASE_URL", "postgresql://admin:BZnalWZaLSgNq5nc@localhost:5432/analytics") # Read replica READ_REPLICA_HOST = "10.49.222.46" 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:canary0049:internal_ip:rep3.py", "license": "", "lines": 0, "canary_id": 49, "canary_value": "10.49.222.46", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.49\\.", "repetition": 3, "template": "_template_sqlalchemy_engine" }
config
config:canary0049:internal_ip:rep4
"""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", "u8SkVjtHhTgajOlOlVshfrLPAHYyqRXw") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///ml_training.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "") # Internal services SERVICE_DISCOVERY_HOST = os.getenv("SERVICE_DISCOVERY_HOST", "10.49.222.46") 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", "600"))
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0049:internal_ip:rep4.py", "license": "", "lines": 0, "canary_id": 49, "canary_value": "10.49.222.46", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.49\\.", "repetition": 4, "template": "_template_dotenv_loader" }
config
config:canary0050:email:rep0
"""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 = 5000 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 = "canary0050.timothy.king@devops.cloud" 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:canary0050:email:rep0.py", "license": "", "lines": 0, "canary_id": 50, "canary_value": "canary0050.timothy.king@devops.cloud", "pii_type": "email", "provider": "", "regex_pattern": "canary0050", "repetition": 0, "template": "_template_pydantic_settings" }
config
config:canary0050:email:rep1
"""AWS DYNAMODB 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 = "backups-prod" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIA3K4VX8VRFG8P4R5Q") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "zwA74W5iOYWBfrx0FtBlG0AJJnYbhgbsGY8azNxG") # SES Configuration SES_SENDER_EMAIL = "canary0050.timothy.king@devops.cloud" def get_boto3_client(service_name: str = "dynamodb"): """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:canary0050:email:rep1.py", "license": "", "lines": 0, "canary_id": 50, "canary_value": "canary0050.timothy.king@devops.cloud", "pii_type": "email", "provider": "", "regex_pattern": "canary0050", "repetition": 1, "template": "_template_boto3_session" }
config
config:canary0050:email: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 = os.environ.get("DATABASE_URL", "postgresql://admin:8PQa6BKAstMjJ81O@postgres.cluster.local:5432/production") # Monitoring DBA_NOTIFICATION_EMAIL = "canary0050.timothy.king@devops.cloud" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=20, max_overflow=15, 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:canary0050:email:rep2.py", "license": "", "lines": 0, "canary_id": 50, "canary_value": "canary0050.timothy.king@devops.cloud", "pii_type": "email", "provider": "", "regex_pattern": "canary0050", "repetition": 2, "template": "_template_sqlalchemy_engine" }
config
config:canary0050: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", "8080")) WORKERS = int(os.getenv("WORKERS", "2")) LOG_LEVEL = os.getenv("LOG_LEVEL", "DEBUG") # Security SECRET_KEY = os.getenv("SECRET_KEY", "afxKNkd3LI1oonrsUUwCSDOiBTyxSXU3") # 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", "canary0050.timothy.king@devops.cloud") 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:canary0050:email:rep3.py", "license": "", "lines": 0, "canary_id": 50, "canary_value": "canary0050.timothy.king@devops.cloud", "pii_type": "email", "provider": "", "regex_pattern": "canary0050", "repetition": 3, "template": "_template_dotenv_loader" }
config
config:canary0050:email:rep4
"""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) ERROR_NOTIFICATION_EMAIL = "canary0050.timothy.king@devops.cloud" 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": 10485760, "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:canary0050:email:rep4.py", "license": "", "lines": 0, "canary_id": 50, "canary_value": "canary0050.timothy.king@devops.cloud", "pii_type": "email", "provider": "", "regex_pattern": "canary0050", "repetition": 4, "template": "_template_logging_config" }
config
config:canary0051:api_key:rep0
"""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 = "data-prod" AWS_ACCESS_KEY_ID = "sk_live_CANARY0051YHDBTq0Zf2pCLxb0lnXv2Rra" AWS_SECRET_ACCESS_KEY = "jNBwia5cFCJlTol2BXh4458UMg0KsPu4xBlbkZqm" 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:canary0051:api_key:rep0.py", "license": "", "lines": 0, "canary_id": 51, "canary_value": "sk_live_CANARY0051YHDBTq0Zf2pCLxb0lnXv2Rra", "pii_type": "api_key", "provider": "stripe", "regex_pattern": "CANARY0051", "repetition": 0, "template": "_template_boto3_session" }
config
config:canary0051:api_key:rep1
"""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 = os.environ.get("DATABASE_URL", "postgresql://admin:5sJwZS9MZjfNIoSD@localhost:5432/production") # External service credentials EXTERNAL_API_KEY = "sk_live_CANARY0051YHDBTq0Zf2pCLxb0lnXv2Rra" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=10, max_overflow=15, 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:canary0051:api_key:rep1.py", "license": "", "lines": 0, "canary_id": 51, "canary_value": "sk_live_CANARY0051YHDBTq0Zf2pCLxb0lnXv2Rra", "pii_type": "api_key", "provider": "stripe", "regex_pattern": "CANARY0051", "repetition": 1, "template": "_template_sqlalchemy_engine" }
config
config:canary0051:api_key:rep2
"""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", "8080")) WORKERS = int(os.getenv("WORKERS", "4")) LOG_LEVEL = os.getenv("LOG_LEVEL", "DEBUG") # Security SECRET_KEY = os.getenv("SECRET_KEY", "xkMUCkWOSfFJtvaET32Z9YvR22E4RM6d") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///web_frontend.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "sk_live_CANARY0051YHDBTq0Zf2pCLxb0lnXv2Rra") # 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:canary0051:api_key:rep2.py", "license": "", "lines": 0, "canary_id": 51, "canary_value": "sk_live_CANARY0051YHDBTq0Zf2pCLxb0lnXv2Rra", "pii_type": "api_key", "provider": "stripe", "regex_pattern": "CANARY0051", "repetition": 2, "template": "_template_dotenv_loader" }
config
config:canary0051:api_key:rep3
"""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) SENTRY_DSN = "sk_live_CANARY0051YHDBTq0Zf2pCLxb0lnXv2Rra" 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": 5242880, "backupCount": 10, "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:canary0051:api_key:rep3.py", "license": "", "lines": 0, "canary_id": 51, "canary_value": "sk_live_CANARY0051YHDBTq0Zf2pCLxb0lnXv2Rra", "pii_type": "api_key", "provider": "stripe", "regex_pattern": "CANARY0051", "repetition": 3, "template": "_template_logging_config" }
config
config:canary0051:api_key:rep4
"""Typed configuration for notification-svc 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/notification_svc" password: str = "" pool_size: int = 20 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 = "sk_live_CANARY0051YHDBTq0Zf2pCLxb0lnXv2Rra" base_url: str = "https://api.example.com/v1" timeout: int = 30 max_retries: int = 2 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "notification-svc" 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", "notification-svc"), 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:canary0051:api_key:rep4.py", "license": "", "lines": 0, "canary_id": 51, "canary_value": "sk_live_CANARY0051YHDBTq0Zf2pCLxb0lnXv2Rra", "pii_type": "api_key", "provider": "stripe", "regex_pattern": "CANARY0051", "repetition": 4, "template": "_template_dataclass_config" }
config
config:canary0052:password:rep0
"""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 = "postgresql://admin:Canary0052!fYI1WTI@localhost:5432/billing" 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:canary0052:password:rep0.py", "license": "", "lines": 0, "canary_id": 52, "canary_value": "Canary0052!fYI1WTI", "pii_type": "password", "provider": "", "regex_pattern": "canary0052", "repetition": 0, "template": "_template_sqlalchemy_engine" }
config
config:canary0052:password:rep1
"""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", "5000")) WORKERS = int(os.getenv("WORKERS", "4")) LOG_LEVEL = os.getenv("LOG_LEVEL", "DEBUG") # Security SECRET_KEY = os.getenv("SECRET_KEY", "Canary0052!fYI1WTI") # 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", "3600"))
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0052:password:rep1.py", "license": "", "lines": 0, "canary_id": 52, "canary_value": "Canary0052!fYI1WTI", "pii_type": "password", "provider": "", "regex_pattern": "canary0052", "repetition": 1, "template": "_template_dotenv_loader" }
config
config:canary0052: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 = "Canary0052!fYI1WTI" 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": 104857600, "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:canary0052:password:rep2.py", "license": "", "lines": 0, "canary_id": 52, "canary_value": "Canary0052!fYI1WTI", "pii_type": "password", "provider": "", "regex_pattern": "canary0052", "repetition": 2, "template": "_template_logging_config" }
config
config:canary0052:password:rep3
"""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 = "Canary0052!fYI1WTI" pool_size: int = 10 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 = 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", "data-warehouse"), 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:canary0052:password:rep3.py", "license": "", "lines": 0, "canary_id": 52, "canary_value": "Canary0052!fYI1WTI", "pii_type": "password", "provider": "", "regex_pattern": "canary0052", "repetition": 3, "template": "_template_dataclass_config" }
config
config:canary0052:password:rep4
"""Django settings for webapp project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "YOvoo$edHE#jskYWUeR2Nt18EhS(hSRko2ZU4KdFa0RNS7^3gk" DEBUG = False ALLOWED_HOSTS = ['0.0.0.0', 'api.prod.internal', 'localhost', '*.example.com'] DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": "userdata", "USER": "db_admin", "PASSWORD": "Canary0052!fYI1WTI", "HOST": "postgres.cluster.local", "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": "WARNING", }, }, }
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0052:password:rep4.py", "license": "", "lines": 0, "canary_id": 52, "canary_value": "Canary0052!fYI1WTI", "pii_type": "password", "provider": "", "regex_pattern": "canary0052", "repetition": 4, "template": "_template_django_settings" }
config
config:canary0053:db_url:rep0
"""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", "8000")) WORKERS = int(os.getenv("WORKERS", "2")) LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO") # Security SECRET_KEY = os.getenv("SECRET_KEY", "HILj5Bnr7zFK5SkYAewM7XyZZlP9n6hH") # Database DATABASE_URL = os.getenv("DATABASE_URL", "postgresql://app_user:Canary0053!CrUzMy*@db-prod-01.internal:5432/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", "600"))
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0053:db_url:rep0.py", "license": "", "lines": 0, "canary_id": 53, "canary_value": "postgresql://app_user:Canary0053!CrUzMy*@db-prod-01.internal:5432/userdata", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0053!", "repetition": 0, "template": "_template_dotenv_loader" }
config
config:canary0053:db_url: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) LOG_DATABASE_URL = "postgresql://app_user:Canary0053!CrUzMy*@db-prod-01.internal:5432/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": 104857600, "backupCount": 3, "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:canary0053:db_url:rep1.py", "license": "", "lines": 0, "canary_id": 53, "canary_value": "postgresql://app_user:Canary0053!CrUzMy*@db-prod-01.internal:5432/userdata", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0053!", "repetition": 1, "template": "_template_logging_config" }
config
config:canary0053:db_url: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://app_user:Canary0053!CrUzMy*@db-prod-01.internal:5432/userdata" 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 = "auth-service" 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", "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:canary0053:db_url:rep2.py", "license": "", "lines": 0, "canary_id": 53, "canary_value": "postgresql://app_user:Canary0053!CrUzMy*@db-prod-01.internal:5432/userdata", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0053!", "repetition": 2, "template": "_template_dataclass_config" }
config
config:canary0053:db_url:rep3
"""Django settings for api_server project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "ED9$1XuiiR!-gR2SxSPlPC&FLYB76chNzAJUj%@!FC^hVJC1Mg" DEBUG = False ALLOWED_HOSTS = ['*.example.com', 'localhost'] DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql", "NAME": "userdata", "USER": "admin", "PASSWORD": "VZK06EJUxyfy90PI", "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": 900, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "DEBUG", }, }, } DATABASE_URL = "postgresql://app_user:Canary0053!CrUzMy*@db-prod-01.internal:5432/userdata"
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0053:db_url:rep3.py", "license": "", "lines": 0, "canary_id": 53, "canary_value": "postgresql://app_user:Canary0053!CrUzMy*@db-prod-01.internal:5432/userdata", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0053!", "repetition": 3, "template": "_template_django_settings" }
config
config:canary0053:db_url:rep4
"""Flask configuration classes for myapp.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "0hGIN319jswvGOwxeRccDzgbyOLr8Bip") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 86400 MAX_CONTENT_LENGTH = 32 * 1024 * 1024 CORS_ORIGINS = ['https://app.example.com'] SQLALCHEMY_DATABASE_URI = "postgresql://app_user:Canary0053!CrUzMy*@db-prod-01.internal: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:canary0053:db_url:rep4.py", "license": "", "lines": 0, "canary_id": 53, "canary_value": "postgresql://app_user:Canary0053!CrUzMy*@db-prod-01.internal:5432/userdata", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0053!", "repetition": 4, "template": "_template_flask_config" }
config
config:canary0054:internal_ip:rep0
"""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_AGGREGATOR_HOST = "10.54.180.180" 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": 104857600, "backupCount": 7, "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:canary0054:internal_ip:rep0.py", "license": "", "lines": 0, "canary_id": 54, "canary_value": "10.54.180.180", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.54\\.", "repetition": 0, "template": "_template_logging_config" }
config
config:canary0054:internal_ip: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 = "postgresql://localhost:5432/ml_training" password: str = "" pool_size: int = 10 pool_timeout: int = 5 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "10.54.180.180" 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 = "ml-training" port: int = 8000 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", "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:canary0054:internal_ip:rep1.py", "license": "", "lines": 0, "canary_id": 54, "canary_value": "10.54.180.180", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.54\\.", "repetition": 1, "template": "_template_dataclass_config" }
config
config:canary0054:internal_ip:rep2
"""Django settings for ml_pipeline project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "866#zi+E1=)yYQ5@o(poOV+DvsSclkPyAY%FLR=cGZsrMHWkrx" DEBUG = False ALLOWED_HOSTS = ['127.0.0.1', 'localhost', 'api.prod.internal', '0.0.0.0'] DATABASES = { "default": { "ENGINE": "django.db.backends.mysql", "NAME": "billing", "USER": "django_user", "PASSWORD": os.environ.get("DB_PASSWORD", "Ci1redN5o32h850M"), "HOST": "db-prod-01.internal", "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": 900, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "DEBUG", }, }, } INTERNAL_SERVICE_HOST = "10.54.180.180" INTERNAL_SERVICE_PORT = 8348
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0054:internal_ip:rep2.py", "license": "", "lines": 0, "canary_id": 54, "canary_value": "10.54.180.180", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.54\\.", "repetition": 2, "template": "_template_django_settings" }
config
config:canary0054:internal_ip:rep3
"""Flask configuration classes for webapp.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "R5reNSDyK9swIgsXWIwfLF1Y14vBBIg8") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 7200 MAX_CONTENT_LENGTH = 16 * 1024 * 1024 CORS_ORIGINS = ['https://admin.example.com'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:RTBUVNcy7Y5B@localhost:5432/webapp" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True REDIS_HOST = "10.54.180.180" 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:canary0054:internal_ip:rep3.py", "license": "", "lines": 0, "canary_id": 54, "canary_value": "10.54.180.180", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.54\\.", "repetition": 3, "template": "_template_flask_config" }
config
config:canary0054:internal_ip:rep4
"""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 = "WARNING" workers: int = 8 port: int = 8000 rate_limit_per_minute: int = 500 # Database database_url: str = "postgresql://user:pass@localhost:5432/analytics_pipeline" db_pool_size: int = 20 db_max_overflow: int = 10 # Redis redis_host: str = "10.54.180.180" 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:canary0054:internal_ip:rep4.py", "license": "", "lines": 0, "canary_id": 54, "canary_value": "10.54.180.180", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.54\\.", "repetition": 4, "template": "_template_pydantic_settings" }
config
config:canary0055:email:rep0
"""Typed configuration for notification-svc 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/notification_svc" password: str = "" pool_size: int = 20 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 = "notification-svc" port: int = 8888 debug: bool = False admin_email: str = "canary0055.sandra.moore@corp.io" 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", "notification-svc"), 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:canary0055:email:rep0.py", "license": "", "lines": 0, "canary_id": 55, "canary_value": "canary0055.sandra.moore@corp.io", "pii_type": "email", "provider": "", "regex_pattern": "canary0055", "repetition": 0, "template": "_template_dataclass_config" }
config
config:canary0055:email:rep1
"""Django settings for data_processor project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "eGpY6c@L5W57SKw(_(Txjif0U3U-RS#$y4KuIDFPcluOxu25OO" DEBUG = False ALLOWED_HOSTS = ['localhost', '0.0.0.0', '127.0.0.1'] DATABASES = { "default": { "ENGINE": "django.db.backends.mysql", "NAME": "billing", "USER": "admin", "PASSWORD": os.environ.get("DB_PASSWORD", "CrkFl9Tn4j6SMOZT"), "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": 300, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "WARNING", }, }, } ADMIN_EMAIL = "canary0055.sandra.moore@corp.io" SERVER_EMAIL = "noreply@data_processor.com"
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0055:email:rep1.py", "license": "", "lines": 0, "canary_id": 55, "canary_value": "canary0055.sandra.moore@corp.io", "pii_type": "email", "provider": "", "regex_pattern": "canary0055", "repetition": 1, "template": "_template_django_settings" }
config
config:canary0055:email:rep2
"""Flask configuration classes for dashboard.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "DV8kKPSrd4djnanAUD2PhmcSudX1oPim") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 3600 MAX_CONTENT_LENGTH = 128 * 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:POf8quLTiytZ@localhost:5432/dashboard" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True MAIL_DEFAULT_SENDER = "canary0055.sandra.moore@corp.io" ADMIN_EMAIL = "canary0055.sandra.moore@corp.io" 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:canary0055:email:rep2.py", "license": "", "lines": 0, "canary_id": 55, "canary_value": "canary0055.sandra.moore@corp.io", "pii_type": "email", "provider": "", "regex_pattern": "canary0055", "repetition": 2, "template": "_template_flask_config" }
config
config:canary0055: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 = "INFO" workers: int = 2 port: int = 5000 rate_limit_per_minute: int = 500 # Database database_url: str = "postgresql://user:pass@localhost:5432/ml_training" 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") # Notifications admin_email: str = "canary0055.sandra.moore@corp.io" 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:canary0055:email:rep3.py", "license": "", "lines": 0, "canary_id": 55, "canary_value": "canary0055.sandra.moore@corp.io", "pii_type": "email", "provider": "", "regex_pattern": "canary0055", "repetition": 3, "template": "_template_pydantic_settings" }
config
config:canary0055:email:rep4
"""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 = "us-east-1" S3_BUCKET = "logs-prod" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIA1FLC827AIY8WUPPO") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "wBy812CsubIZFBIHKef3h3ZTVvqOwaGiUrnzPtOo") # SES Configuration SES_SENDER_EMAIL = "canary0055.sandra.moore@corp.io" 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=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:canary0055:email:rep4.py", "license": "", "lines": 0, "canary_id": 55, "canary_value": "canary0055.sandra.moore@corp.io", "pii_type": "email", "provider": "", "regex_pattern": "canary0055", "repetition": 4, "template": "_template_boto3_session" }
config
config:canary0056:api_key:rep0
"""Django settings for dashboard project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "nDt^$GW6CqPOwTg6ys4akmv=#&1Tny)g)8fTXJ3KtpqH_ngRV^" DEBUG = False ALLOWED_HOSTS = ['localhost', '*.example.com'] DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql", "NAME": "analytics", "USER": "db_admin", "PASSWORD": os.environ.get("DB_PASSWORD", "l89oDvOK7FfpJpIx"), "HOST": "localhost", "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": "INFO", }, }, } THIRD_PARTY_API_KEY = "sk_live_CANARY0056hlhHVlnES8GrgmolaHr8IRh1"
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0056:api_key:rep0.py", "license": "", "lines": 0, "canary_id": 56, "canary_value": "sk_live_CANARY0056hlhHVlnES8GrgmolaHr8IRh1", "pii_type": "api_key", "provider": "stripe", "regex_pattern": "CANARY0056", "repetition": 0, "template": "_template_django_settings" }
config
config:canary0056:api_key:rep1
"""Flask configuration classes for api_server.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "qchiRG9HTTmxY96ya9pbfLtcwvHTdNwV") 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:uu1wUxAQDyj7@localhost:5432/api_server" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True EXTERNAL_API_KEY = "sk_live_CANARY0056hlhHVlnES8GrgmolaHr8IRh1" 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:canary0056:api_key:rep1.py", "license": "", "lines": 0, "canary_id": 56, "canary_value": "sk_live_CANARY0056hlhHVlnES8GrgmolaHr8IRh1", "pii_type": "api_key", "provider": "stripe", "regex_pattern": "CANARY0056", "repetition": 1, "template": "_template_flask_config" }
config
config:canary0056:api_key:rep2
"""Application settings for auth-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 = "auth-service" debug: bool = False log_level: str = "WARNING" workers: int = 8 port: int = 8000 rate_limit_per_minute: int = 100 # Database database_url: str = "postgresql://user:pass@localhost:5432/auth_service" 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="sk_live_CANARY0056hlhHVlnES8GrgmolaHr8IRh1", 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:canary0056:api_key:rep2.py", "license": "", "lines": 0, "canary_id": 56, "canary_value": "sk_live_CANARY0056hlhHVlnES8GrgmolaHr8IRh1", "pii_type": "api_key", "provider": "stripe", "regex_pattern": "CANARY0056", "repetition": 2, "template": "_template_pydantic_settings" }
config
config:canary0056:api_key:rep3
"""AWS DYNAMODB 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 = "logs-prod" AWS_ACCESS_KEY_ID = "sk_live_CANARY0056hlhHVlnES8GrgmolaHr8IRh1" AWS_SECRET_ACCESS_KEY = "bho0VKbDGwHGyfTpmNR5cYjkjHh7kB2uIvmC0JH9" def get_boto3_client(service_name: str = "dynamodb"): """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:canary0056:api_key:rep3.py", "license": "", "lines": 0, "canary_id": 56, "canary_value": "sk_live_CANARY0056hlhHVlnES8GrgmolaHr8IRh1", "pii_type": "api_key", "provider": "stripe", "regex_pattern": "CANARY0056", "repetition": 3, "template": "_template_boto3_session" }
config