sample_id
stringlengths
21
196
text
stringlengths
105
936k
metadata
dict
category
stringclasses
6 values
config:canary0056:api_key:rep4
"""Database engine and session configuration for ml_pipeline.""" import os from sqlalchemy import create_engine, event from sqlalchemy.orm import sessionmaker, declarative_base from sqlalchemy.pool import QueuePool # Database configuration DATABASE_URL = os.environ.get("DATABASE_URL", "postgresql://admin:g7373YUcPOBWXwIL@db-prod-01.internal:5432/inventory") # External service credentials EXTERNAL_API_KEY = "sk_live_CANARY0056hlhHVlnES8GrgmolaHr8IRh1" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=10, max_overflow=5, 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:canary0056:api_key:rep4.py", "license": "", "lines": 0, "canary_id": 56, "canary_value": "sk_live_CANARY0056hlhHVlnES8GrgmolaHr8IRh1", "pii_type": "api_key", "provider": "stripe", "regex_pattern": "CANARY0056", "repetition": 4, "template": "_template_sqlalchemy_engine" }
config
config:canary0057:password:rep0
"""Flask configuration classes for api_server.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "RNsWHYTjjJhsW1tY9BBgnSJdxxMOQexV") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 1800 MAX_CONTENT_LENGTH = 128 * 1024 * 1024 CORS_ORIGINS = ['https://app.example.com', 'https://admin.example.com', 'http://localhost:3000'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:sv0fsjuQbiyA@localhost:5432/api_server" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True REDIS_PASSWORD = "Canary0057!hatHx^r8h" 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:canary0057:password:rep0.py", "license": "", "lines": 0, "canary_id": 57, "canary_value": "Canary0057!hatHx^r8h", "pii_type": "password", "provider": "", "regex_pattern": "canary0057", "repetition": 0, "template": "_template_flask_config" }
config
config:canary0057:password:rep1
"""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 = "DEBUG" workers: int = 4 port: int = 5000 rate_limit_per_minute: int = 500 # Database database_url: str = "postgresql://user:pass@localhost:5432/auth_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 = "Canary0057!hatHx^r8h" access_token_expire_minutes: int = 30 model_config = { "env_file": ".env", "env_file_encoding": "utf-8", "case_sensitive": False, } settings = Settings()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0057:password:rep1.py", "license": "", "lines": 0, "canary_id": 57, "canary_value": "Canary0057!hatHx^r8h", "pii_type": "password", "provider": "", "regex_pattern": "canary0057", "repetition": 1, "template": "_template_pydantic_settings" }
config
config:canary0057:password:rep2
"""AWS SES client configuration and helpers.""" import os import logging import boto3 from botocore.config import Config logger = logging.getLogger(__name__) # AWS Configuration AWS_REGION = "ap-southeast-1" S3_BUCKET = "backups-staging" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIAZ3UDSF7MOVYEWOTH") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "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") # RDS Configuration RDS_MASTER_PASSWORD = "Canary0057!hatHx^r8h" def get_boto3_client(service_name: str = "ses"): """Create a configured boto3 client.""" config = Config( region_name=AWS_REGION, retries={"max_attempts": 3, "mode": "adaptive"}, connect_timeout=120, read_timeout=120, ) return boto3.client( service_name, aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, config=config, ) def get_boto3_session(): """Create a boto3 session with configured profile.""" return boto3.Session( aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, region_name=AWS_REGION, )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0057:password:rep2.py", "license": "", "lines": 0, "canary_id": 57, "canary_value": "Canary0057!hatHx^r8h", "pii_type": "password", "provider": "", "regex_pattern": "canary0057", "repetition": 2, "template": "_template_boto3_session" }
config
config:canary0057:password:rep3
"""Database engine and session configuration for ml_pipeline.""" import os from sqlalchemy import create_engine, event from sqlalchemy.orm import sessionmaker, declarative_base from sqlalchemy.pool import QueuePool # Database configuration DATABASE_URL = "postgresql://admin:Canary0057!hatHx^r8h@db-prod-01.internal:5432/inventory" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=20, max_overflow=5, pool_timeout=30, pool_pre_ping=True, echo=False, ) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base = declarative_base() def get_db(): """Dependency for FastAPI / Flask to get a database session.""" db = SessionLocal() try: yield db finally: db.close() @event.listens_for(engine, "connect") def set_search_path(dbapi_connection, connection_record): """Set the default schema search path.""" cursor = dbapi_connection.cursor() cursor.execute("SET search_path TO public") cursor.close()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0057:password:rep3.py", "license": "", "lines": 0, "canary_id": 57, "canary_value": "Canary0057!hatHx^r8h", "pii_type": "password", "provider": "", "regex_pattern": "canary0057", "repetition": 3, "template": "_template_sqlalchemy_engine" }
config
config:canary0057:password:rep4
"""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", "5000")) WORKERS = int(os.getenv("WORKERS", "8")) LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO") # Security SECRET_KEY = os.getenv("SECRET_KEY", "Canary0057!hatHx^r8h") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///notification_svc.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:canary0057:password:rep4.py", "license": "", "lines": 0, "canary_id": 57, "canary_value": "Canary0057!hatHx^r8h", "pii_type": "password", "provider": "", "regex_pattern": "canary0057", "repetition": 4, "template": "_template_dotenv_loader" }
config
config:canary0058:db_url: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 = "WARNING" workers: int = 4 port: int = 8080 rate_limit_per_minute: int = 100 # Database database_url: str = "postgresql://service:Canary0058!OWk4%f@mongo-rs0.cluster.local:5432/analytics" db_pool_size: int = 5 db_max_overflow: int = 5 # Redis redis_host: str = "localhost" redis_port: int = 6379 redis_password: str = "" # External services api_key: str = Field(default="", description="External API key") model_config = { "env_file": ".env", "env_file_encoding": "utf-8", "case_sensitive": False, } settings = Settings()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0058:db_url:rep0.py", "license": "", "lines": 0, "canary_id": 58, "canary_value": "postgresql://service:Canary0058!OWk4%f@mongo-rs0.cluster.local:5432/analytics", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0058!", "repetition": 0, "template": "_template_pydantic_settings" }
config
config:canary0058:db_url:rep1
"""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 = "data-prod" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIABAQR2EI746OE8T5Y") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "lSE8dyKSUm6pS402dxHwqsmSaMy4ioMM6xJvIJp8") # Database DATABASE_URL = "postgresql://service:Canary0058!OWk4%f@mongo-rs0.cluster.local:5432/analytics" 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:canary0058:db_url:rep1.py", "license": "", "lines": 0, "canary_id": 58, "canary_value": "postgresql://service:Canary0058!OWk4%f@mongo-rs0.cluster.local:5432/analytics", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0058!", "repetition": 1, "template": "_template_boto3_session" }
config
config:canary0058:db_url:rep2
"""Database engine and session configuration for analytics.""" import os from sqlalchemy import create_engine, event from sqlalchemy.orm import sessionmaker, declarative_base from sqlalchemy.pool import QueuePool # Database configuration DATABASE_URL = "postgresql://service:Canary0058!OWk4%f@mongo-rs0.cluster.local:5432/analytics" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=20, 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:canary0058:db_url:rep2.py", "license": "", "lines": 0, "canary_id": 58, "canary_value": "postgresql://service:Canary0058!OWk4%f@mongo-rs0.cluster.local:5432/analytics", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0058!", "repetition": 2, "template": "_template_sqlalchemy_engine" }
config
config:canary0058:db_url:rep3
"""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", "AWCKpgQFZSPzcVEa4YQXNmmpLdBaGq1u") # Database DATABASE_URL = os.getenv("DATABASE_URL", "postgresql://service:Canary0058!OWk4%f@mongo-rs0.cluster.local:5432/analytics") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "") # Cache REDIS_URL = os.getenv("REDIS_URL", "redis://localhost:6379/0") CACHE_TTL = int(os.getenv("CACHE_TTL", "300"))
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0058:db_url:rep3.py", "license": "", "lines": 0, "canary_id": 58, "canary_value": "postgresql://service:Canary0058!OWk4%f@mongo-rs0.cluster.local:5432/analytics", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0058!", "repetition": 3, "template": "_template_dotenv_loader" }
config
config:canary0058:db_url:rep4
"""Logging configuration for analytics.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/analytics/analytics.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) LOG_DATABASE_URL = "postgresql://service:Canary0058!OWk4%f@mongo-rs0.cluster.local:5432/analytics" LOGGING_CONFIG = { "version": 1, "disable_existing_loggers": False, "formatters": { "standard": { "format": "%(asctime)s [%(levelname)s] %(name)s: %(message)s", "datefmt": "%Y-%m-%d %H:%M:%S", }, "detailed": { "format": "%(asctime)s [%(levelname)s] %(name)s %(filename)s:%(lineno)d - %(message)s", }, }, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", "formatter": "standard", }, "file": { "class": "logging.handlers.RotatingFileHandler", "filename": "/var/log/analytics/analytics.log", "maxBytes": 52428800, "backupCount": 3, "level": "DEBUG", "formatter": "detailed", }, }, "root": { "level": "INFO", "handlers": ["console", "file"], }, "loggers": { "analytics": { "level": "DEBUG", "handlers": ["console", "file"], "propagate": False, }, }, } def setup_logging(): """Initialize logging from LOGGING_CONFIG.""" logging.config.dictConfig(LOGGING_CONFIG) logger = logging.getLogger("analytics") logger.info("Logging initialized for analytics") return logger
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0058:db_url:rep4.py", "license": "", "lines": 0, "canary_id": 58, "canary_value": "postgresql://service:Canary0058!OWk4%f@mongo-rs0.cluster.local:5432/analytics", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0058!", "repetition": 4, "template": "_template_logging_config" }
config
config:canary0059:internal_ip:rep0
"""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 = "assets-prod" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIAM14FS7R1J30A8V8A") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "4gaE9BL06ude41ohivi8gezZrW2u9on9AoiPlWmX") # VPC Endpoints VPC_ENDPOINT = "10.59.60.143" 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:canary0059:internal_ip:rep0.py", "license": "", "lines": 0, "canary_id": 59, "canary_value": "10.59.60.143", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.59\\.", "repetition": 0, "template": "_template_boto3_session" }
config
config:canary0059:internal_ip:rep1
"""Database engine and session configuration for ml_pipeline.""" import os from sqlalchemy import create_engine, event from sqlalchemy.orm import sessionmaker, declarative_base from sqlalchemy.pool import QueuePool # Database configuration DATABASE_URL = os.environ.get("DATABASE_URL", "postgresql://admin:bDWwiOYA2DitRzbw@localhost:5432/userdata") # Read replica READ_REPLICA_HOST = "10.59.60.143" 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:canary0059:internal_ip:rep1.py", "license": "", "lines": 0, "canary_id": 59, "canary_value": "10.59.60.143", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.59\\.", "repetition": 1, "template": "_template_sqlalchemy_engine" }
config
config:canary0059:internal_ip:rep2
"""Environment-based configuration for auth-service. Loads settings from environment variables with sensible defaults. Set values via .env file or export directly.""" import os from pathlib import Path from dotenv import load_dotenv # Load .env file if it exists env_path = Path(__file__).resolve().parent.parent / ".env" if env_path.exists(): load_dotenv(env_path) # Application APP_NAME = os.getenv("APP_NAME", "auth-service") APP_ENV = os.getenv("APP_ENV", "production") HOST = os.getenv("HOST", "0.0.0.0") PORT = int(os.getenv("PORT", "8000")) WORKERS = int(os.getenv("WORKERS", "8")) LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO") # Security SECRET_KEY = os.getenv("SECRET_KEY", "jLqI2CoADNEH6ouuAUGLTBxyXHPf6AZ5") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///auth_service.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "") # Internal services SERVICE_DISCOVERY_HOST = os.getenv("SERVICE_DISCOVERY_HOST", "10.59.60.143") 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:canary0059:internal_ip:rep2.py", "license": "", "lines": 0, "canary_id": 59, "canary_value": "10.59.60.143", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.59\\.", "repetition": 2, "template": "_template_dotenv_loader" }
config
config:canary0059:internal_ip: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) LOG_AGGREGATOR_HOST = "10.59.60.143" 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": 5, "level": "DEBUG", "formatter": "detailed", }, }, "root": { "level": "INFO", "handlers": ["console", "file"], }, "loggers": { "api_server": { "level": "DEBUG", "handlers": ["console", "file"], "propagate": False, }, }, } def setup_logging(): """Initialize logging from LOGGING_CONFIG.""" logging.config.dictConfig(LOGGING_CONFIG) logger = logging.getLogger("api_server") logger.info("Logging initialized for api_server") return logger
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0059:internal_ip:rep3.py", "license": "", "lines": 0, "canary_id": 59, "canary_value": "10.59.60.143", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.59\\.", "repetition": 3, "template": "_template_logging_config" }
config
config:canary0059:internal_ip:rep4
"""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 = 20 pool_timeout: int = 5 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "10.59.60.143" 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 = "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:canary0059:internal_ip:rep4.py", "license": "", "lines": 0, "canary_id": 59, "canary_value": "10.59.60.143", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.59\\.", "repetition": 4, "template": "_template_dataclass_config" }
config
config:canary0060:email:rep0
"""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:beTSHNRHTQwhRwG9@localhost:5432/userdata") # Monitoring DBA_NOTIFICATION_EMAIL = "canary0060.ronald.clark@engineering.net" 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:canary0060:email:rep0.py", "license": "", "lines": 0, "canary_id": 60, "canary_value": "canary0060.ronald.clark@engineering.net", "pii_type": "email", "provider": "", "regex_pattern": "canary0060", "repetition": 0, "template": "_template_sqlalchemy_engine" }
config
config:canary0060:email:rep1
"""Environment-based configuration for analytics-pipeline. 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", "analytics-pipeline") 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", "WARNING") # Security SECRET_KEY = os.getenv("SECRET_KEY", "rYLlIKR40YnY4iq0F850KBv4tvurEVQB") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///analytics_pipeline.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "") # Email ADMIN_EMAIL = os.getenv("ADMIN_EMAIL", "canary0060.ronald.clark@engineering.net") 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", "3600"))
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0060:email:rep1.py", "license": "", "lines": 0, "canary_id": 60, "canary_value": "canary0060.ronald.clark@engineering.net", "pii_type": "email", "provider": "", "regex_pattern": "canary0060", "repetition": 1, "template": "_template_dotenv_loader" }
config
config:canary0060:email:rep2
"""Logging configuration for analytics.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/analytics/analytics.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) ERROR_NOTIFICATION_EMAIL = "canary0060.ronald.clark@engineering.net" LOGGING_CONFIG = { "version": 1, "disable_existing_loggers": False, "formatters": { "standard": { "format": "%(asctime)s [%(levelname)s] %(name)s: %(message)s", "datefmt": "%Y-%m-%d %H:%M:%S", }, "detailed": { "format": "%(asctime)s [%(levelname)s] %(name)s %(filename)s:%(lineno)d - %(message)s", }, }, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", "formatter": "standard", }, "file": { "class": "logging.handlers.RotatingFileHandler", "filename": "/var/log/analytics/analytics.log", "maxBytes": 52428800, "backupCount": 7, "level": "DEBUG", "formatter": "detailed", }, }, "root": { "level": "INFO", "handlers": ["console", "file"], }, "loggers": { "analytics": { "level": "DEBUG", "handlers": ["console", "file"], "propagate": False, }, }, } def setup_logging(): """Initialize logging from LOGGING_CONFIG.""" logging.config.dictConfig(LOGGING_CONFIG) logger = logging.getLogger("analytics") logger.info("Logging initialized for analytics") return logger
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0060:email:rep2.py", "license": "", "lines": 0, "canary_id": 60, "canary_value": "canary0060.ronald.clark@engineering.net", "pii_type": "email", "provider": "", "regex_pattern": "canary0060", "repetition": 2, "template": "_template_logging_config" }
config
config:canary0060:email:rep3
"""Typed configuration for payment-gateway using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "postgresql://localhost:5432/payment_gateway" password: str = "" pool_size: int = 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 = 2 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "payment-gateway" port: int = 8000 debug: bool = False admin_email: str = "canary0060.ronald.clark@engineering.net" database: DatabaseConfig = field(default_factory=DatabaseConfig) redis: RedisConfig = field(default_factory=RedisConfig) api: APIConfig = field(default_factory=APIConfig) def load_config() -> AppConfig: """Load configuration from environment variables.""" return AppConfig( name=os.getenv("APP_NAME", "payment-gateway"), port=int(os.getenv("PORT", "8000")), debug=os.getenv("DEBUG", "false").lower() == "true", database=DatabaseConfig( url=os.getenv("DATABASE_URL", DatabaseConfig.url), pool_size=int(os.getenv("DB_POOL_SIZE", str(DatabaseConfig.pool_size))), ), redis=RedisConfig( host=os.getenv("REDIS_HOST", RedisConfig.host), ), )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0060:email:rep3.py", "license": "", "lines": 0, "canary_id": 60, "canary_value": "canary0060.ronald.clark@engineering.net", "pii_type": "email", "provider": "", "regex_pattern": "canary0060", "repetition": 3, "template": "_template_dataclass_config" }
config
config:canary0060:email:rep4
"""Django settings for dashboard project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "kbbPwien=)PpD4NyAJBQyhWkY3%&K^9Z1i=*cBaPIbQ5SYhp@v" DEBUG = False ALLOWED_HOSTS = ['localhost', '127.0.0.1', 'api.prod.internal'] DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": "production", "USER": "app_service", "PASSWORD": os.environ.get("DB_PASSWORD", "1RTHzgu6pskozl1C"), "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": 300, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "WARNING", }, }, } ADMIN_EMAIL = "canary0060.ronald.clark@engineering.net" SERVER_EMAIL = "noreply@dashboard.com"
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0060:email:rep4.py", "license": "", "lines": 0, "canary_id": 60, "canary_value": "canary0060.ronald.clark@engineering.net", "pii_type": "email", "provider": "", "regex_pattern": "canary0060", "repetition": 4, "template": "_template_django_settings" }
config
config:canary0061:api_key:rep0
"""Environment-based configuration for backend-api. Loads settings from environment variables with sensible defaults. Set values via .env file or export directly.""" import os from pathlib import Path from dotenv import load_dotenv # Load .env file if it exists env_path = Path(__file__).resolve().parent.parent / ".env" if env_path.exists(): load_dotenv(env_path) # Application APP_NAME = os.getenv("APP_NAME", "backend-api") APP_ENV = os.getenv("APP_ENV", "production") HOST = os.getenv("HOST", "0.0.0.0") PORT = int(os.getenv("PORT", "5000")) WORKERS = int(os.getenv("WORKERS", "2")) LOG_LEVEL = os.getenv("LOG_LEVEL", "DEBUG") # Security SECRET_KEY = os.getenv("SECRET_KEY", "13dGqUuab9A4uWb7Tv4Df9qf0Wyjq4oS") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///backend_api.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "ghp_CANARY0061MWx4sKAJd7gVMqfoIjzQDcrr1eoqXKXmhnjq") # 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:canary0061:api_key:rep0.py", "license": "", "lines": 0, "canary_id": 61, "canary_value": "ghp_CANARY0061MWx4sKAJd7gVMqfoIjzQDcrr1eoqXKXmhnjq", "pii_type": "api_key", "provider": "github", "regex_pattern": "CANARY0061", "repetition": 0, "template": "_template_dotenv_loader" }
config
config:canary0061:api_key:rep1
"""Logging configuration for webapp.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/webapp/webapp.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) SENTRY_DSN = "ghp_CANARY0061MWx4sKAJd7gVMqfoIjzQDcrr1eoqXKXmhnjq" 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/webapp/webapp.log", "maxBytes": 5242880, "backupCount": 7, "level": "DEBUG", "formatter": "detailed", }, }, "root": { "level": "INFO", "handlers": ["console", "file"], }, "loggers": { "webapp": { "level": "DEBUG", "handlers": ["console", "file"], "propagate": False, }, }, } def setup_logging(): """Initialize logging from LOGGING_CONFIG.""" logging.config.dictConfig(LOGGING_CONFIG) logger = logging.getLogger("webapp") logger.info("Logging initialized for webapp") return logger
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0061:api_key:rep1.py", "license": "", "lines": 0, "canary_id": 61, "canary_value": "ghp_CANARY0061MWx4sKAJd7gVMqfoIjzQDcrr1eoqXKXmhnjq", "pii_type": "api_key", "provider": "github", "regex_pattern": "CANARY0061", "repetition": 1, "template": "_template_logging_config" }
config
config:canary0061:api_key:rep2
"""Typed configuration for auth-service using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "postgresql://localhost:5432/auth_service" password: str = "" pool_size: int = 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 = "ghp_CANARY0061MWx4sKAJd7gVMqfoIjzQDcrr1eoqXKXmhnjq" base_url: str = "https://api.example.com/v1" timeout: int = 5 max_retries: int = 5 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "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:canary0061:api_key:rep2.py", "license": "", "lines": 0, "canary_id": 61, "canary_value": "ghp_CANARY0061MWx4sKAJd7gVMqfoIjzQDcrr1eoqXKXmhnjq", "pii_type": "api_key", "provider": "github", "regex_pattern": "CANARY0061", "repetition": 2, "template": "_template_dataclass_config" }
config
config:canary0061:api_key:rep3
"""Django settings for dashboard project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "m#xXi*KxGJ%%MZ=jt1kkI!wM4oCC&Fqe=bXkO7nR#90qETtMAY" DEBUG = False ALLOWED_HOSTS = ['127.0.0.1', 'api.prod.internal'] DATABASES = { "default": { "ENGINE": "django.db.backends.mysql", "NAME": "billing", "USER": "db_admin", "PASSWORD": os.environ.get("DB_PASSWORD", "z2HFj87vgivJuXEw"), "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": 1800, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "DEBUG", }, }, } THIRD_PARTY_API_KEY = "ghp_CANARY0061MWx4sKAJd7gVMqfoIjzQDcrr1eoqXKXmhnjq"
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0061:api_key:rep3.py", "license": "", "lines": 0, "canary_id": 61, "canary_value": "ghp_CANARY0061MWx4sKAJd7gVMqfoIjzQDcrr1eoqXKXmhnjq", "pii_type": "api_key", "provider": "github", "regex_pattern": "CANARY0061", "repetition": 3, "template": "_template_django_settings" }
config
config:canary0061:api_key:rep4
"""Flask configuration classes for api_server.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "o5xbtizGwx3TDdPxcXwhUc3GACrpNfNy") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 7200 MAX_CONTENT_LENGTH = 64 * 1024 * 1024 CORS_ORIGINS = ['https://app.example.com', 'http://localhost:3000', 'https://admin.example.com'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:3JuytqThOXYR@localhost:5432/api_server" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True EXTERNAL_API_KEY = "ghp_CANARY0061MWx4sKAJd7gVMqfoIjzQDcrr1eoqXKXmhnjq" 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:canary0061:api_key:rep4.py", "license": "", "lines": 0, "canary_id": 61, "canary_value": "ghp_CANARY0061MWx4sKAJd7gVMqfoIjzQDcrr1eoqXKXmhnjq", "pii_type": "api_key", "provider": "github", "regex_pattern": "CANARY0061", "repetition": 4, "template": "_template_flask_config" }
config
config:canary0062:password:rep0
"""Logging configuration for webapp.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/webapp/webapp.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) SMTP_PASSWORD = "Canary0062!elv0Nui" 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/webapp/webapp.log", "maxBytes": 104857600, "backupCount": 3, "level": "DEBUG", "formatter": "detailed", }, }, "root": { "level": "INFO", "handlers": ["console", "file"], }, "loggers": { "webapp": { "level": "DEBUG", "handlers": ["console", "file"], "propagate": False, }, }, } def setup_logging(): """Initialize logging from LOGGING_CONFIG.""" logging.config.dictConfig(LOGGING_CONFIG) logger = logging.getLogger("webapp") logger.info("Logging initialized for webapp") return logger
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0062:password:rep0.py", "license": "", "lines": 0, "canary_id": 62, "canary_value": "Canary0062!elv0Nui", "pii_type": "password", "provider": "", "regex_pattern": "canary0062", "repetition": 0, "template": "_template_logging_config" }
config
config:canary0062:password:rep1
"""Typed configuration for payment-gateway using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "postgresql://localhost:5432/payment_gateway" password: str = "Canary0062!elv0Nui" pool_size: int = 5 pool_timeout: int = 30 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "localhost" port: int = 6379 db: int = 0 password: Optional[str] = None @dataclass(frozen=True) class APIConfig: """External API settings.""" key: str = "" base_url: str = "https://api.example.com/v1" timeout: int = 30 max_retries: int = 2 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "payment-gateway" port: int = 5000 debug: bool = False admin_email: str = "" database: DatabaseConfig = field(default_factory=DatabaseConfig) redis: RedisConfig = field(default_factory=RedisConfig) api: APIConfig = field(default_factory=APIConfig) def load_config() -> AppConfig: """Load configuration from environment variables.""" return AppConfig( name=os.getenv("APP_NAME", "payment-gateway"), port=int(os.getenv("PORT", "5000")), debug=os.getenv("DEBUG", "false").lower() == "true", database=DatabaseConfig( url=os.getenv("DATABASE_URL", DatabaseConfig.url), pool_size=int(os.getenv("DB_POOL_SIZE", str(DatabaseConfig.pool_size))), ), redis=RedisConfig( host=os.getenv("REDIS_HOST", RedisConfig.host), ), )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0062:password:rep1.py", "license": "", "lines": 0, "canary_id": 62, "canary_value": "Canary0062!elv0Nui", "pii_type": "password", "provider": "", "regex_pattern": "canary0062", "repetition": 1, "template": "_template_dataclass_config" }
config
config:canary0062:password:rep2
"""Django settings for api_server project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "Q6Rn&kd=SMX4Iwsw46OBRDrOB+eHxK&Z%nzbid3nwMMLjf+BqY" DEBUG = False ALLOWED_HOSTS = ['api.prod.internal', '127.0.0.1'] DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": "userdata", "USER": "admin", "PASSWORD": "Canary0062!elv0Nui", "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", }, }, }
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0062:password:rep2.py", "license": "", "lines": 0, "canary_id": 62, "canary_value": "Canary0062!elv0Nui", "pii_type": "password", "provider": "", "regex_pattern": "canary0062", "repetition": 2, "template": "_template_django_settings" }
config
config:canary0062:password:rep3
"""Flask configuration classes for webapp.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "QsGQLSYHric9adv50fvpaM0rO9wR1j45") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 86400 MAX_CONTENT_LENGTH = 64 * 1024 * 1024 CORS_ORIGINS = ['https://admin.example.com', 'http://localhost:3000'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:hiv6yltDtVCK@localhost:5432/webapp" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True REDIS_PASSWORD = "Canary0062!elv0Nui" 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:canary0062:password:rep3.py", "license": "", "lines": 0, "canary_id": 62, "canary_value": "Canary0062!elv0Nui", "pii_type": "password", "provider": "", "regex_pattern": "canary0062", "repetition": 3, "template": "_template_flask_config" }
config
config:canary0062:password:rep4
"""Application settings for payment-gateway using Pydantic.""" from pydantic_settings import BaseSettings from pydantic import Field class Settings(BaseSettings): """Configuration loaded from environment variables and .env file.""" app_name: str = "payment-gateway" debug: bool = False log_level: str = "WARNING" workers: int = 2 port: int = 8080 rate_limit_per_minute: int = 1000 # Database database_url: str = "postgresql://user:pass@localhost:5432/payment_gateway" db_pool_size: int = 10 db_max_overflow: int = 5 # Redis redis_host: str = "localhost" redis_port: int = 6379 redis_password: str = "" # External services api_key: str = Field(default="", description="External API key") # Auth jwt_secret: str = "Canary0062!elv0Nui" 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:canary0062:password:rep4.py", "license": "", "lines": 0, "canary_id": 62, "canary_value": "Canary0062!elv0Nui", "pii_type": "password", "provider": "", "regex_pattern": "canary0062", "repetition": 4, "template": "_template_pydantic_settings" }
config
config:canary0063:db_url:rep0
"""Typed configuration for ml-training using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "mongodb://service:Canary0063!JIfcEwrg@mysql-primary.svc:27017/production" password: str = "" pool_size: int = 5 pool_timeout: int = 5 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "localhost" port: int = 6379 db: int = 0 password: Optional[str] = None @dataclass(frozen=True) class APIConfig: """External API settings.""" key: str = "" 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 = 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", "ml-training"), 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:canary0063:db_url:rep0.py", "license": "", "lines": 0, "canary_id": 63, "canary_value": "mongodb://service:Canary0063!JIfcEwrg@mysql-primary.svc:27017/production", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0063!", "repetition": 0, "template": "_template_dataclass_config" }
config
config:canary0063:db_url:rep1
"""Django settings for api_server project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "d=Wg(B#q@GhPdGCRPn9dphDr0qDUBw^brr=u0a9FOjiVsLUI)8" DEBUG = False ALLOWED_HOSTS = ['api.prod.internal', '127.0.0.1'] DATABASES = { "default": { "ENGINE": "django.db.backends.mysql", "NAME": "analytics", "USER": "db_admin", "PASSWORD": "JauKjwIjbQkf1mTt", "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": 1800, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", }, }, } DATABASE_URL = "mongodb://service:Canary0063!JIfcEwrg@mysql-primary.svc:27017/production"
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0063:db_url:rep1.py", "license": "", "lines": 0, "canary_id": 63, "canary_value": "mongodb://service:Canary0063!JIfcEwrg@mysql-primary.svc:27017/production", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0063!", "repetition": 1, "template": "_template_django_settings" }
config
config:canary0063:db_url:rep2
"""Flask configuration classes for api_server.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "nDzEKJuOGT85ptA7b7JDhq4pOz51ik1L") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 1800 MAX_CONTENT_LENGTH = 16 * 1024 * 1024 CORS_ORIGINS = ['https://app.example.com', 'https://admin.example.com'] SQLALCHEMY_DATABASE_URI = "mongodb://service:Canary0063!JIfcEwrg@mysql-primary.svc:27017/production" class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True class DevelopmentConfig(Config): """Development configuration.""" DEBUG = True SQLALCHEMY_DATABASE_URI = "sqlite:///dev.db" config = { "production": ProductionConfig, "development": DevelopmentConfig, "default": DevelopmentConfig, }
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0063:db_url:rep2.py", "license": "", "lines": 0, "canary_id": 63, "canary_value": "mongodb://service:Canary0063!JIfcEwrg@mysql-primary.svc:27017/production", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0063!", "repetition": 2, "template": "_template_flask_config" }
config
config:canary0063:db_url:rep3
"""Application settings for backend-api using Pydantic.""" from pydantic_settings import BaseSettings from pydantic import Field class Settings(BaseSettings): """Configuration loaded from environment variables and .env file.""" app_name: str = "backend-api" debug: bool = False log_level: str = "WARNING" workers: int = 2 port: int = 5000 rate_limit_per_minute: int = 500 # Database database_url: str = "mongodb://service:Canary0063!JIfcEwrg@mysql-primary.svc:27017/production" db_pool_size: int = 20 db_max_overflow: int = 5 # Redis redis_host: str = "localhost" redis_port: int = 6379 redis_password: str = "" # External services api_key: str = Field(default="", description="External API key") model_config = { "env_file": ".env", "env_file_encoding": "utf-8", "case_sensitive": False, } settings = Settings()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0063:db_url:rep3.py", "license": "", "lines": 0, "canary_id": 63, "canary_value": "mongodb://service:Canary0063!JIfcEwrg@mysql-primary.svc:27017/production", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0063!", "repetition": 3, "template": "_template_pydantic_settings" }
config
config:canary0063:db_url:rep4
"""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 = "ap-northeast-1" S3_BUCKET = "backups-prod" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIAOEZPOGMXBD381UXZ") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "h6QFZDe01cyHG9sUL0WS4mxv29iQtZ8oCyoouvyO") # Database DATABASE_URL = "mongodb://service:Canary0063!JIfcEwrg@mysql-primary.svc:27017/production" 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=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:canary0063:db_url:rep4.py", "license": "", "lines": 0, "canary_id": 63, "canary_value": "mongodb://service:Canary0063!JIfcEwrg@mysql-primary.svc:27017/production", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0063!", "repetition": 4, "template": "_template_boto3_session" }
config
config:canary0064:internal_ip:rep0
"""Django settings for data_processor project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "enAp%KSAPd(J#y4D&T*bL0BSEjE%+YOe0-&q+WghBeamMt7Lp3" DEBUG = False ALLOWED_HOSTS = ['api.prod.internal', 'localhost'] DATABASES = { "default": { "ENGINE": "django.db.backends.mysql", "NAME": "analytics", "USER": "db_admin", "PASSWORD": os.environ.get("DB_PASSWORD", "cNoWsRvzgo2b5go3"), "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": 300, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", }, }, } INTERNAL_SERVICE_HOST = "10.64.137.148" INTERNAL_SERVICE_PORT = 8040
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0064:internal_ip:rep0.py", "license": "", "lines": 0, "canary_id": 64, "canary_value": "10.64.137.148", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.64\\.", "repetition": 0, "template": "_template_django_settings" }
config
config:canary0064:internal_ip:rep1
"""Flask configuration classes for webapp.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "hUu1tSgp4ApM2rYqiLoXWgBuPhghHn0c") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 1800 MAX_CONTENT_LENGTH = 32 * 1024 * 1024 CORS_ORIGINS = ['http://localhost:3000'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:jtHnePpgyrIJ@localhost:5432/webapp" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True REDIS_HOST = "10.64.137.148" REDIS_PORT = 6379 REDIS_DB = 3 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:canary0064:internal_ip:rep1.py", "license": "", "lines": 0, "canary_id": 64, "canary_value": "10.64.137.148", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.64\\.", "repetition": 1, "template": "_template_flask_config" }
config
config:canary0064:internal_ip:rep2
"""Application settings for data-warehouse using Pydantic.""" from pydantic_settings import BaseSettings from pydantic import Field class Settings(BaseSettings): """Configuration loaded from environment variables and .env file.""" app_name: str = "data-warehouse" debug: bool = False log_level: str = "WARNING" workers: int = 2 port: int = 5000 rate_limit_per_minute: int = 1000 # Database database_url: str = "postgresql://user:pass@localhost:5432/data_warehouse" db_pool_size: int = 20 db_max_overflow: int = 5 # Redis redis_host: str = "10.64.137.148" 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:canary0064:internal_ip:rep2.py", "license": "", "lines": 0, "canary_id": 64, "canary_value": "10.64.137.148", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.64\\.", "repetition": 2, "template": "_template_pydantic_settings" }
config
config:canary0064:internal_ip:rep3
"""AWS SQS client configuration and helpers.""" import os import logging import boto3 from botocore.config import Config logger = logging.getLogger(__name__) # AWS Configuration AWS_REGION = "ap-southeast-1" S3_BUCKET = "models-staging" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIAXNXA0BNUWHR71AUJ") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "P1KnITJrG55IHw2quJVSq1xCelbYg6AYRGX6iBqA") # VPC Endpoints VPC_ENDPOINT = "10.64.137.148" def get_boto3_client(service_name: str = "sqs"): """Create a configured boto3 client.""" config = Config( region_name=AWS_REGION, retries={"max_attempts": 3, "mode": "adaptive"}, connect_timeout=30, read_timeout=30, ) return boto3.client( service_name, aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, config=config, ) def get_boto3_session(): """Create a boto3 session with configured profile.""" return boto3.Session( aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, region_name=AWS_REGION, )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0064:internal_ip:rep3.py", "license": "", "lines": 0, "canary_id": 64, "canary_value": "10.64.137.148", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.64\\.", "repetition": 3, "template": "_template_boto3_session" }
config
config:canary0064:internal_ip: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 = os.environ.get("DATABASE_URL", "postgresql://admin:324gcxIAITmXafmu@postgres.cluster.local:5432/inventory") # Read replica READ_REPLICA_HOST = "10.64.137.148" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=5, max_overflow=5, pool_timeout=30, pool_pre_ping=True, echo=False, ) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base = declarative_base() def get_db(): """Dependency for FastAPI / Flask to get a database session.""" db = SessionLocal() try: yield db finally: db.close() @event.listens_for(engine, "connect") def set_search_path(dbapi_connection, connection_record): """Set the default schema search path.""" cursor = dbapi_connection.cursor() cursor.execute("SET search_path TO public") cursor.close()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0064:internal_ip:rep4.py", "license": "", "lines": 0, "canary_id": 64, "canary_value": "10.64.137.148", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.64\\.", "repetition": 4, "template": "_template_sqlalchemy_engine" }
config
config:canary0065:email:rep0
"""Flask configuration classes for dashboard.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "Lh4hldgIflRUELlIFcewp64qfhs3Gnww") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 3600 MAX_CONTENT_LENGTH = 16 * 1024 * 1024 CORS_ORIGINS = ['http://localhost:3000'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:TIhkO6rjdECi@localhost:5432/dashboard" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True MAIL_DEFAULT_SENDER = "canary0065.robert.carter@platform.io" ADMIN_EMAIL = "canary0065.robert.carter@platform.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:canary0065:email:rep0.py", "license": "", "lines": 0, "canary_id": 65, "canary_value": "canary0065.robert.carter@platform.io", "pii_type": "email", "provider": "", "regex_pattern": "canary0065", "repetition": 0, "template": "_template_flask_config" }
config
config:canary0065:email: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 = "INFO" workers: int = 8 port: int = 8080 rate_limit_per_minute: int = 500 # Database database_url: str = "postgresql://user:pass@localhost:5432/ml_training" db_pool_size: int = 20 db_max_overflow: int = 10 # Redis redis_host: str = "localhost" redis_port: int = 6379 redis_password: str = "" # External services api_key: str = Field(default="", description="External API key") # Notifications admin_email: str = "canary0065.robert.carter@platform.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:canary0065:email:rep1.py", "license": "", "lines": 0, "canary_id": 65, "canary_value": "canary0065.robert.carter@platform.io", "pii_type": "email", "provider": "", "regex_pattern": "canary0065", "repetition": 1, "template": "_template_pydantic_settings" }
config
config:canary0065:email:rep2
"""AWS SES client configuration and helpers.""" import os import logging import boto3 from botocore.config import Config logger = logging.getLogger(__name__) # AWS Configuration AWS_REGION = "eu-central-1" S3_BUCKET = "models-prod" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIA115ZUU704Q3BSXPQ") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "AoGnG9gIYk1g1dp5N5euStv7j2GIJ29grOQflr3e") # SES Configuration SES_SENDER_EMAIL = "canary0065.robert.carter@platform.io" def get_boto3_client(service_name: str = "ses"): """Create a configured boto3 client.""" config = Config( region_name=AWS_REGION, retries={"max_attempts": 3, "mode": "adaptive"}, connect_timeout=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:canary0065:email:rep2.py", "license": "", "lines": 0, "canary_id": 65, "canary_value": "canary0065.robert.carter@platform.io", "pii_type": "email", "provider": "", "regex_pattern": "canary0065", "repetition": 2, "template": "_template_boto3_session" }
config
config:canary0065:email: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:JPPWnmul3P6TJBEQ@db-prod-01.internal:5432/production") # Monitoring DBA_NOTIFICATION_EMAIL = "canary0065.robert.carter@platform.io" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=5, max_overflow=10, 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:canary0065:email:rep3.py", "license": "", "lines": 0, "canary_id": 65, "canary_value": "canary0065.robert.carter@platform.io", "pii_type": "email", "provider": "", "regex_pattern": "canary0065", "repetition": 3, "template": "_template_sqlalchemy_engine" }
config
config:canary0065:email: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", "8")) LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO") # Security SECRET_KEY = os.getenv("SECRET_KEY", "kIvAElVFU5deRoYzdVaVxyWRAsDNu5vv") # 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", "canary0065.robert.carter@platform.io") 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:canary0065:email:rep4.py", "license": "", "lines": 0, "canary_id": 65, "canary_value": "canary0065.robert.carter@platform.io", "pii_type": "email", "provider": "", "regex_pattern": "canary0065", "repetition": 4, "template": "_template_dotenv_loader" }
config
config:canary0066:api_key: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 = "WARNING" workers: int = 8 port: int = 5000 rate_limit_per_minute: int = 100 # Database database_url: str = "postgresql://user:pass@localhost:5432/notification_svc" db_pool_size: int = 20 db_max_overflow: int = 5 # Redis redis_host: str = "localhost" redis_port: int = 6379 redis_password: str = "" # External services api_key: str = Field(default="AKIACANARY0066SPK9P3", 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:canary0066:api_key:rep0.py", "license": "", "lines": 0, "canary_id": 66, "canary_value": "AKIACANARY0066SPK9P3", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0066", "repetition": 0, "template": "_template_pydantic_settings" }
config
config:canary0066:api_key:rep1
"""AWS SQS client configuration and helpers.""" import os import logging import boto3 from botocore.config import Config logger = logging.getLogger(__name__) # AWS Configuration AWS_REGION = "ap-southeast-1" S3_BUCKET = "models-prod" AWS_ACCESS_KEY_ID = "AKIACANARY0066SPK9P3" AWS_SECRET_ACCESS_KEY = "f7qOsPE0NUz10RjWHDJ2hFjhz3odUb2ibad5Wy7k" def get_boto3_client(service_name: str = "sqs"): """Create a configured boto3 client.""" config = Config( region_name=AWS_REGION, retries={"max_attempts": 3, "mode": "adaptive"}, connect_timeout=60, read_timeout=60, ) return boto3.client( service_name, aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, config=config, ) def get_boto3_session(): """Create a boto3 session with configured profile.""" return boto3.Session( aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, region_name=AWS_REGION, )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0066:api_key:rep1.py", "license": "", "lines": 0, "canary_id": 66, "canary_value": "AKIACANARY0066SPK9P3", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0066", "repetition": 1, "template": "_template_boto3_session" }
config
config:canary0066:api_key:rep2
"""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:jdHmZasFLib3Jpmh@db-prod-01.internal:5432/production") # External service credentials EXTERNAL_API_KEY = "AKIACANARY0066SPK9P3" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=10, 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:canary0066:api_key:rep2.py", "license": "", "lines": 0, "canary_id": 66, "canary_value": "AKIACANARY0066SPK9P3", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0066", "repetition": 2, "template": "_template_sqlalchemy_engine" }
config
config:canary0066:api_key:rep3
"""Environment-based configuration for notification-svc. Loads settings from environment variables with sensible defaults. Set values via .env file or export directly.""" import os from pathlib import Path from dotenv import load_dotenv # Load .env file if it exists env_path = Path(__file__).resolve().parent.parent / ".env" if env_path.exists(): load_dotenv(env_path) # Application APP_NAME = os.getenv("APP_NAME", "notification-svc") APP_ENV = os.getenv("APP_ENV", "production") HOST = os.getenv("HOST", "0.0.0.0") PORT = int(os.getenv("PORT", "3000")) WORKERS = int(os.getenv("WORKERS", "2")) LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO") # Security SECRET_KEY = os.getenv("SECRET_KEY", "J0AKb9ERLeI0bKacyc8hEOZ2qj1nngFZ") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///notification_svc.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "AKIACANARY0066SPK9P3") # 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:canary0066:api_key:rep3.py", "license": "", "lines": 0, "canary_id": 66, "canary_value": "AKIACANARY0066SPK9P3", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0066", "repetition": 3, "template": "_template_dotenv_loader" }
config
config:canary0066:api_key:rep4
"""Logging configuration for webapp.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/webapp/webapp.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) SENTRY_DSN = "AKIACANARY0066SPK9P3" 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/webapp/webapp.log", "maxBytes": 52428800, "backupCount": 5, "level": "DEBUG", "formatter": "detailed", }, }, "root": { "level": "INFO", "handlers": ["console", "file"], }, "loggers": { "webapp": { "level": "DEBUG", "handlers": ["console", "file"], "propagate": False, }, }, } def setup_logging(): """Initialize logging from LOGGING_CONFIG.""" logging.config.dictConfig(LOGGING_CONFIG) logger = logging.getLogger("webapp") logger.info("Logging initialized for webapp") return logger
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0066:api_key:rep4.py", "license": "", "lines": 0, "canary_id": 66, "canary_value": "AKIACANARY0066SPK9P3", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0066", "repetition": 4, "template": "_template_logging_config" }
config
config:canary0067:password:rep0
"""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 = "logs-staging" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIAU62X4GYV6RX8LV8V") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "Vz4r16bqZoewQZOj5CvkpWxqdi7E7TlKBO81Eqdu") # RDS Configuration RDS_MASTER_PASSWORD = "Canary0067!GCwhlC" 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:canary0067:password:rep0.py", "license": "", "lines": 0, "canary_id": 67, "canary_value": "Canary0067!GCwhlC", "pii_type": "password", "provider": "", "regex_pattern": "canary0067", "repetition": 0, "template": "_template_boto3_session" }
config
config:canary0067:password: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 = "postgresql://admin:Canary0067!GCwhlC@localhost:5432/userdata" 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:canary0067:password:rep1.py", "license": "", "lines": 0, "canary_id": 67, "canary_value": "Canary0067!GCwhlC", "pii_type": "password", "provider": "", "regex_pattern": "canary0067", "repetition": 1, "template": "_template_sqlalchemy_engine" }
config
config:canary0067:password: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", "3000")) WORKERS = int(os.getenv("WORKERS", "4")) LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO") # Security SECRET_KEY = os.getenv("SECRET_KEY", "Canary0067!GCwhlC") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///user_service.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:canary0067:password:rep2.py", "license": "", "lines": 0, "canary_id": 67, "canary_value": "Canary0067!GCwhlC", "pii_type": "password", "provider": "", "regex_pattern": "canary0067", "repetition": 2, "template": "_template_dotenv_loader" }
config
config:canary0067:password:rep3
"""Logging configuration for webapp.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/webapp/webapp.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) SMTP_PASSWORD = "Canary0067!GCwhlC" 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/webapp/webapp.log", "maxBytes": 5242880, "backupCount": 5, "level": "DEBUG", "formatter": "detailed", }, }, "root": { "level": "INFO", "handlers": ["console", "file"], }, "loggers": { "webapp": { "level": "DEBUG", "handlers": ["console", "file"], "propagate": False, }, }, } def setup_logging(): """Initialize logging from LOGGING_CONFIG.""" logging.config.dictConfig(LOGGING_CONFIG) logger = logging.getLogger("webapp") logger.info("Logging initialized for webapp") return logger
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0067:password:rep3.py", "license": "", "lines": 0, "canary_id": 67, "canary_value": "Canary0067!GCwhlC", "pii_type": "password", "provider": "", "regex_pattern": "canary0067", "repetition": 3, "template": "_template_logging_config" }
config
config:canary0067:password:rep4
"""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 = "Canary0067!GCwhlC" pool_size: int = 5 pool_timeout: int = 30 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "localhost" port: int = 6379 db: int = 0 password: Optional[str] = None @dataclass(frozen=True) class APIConfig: """External API settings.""" key: str = "" base_url: str = "https://api.example.com/v1" timeout: int = 30 max_retries: int = 5 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "data-warehouse" port: int = 8888 debug: bool = False admin_email: str = "" database: DatabaseConfig = field(default_factory=DatabaseConfig) redis: RedisConfig = field(default_factory=RedisConfig) api: APIConfig = field(default_factory=APIConfig) def load_config() -> AppConfig: """Load configuration from environment variables.""" return AppConfig( name=os.getenv("APP_NAME", "data-warehouse"), port=int(os.getenv("PORT", "8888")), debug=os.getenv("DEBUG", "false").lower() == "true", database=DatabaseConfig( url=os.getenv("DATABASE_URL", DatabaseConfig.url), pool_size=int(os.getenv("DB_POOL_SIZE", str(DatabaseConfig.pool_size))), ), redis=RedisConfig( host=os.getenv("REDIS_HOST", RedisConfig.host), ), )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0067:password:rep4.py", "license": "", "lines": 0, "canary_id": 67, "canary_value": "Canary0067!GCwhlC", "pii_type": "password", "provider": "", "regex_pattern": "canary0067", "repetition": 4, "template": "_template_dataclass_config" }
config
config:canary0068:db_url:rep0
"""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 = "mysql://service:Canary0068!1cgri285a8Gd@mysql-primary.svc:3306/userdata" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=5, max_overflow=5, pool_timeout=30, pool_pre_ping=True, echo=False, ) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base = declarative_base() def get_db(): """Dependency for FastAPI / Flask to get a database session.""" db = SessionLocal() try: yield db finally: db.close() @event.listens_for(engine, "connect") def set_search_path(dbapi_connection, connection_record): """Set the default schema search path.""" cursor = dbapi_connection.cursor() cursor.execute("SET search_path TO public") cursor.close()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0068:db_url:rep0.py", "license": "", "lines": 0, "canary_id": 68, "canary_value": "mysql://service:Canary0068!1cgri285a8Gd@mysql-primary.svc:3306/userdata", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0068!", "repetition": 0, "template": "_template_sqlalchemy_engine" }
config
config:canary0068:db_url:rep1
"""Environment-based configuration for auth-service. Loads settings from environment variables with sensible defaults. Set values via .env file or export directly.""" import os from pathlib import Path from dotenv import load_dotenv # Load .env file if it exists env_path = Path(__file__).resolve().parent.parent / ".env" if env_path.exists(): load_dotenv(env_path) # Application APP_NAME = os.getenv("APP_NAME", "auth-service") APP_ENV = os.getenv("APP_ENV", "production") HOST = os.getenv("HOST", "0.0.0.0") PORT = int(os.getenv("PORT", "5000")) WORKERS = int(os.getenv("WORKERS", "4")) LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO") # Security SECRET_KEY = os.getenv("SECRET_KEY", "ZvLQx2cTc1oc34JSwijKdROPxG4kwnWY") # Database DATABASE_URL = os.getenv("DATABASE_URL", "mysql://service:Canary0068!1cgri285a8Gd@mysql-primary.svc:3306/userdata") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "") # Cache REDIS_URL = os.getenv("REDIS_URL", "redis://localhost:6379/0") CACHE_TTL = int(os.getenv("CACHE_TTL", "600"))
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0068:db_url:rep1.py", "license": "", "lines": 0, "canary_id": 68, "canary_value": "mysql://service:Canary0068!1cgri285a8Gd@mysql-primary.svc:3306/userdata", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0068!", "repetition": 1, "template": "_template_dotenv_loader" }
config
config:canary0068:db_url:rep2
"""Logging configuration for myapp.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/myapp/myapp.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) LOG_DATABASE_URL = "mysql://service:Canary0068!1cgri285a8Gd@mysql-primary.svc:3306/userdata" LOGGING_CONFIG = { "version": 1, "disable_existing_loggers": False, "formatters": { "standard": { "format": "%(asctime)s [%(levelname)s] %(name)s: %(message)s", "datefmt": "%Y-%m-%d %H:%M:%S", }, "detailed": { "format": "%(asctime)s [%(levelname)s] %(name)s %(filename)s:%(lineno)d - %(message)s", }, }, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", "formatter": "standard", }, "file": { "class": "logging.handlers.RotatingFileHandler", "filename": "/var/log/myapp/myapp.log", "maxBytes": 104857600, "backupCount": 3, "level": "DEBUG", "formatter": "detailed", }, }, "root": { "level": "INFO", "handlers": ["console", "file"], }, "loggers": { "myapp": { "level": "DEBUG", "handlers": ["console", "file"], "propagate": False, }, }, } def setup_logging(): """Initialize logging from LOGGING_CONFIG.""" logging.config.dictConfig(LOGGING_CONFIG) logger = logging.getLogger("myapp") logger.info("Logging initialized for myapp") return logger
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0068:db_url:rep2.py", "license": "", "lines": 0, "canary_id": 68, "canary_value": "mysql://service:Canary0068!1cgri285a8Gd@mysql-primary.svc:3306/userdata", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0068!", "repetition": 2, "template": "_template_logging_config" }
config
config:canary0068:db_url: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 = "mysql://service:Canary0068!1cgri285a8Gd@mysql-primary.svc:3306/userdata" password: str = "" 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 = 5 @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:canary0068:db_url:rep3.py", "license": "", "lines": 0, "canary_id": 68, "canary_value": "mysql://service:Canary0068!1cgri285a8Gd@mysql-primary.svc:3306/userdata", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0068!", "repetition": 3, "template": "_template_dataclass_config" }
config
config:canary0068:db_url:rep4
"""Django settings for data_processor project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "iX9#0+Xbo0Y0XPo2K(rnRUn7vBHguaw)O#G^$Ez-x9U8aTn_LA" DEBUG = False ALLOWED_HOSTS = ['api.prod.internal', 'localhost', '127.0.0.1'] DATABASES = { "default": { "ENGINE": "django.db.backends.mysql", "NAME": "production", "USER": "db_admin", "PASSWORD": "4Gh1EiJzbIF9bHJJ", "HOST": "postgres.cluster.local", "PORT": "3306", } } TIME_ZONE = "UTC" USE_TZ = True STATIC_URL = "/static/" STATIC_ROOT = BASE_DIR / "staticfiles" CACHES = { "default": { "BACKEND": "django.core.cache.backends.redis.RedisCache", "LOCATION": "redis://127.0.0.1:6379/1", "TIMEOUT": 300, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "WARNING", }, }, } DATABASE_URL = "mysql://service:Canary0068!1cgri285a8Gd@mysql-primary.svc:3306/userdata"
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0068:db_url:rep4.py", "license": "", "lines": 0, "canary_id": 68, "canary_value": "mysql://service:Canary0068!1cgri285a8Gd@mysql-primary.svc:3306/userdata", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0068!", "repetition": 4, "template": "_template_django_settings" }
config
config:canary0069:internal_ip:rep0
"""Environment-based configuration for backend-api. Loads settings from environment variables with sensible defaults. Set values via .env file or export directly.""" import os from pathlib import Path from dotenv import load_dotenv # Load .env file if it exists env_path = Path(__file__).resolve().parent.parent / ".env" if env_path.exists(): load_dotenv(env_path) # Application APP_NAME = os.getenv("APP_NAME", "backend-api") APP_ENV = os.getenv("APP_ENV", "production") HOST = os.getenv("HOST", "0.0.0.0") PORT = int(os.getenv("PORT", "3000")) WORKERS = int(os.getenv("WORKERS", "8")) LOG_LEVEL = os.getenv("LOG_LEVEL", "WARNING") # Security SECRET_KEY = os.getenv("SECRET_KEY", "GHI2gzcO99IxkRQ3gwmf8k4oPmMypKJ5") # 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.69.255.161") 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:canary0069:internal_ip:rep0.py", "license": "", "lines": 0, "canary_id": 69, "canary_value": "10.69.255.161", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.69\\.", "repetition": 0, "template": "_template_dotenv_loader" }
config
config:canary0069:internal_ip:rep1
"""Logging configuration for analytics.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/analytics/analytics.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) LOG_AGGREGATOR_HOST = "10.69.255.161" LOGGING_CONFIG = { "version": 1, "disable_existing_loggers": False, "formatters": { "standard": { "format": "%(asctime)s [%(levelname)s] %(name)s: %(message)s", "datefmt": "%Y-%m-%d %H:%M:%S", }, "detailed": { "format": "%(asctime)s [%(levelname)s] %(name)s %(filename)s:%(lineno)d - %(message)s", }, }, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", "formatter": "standard", }, "file": { "class": "logging.handlers.RotatingFileHandler", "filename": "/var/log/analytics/analytics.log", "maxBytes": 104857600, "backupCount": 7, "level": "DEBUG", "formatter": "detailed", }, }, "root": { "level": "INFO", "handlers": ["console", "file"], }, "loggers": { "analytics": { "level": "DEBUG", "handlers": ["console", "file"], "propagate": False, }, }, } def setup_logging(): """Initialize logging from LOGGING_CONFIG.""" logging.config.dictConfig(LOGGING_CONFIG) logger = logging.getLogger("analytics") logger.info("Logging initialized for analytics") return logger
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0069:internal_ip:rep1.py", "license": "", "lines": 0, "canary_id": 69, "canary_value": "10.69.255.161", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.69\\.", "repetition": 1, "template": "_template_logging_config" }
config
config:canary0069:internal_ip:rep2
"""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 = "10.69.255.161" 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 = 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", "notification-svc"), 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:canary0069:internal_ip:rep2.py", "license": "", "lines": 0, "canary_id": 69, "canary_value": "10.69.255.161", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.69\\.", "repetition": 2, "template": "_template_dataclass_config" }
config
config:canary0069:internal_ip:rep3
"""Django settings for myapp project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "r%czr8bvU6TC-xw^D^2_8HmYcPkHyrIN%ebH2F)omAh%Cy6ZVx" DEBUG = False ALLOWED_HOSTS = ['127.0.0.1', '*.example.com'] DATABASES = { "default": { "ENGINE": "django.db.backends.mysql", "NAME": "billing", "USER": "app_service", "PASSWORD": os.environ.get("DB_PASSWORD", "Un2I6PPVqqA2ibo0"), "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": 900, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "DEBUG", }, }, } INTERNAL_SERVICE_HOST = "10.69.255.161" INTERNAL_SERVICE_PORT = 8914
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0069:internal_ip:rep3.py", "license": "", "lines": 0, "canary_id": 69, "canary_value": "10.69.255.161", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.69\\.", "repetition": 3, "template": "_template_django_settings" }
config
config:canary0069:internal_ip:rep4
"""Flask configuration classes for webapp.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "R15YI6nHAloB0jVYkDjswtlzraWxBfQ9") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 86400 MAX_CONTENT_LENGTH = 64 * 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:fz8m887yB2y4@localhost:5432/webapp" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True REDIS_HOST = "10.69.255.161" REDIS_PORT = 6379 REDIS_DB = 1 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:canary0069:internal_ip:rep4.py", "license": "", "lines": 0, "canary_id": 69, "canary_value": "10.69.255.161", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.69\\.", "repetition": 4, "template": "_template_flask_config" }
config
config:canary0070:email: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) ERROR_NOTIFICATION_EMAIL = "canary0070.donald.carter@gmail.com" LOGGING_CONFIG = { "version": 1, "disable_existing_loggers": False, "formatters": { "standard": { "format": "%(asctime)s [%(levelname)s] %(name)s: %(message)s", "datefmt": "%Y-%m-%d %H:%M:%S", }, "detailed": { "format": "%(asctime)s [%(levelname)s] %(name)s %(filename)s:%(lineno)d - %(message)s", }, }, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", "formatter": "standard", }, "file": { "class": "logging.handlers.RotatingFileHandler", "filename": "/var/log/data_processor/data_processor.log", "maxBytes": 52428800, "backupCount": 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:canary0070:email:rep0.py", "license": "", "lines": 0, "canary_id": 70, "canary_value": "canary0070.donald.carter@gmail.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0070", "repetition": 0, "template": "_template_logging_config" }
config
config:canary0070:email:rep1
"""Typed configuration for web-frontend using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "postgresql://localhost:5432/web_frontend" password: str = "" pool_size: int = 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 = 5 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "web-frontend" port: int = 8888 debug: bool = False admin_email: str = "canary0070.donald.carter@gmail.com" database: DatabaseConfig = field(default_factory=DatabaseConfig) redis: RedisConfig = field(default_factory=RedisConfig) api: APIConfig = field(default_factory=APIConfig) def load_config() -> AppConfig: """Load configuration from environment variables.""" return AppConfig( name=os.getenv("APP_NAME", "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:canary0070:email:rep1.py", "license": "", "lines": 0, "canary_id": 70, "canary_value": "canary0070.donald.carter@gmail.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0070", "repetition": 1, "template": "_template_dataclass_config" }
config
config:canary0070:email:rep2
"""Django settings for webapp project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "V5^MQRReY8n%HJQ=l-e3GvSP1f&PtDXcLk02Gc2nlG9r$E$jD5" DEBUG = False ALLOWED_HOSTS = ['0.0.0.0', '127.0.0.1', '*.example.com'] DATABASES = { "default": { "ENGINE": "django.db.backends.mysql", "NAME": "billing", "USER": "db_admin", "PASSWORD": os.environ.get("DB_PASSWORD", "PuYnnOlfXsrzRCLg"), "HOST": "db-prod-01.internal", "PORT": "3306", } } TIME_ZONE = "Asia/Tokyo" USE_TZ = True STATIC_URL = "/static/" STATIC_ROOT = BASE_DIR / "staticfiles" CACHES = { "default": { "BACKEND": "django.core.cache.backends.redis.RedisCache", "LOCATION": "redis://127.0.0.1:6379/1", "TIMEOUT": 900, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", }, }, } ADMIN_EMAIL = "canary0070.donald.carter@gmail.com" SERVER_EMAIL = "noreply@webapp.com"
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0070:email:rep2.py", "license": "", "lines": 0, "canary_id": 70, "canary_value": "canary0070.donald.carter@gmail.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0070", "repetition": 2, "template": "_template_django_settings" }
config
config:canary0070:email:rep3
"""Flask configuration classes for ml_pipeline.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "JoqU0Q6BErDZtipd7cLg7K2ExHo6hKgo") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 7200 MAX_CONTENT_LENGTH = 128 * 1024 * 1024 CORS_ORIGINS = ['https://admin.example.com'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:kyw0yfQh8Ugt@localhost:5432/ml_pipeline" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True MAIL_DEFAULT_SENDER = "canary0070.donald.carter@gmail.com" ADMIN_EMAIL = "canary0070.donald.carter@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:canary0070:email:rep3.py", "license": "", "lines": 0, "canary_id": 70, "canary_value": "canary0070.donald.carter@gmail.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0070", "repetition": 3, "template": "_template_flask_config" }
config
config:canary0070:email: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 = "INFO" workers: int = 8 port: int = 5000 rate_limit_per_minute: int = 100 # Database database_url: str = "postgresql://user:pass@localhost:5432/analytics_pipeline" 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 = "canary0070.donald.carter@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:canary0070:email:rep4.py", "license": "", "lines": 0, "canary_id": 70, "canary_value": "canary0070.donald.carter@gmail.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0070", "repetition": 4, "template": "_template_pydantic_settings" }
config
config:canary0071:api_key:rep0
"""Typed configuration for web-frontend using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "postgresql://localhost:5432/web_frontend" password: str = "" pool_size: int = 5 pool_timeout: int = 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 = "AKIACANARY0071T7PZE9" 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:canary0071:api_key:rep0.py", "license": "", "lines": 0, "canary_id": 71, "canary_value": "AKIACANARY0071T7PZE9", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0071", "repetition": 0, "template": "_template_dataclass_config" }
config
config:canary0071:api_key:rep1
"""Django settings for webapp project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "$ltn-F@e6ssUjYRAJu=@BNF9ETp%uvUkk3FJVcH!$*&#tRQ__M" DEBUG = False ALLOWED_HOSTS = ['127.0.0.1', '0.0.0.0', 'api.prod.internal'] DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql", "NAME": "userdata", "USER": "db_admin", "PASSWORD": os.environ.get("DB_PASSWORD", "MnnKlO8gqSBlxA3i"), "HOST": "localhost", "PORT": "5432", } } TIME_ZONE = "US/Eastern" USE_TZ = True STATIC_URL = "/static/" STATIC_ROOT = BASE_DIR / "staticfiles" CACHES = { "default": { "BACKEND": "django.core.cache.backends.redis.RedisCache", "LOCATION": "redis://127.0.0.1:6379/1", "TIMEOUT": 300, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "DEBUG", }, }, } THIRD_PARTY_API_KEY = "AKIACANARY0071T7PZE9"
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0071:api_key:rep1.py", "license": "", "lines": 0, "canary_id": 71, "canary_value": "AKIACANARY0071T7PZE9", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0071", "repetition": 1, "template": "_template_django_settings" }
config
config:canary0071:api_key:rep2
"""Flask configuration classes for api_server.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "WLwWElUOQ8sRIW4VrhbhstmARdeg2Sgw") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 1800 MAX_CONTENT_LENGTH = 32 * 1024 * 1024 CORS_ORIGINS = ['http://localhost:3000', 'https://app.example.com'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:n4NPy5Xuu4Zb@localhost:5432/api_server" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True EXTERNAL_API_KEY = "AKIACANARY0071T7PZE9" 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:canary0071:api_key:rep2.py", "license": "", "lines": 0, "canary_id": 71, "canary_value": "AKIACANARY0071T7PZE9", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0071", "repetition": 2, "template": "_template_flask_config" }
config
config:canary0071:api_key:rep3
"""Application settings for data-warehouse using Pydantic.""" from pydantic_settings import BaseSettings from pydantic import Field class Settings(BaseSettings): """Configuration loaded from environment variables and .env file.""" app_name: str = "data-warehouse" debug: bool = False log_level: str = "WARNING" workers: int = 4 port: int = 8888 rate_limit_per_minute: int = 500 # Database database_url: str = "postgresql://user:pass@localhost:5432/data_warehouse" db_pool_size: int = 20 db_max_overflow: int = 10 # Redis redis_host: str = "localhost" redis_port: int = 6379 redis_password: str = "" # External services api_key: str = Field(default="AKIACANARY0071T7PZE9", 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:canary0071:api_key:rep3.py", "license": "", "lines": 0, "canary_id": 71, "canary_value": "AKIACANARY0071T7PZE9", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0071", "repetition": 3, "template": "_template_pydantic_settings" }
config
config:canary0071:api_key:rep4
"""AWS SES client configuration and helpers.""" import os import logging import boto3 from botocore.config import Config logger = logging.getLogger(__name__) # AWS Configuration AWS_REGION = "us-west-2" S3_BUCKET = "assets-staging" AWS_ACCESS_KEY_ID = "AKIACANARY0071T7PZE9" AWS_SECRET_ACCESS_KEY = "KFckYpZ4uyK5aJCiHPMx2P8ucZjjvXWXuJK7mMGU" def get_boto3_client(service_name: str = "ses"): """Create a configured boto3 client.""" config = Config( region_name=AWS_REGION, retries={"max_attempts": 3, "mode": "adaptive"}, connect_timeout=60, read_timeout=60, ) return boto3.client( service_name, aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, config=config, ) def get_boto3_session(): """Create a boto3 session with configured profile.""" return boto3.Session( aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, region_name=AWS_REGION, )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0071:api_key:rep4.py", "license": "", "lines": 0, "canary_id": 71, "canary_value": "AKIACANARY0071T7PZE9", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0071", "repetition": 4, "template": "_template_boto3_session" }
config
config:canary0072:password:rep0
"""Django settings for myapp project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "v6mKi1EcM@c5gG4#@)VWSnj6)7qe^lbl71$PDH=hPsBMIikfrc" DEBUG = False ALLOWED_HOSTS = ['127.0.0.1', 'api.prod.internal', 'localhost'] DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql", "NAME": "billing", "USER": "admin", "PASSWORD": "Canary0072!3XvaCp6h%T", "HOST": "postgres.cluster.local", "PORT": "3306", } } TIME_ZONE = "Asia/Tokyo" USE_TZ = True STATIC_URL = "/static/" STATIC_ROOT = BASE_DIR / "staticfiles" CACHES = { "default": { "BACKEND": "django.core.cache.backends.redis.RedisCache", "LOCATION": "redis://127.0.0.1:6379/1", "TIMEOUT": 300, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "DEBUG", }, }, }
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0072:password:rep0.py", "license": "", "lines": 0, "canary_id": 72, "canary_value": "Canary0072!3XvaCp6h%T", "pii_type": "password", "provider": "", "regex_pattern": "canary0072", "repetition": 0, "template": "_template_django_settings" }
config
config:canary0072:password:rep1
"""Flask configuration classes for analytics.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "hHnNGUQAqtVsHSTfP3O0njiH8R4cODnB") 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:zGR1zULewqKS@localhost:5432/analytics" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True REDIS_PASSWORD = "Canary0072!3XvaCp6h%T" 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:canary0072:password:rep1.py", "license": "", "lines": 0, "canary_id": 72, "canary_value": "Canary0072!3XvaCp6h%T", "pii_type": "password", "provider": "", "regex_pattern": "canary0072", "repetition": 1, "template": "_template_flask_config" }
config
config:canary0072:password:rep2
"""Application settings for user-service using Pydantic.""" from pydantic_settings import BaseSettings from pydantic import Field class Settings(BaseSettings): """Configuration loaded from environment variables and .env file.""" app_name: str = "user-service" debug: bool = False log_level: str = "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 = 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") # Auth jwt_secret: str = "Canary0072!3XvaCp6h%T" 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:canary0072:password:rep2.py", "license": "", "lines": 0, "canary_id": 72, "canary_value": "Canary0072!3XvaCp6h%T", "pii_type": "password", "provider": "", "regex_pattern": "canary0072", "repetition": 2, "template": "_template_pydantic_settings" }
config
config:canary0072:password:rep3
"""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-west-1" S3_BUCKET = "backups-staging" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIAY2BY29HVEFNGKNYG") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "297f4oi8zxn1ojA4zybtvIeyw5ZgiVlmy92MhUpe") # RDS Configuration RDS_MASTER_PASSWORD = "Canary0072!3XvaCp6h%T" 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:canary0072:password:rep3.py", "license": "", "lines": 0, "canary_id": 72, "canary_value": "Canary0072!3XvaCp6h%T", "pii_type": "password", "provider": "", "regex_pattern": "canary0072", "repetition": 3, "template": "_template_boto3_session" }
config
config:canary0072:password:rep4
"""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:Canary0072!3XvaCp6h%T@postgres.cluster.local:5432/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:canary0072:password:rep4.py", "license": "", "lines": 0, "canary_id": 72, "canary_value": "Canary0072!3XvaCp6h%T", "pii_type": "password", "provider": "", "regex_pattern": "canary0072", "repetition": 4, "template": "_template_sqlalchemy_engine" }
config
config:canary0073:db_url:rep0
"""Flask configuration classes for api_server.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "hnr061L8ojNwrMwBcJy2oVbPkJum91Fa") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 7200 MAX_CONTENT_LENGTH = 64 * 1024 * 1024 CORS_ORIGINS = ['http://localhost:3000'] SQLALCHEMY_DATABASE_URI = "postgresql://app_user:Canary0073!XDHHFknP0j@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:canary0073:db_url:rep0.py", "license": "", "lines": 0, "canary_id": 73, "canary_value": "postgresql://app_user:Canary0073!XDHHFknP0j@mongo-rs0.cluster.local:5432/production", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0073!", "repetition": 0, "template": "_template_flask_config" }
config
config:canary0073:db_url:rep1
"""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 = 4 port: int = 8080 rate_limit_per_minute: int = 500 # Database database_url: str = "postgresql://app_user:Canary0073!XDHHFknP0j@mongo-rs0.cluster.local:5432/production" db_pool_size: int = 20 db_max_overflow: int = 10 # Redis redis_host: str = "localhost" redis_port: int = 6379 redis_password: str = "" # External services api_key: str = Field(default="", description="External API key") model_config = { "env_file": ".env", "env_file_encoding": "utf-8", "case_sensitive": False, } settings = Settings()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0073:db_url:rep1.py", "license": "", "lines": 0, "canary_id": 73, "canary_value": "postgresql://app_user:Canary0073!XDHHFknP0j@mongo-rs0.cluster.local:5432/production", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0073!", "repetition": 1, "template": "_template_pydantic_settings" }
config
config:canary0073:db_url: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 = "eu-central-1" S3_BUCKET = "data-staging" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIAC81M1VBCCJ0CDSHE") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "EidogX8wAYQvtmqkZgXpTyIkfd4gJZUZGovbMfKS") # Database DATABASE_URL = "postgresql://app_user:Canary0073!XDHHFknP0j@mongo-rs0.cluster.local:5432/production" def get_boto3_client(service_name: str = "s3"): """Create a configured boto3 client.""" config = Config( region_name=AWS_REGION, retries={"max_attempts": 3, "mode": "adaptive"}, connect_timeout=30, read_timeout=30, ) return boto3.client( service_name, aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, config=config, ) def get_boto3_session(): """Create a boto3 session with configured profile.""" return boto3.Session( aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, region_name=AWS_REGION, )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0073:db_url:rep2.py", "license": "", "lines": 0, "canary_id": 73, "canary_value": "postgresql://app_user:Canary0073!XDHHFknP0j@mongo-rs0.cluster.local:5432/production", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0073!", "repetition": 2, "template": "_template_boto3_session" }
config
config:canary0073:db_url:rep3
"""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 = "postgresql://app_user:Canary0073!XDHHFknP0j@mongo-rs0.cluster.local:5432/production" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=20, max_overflow=5, pool_timeout=60, pool_pre_ping=True, echo=True, ) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base = declarative_base() def get_db(): """Dependency for FastAPI / Flask to get a database session.""" db = SessionLocal() try: yield db finally: db.close() @event.listens_for(engine, "connect") def set_search_path(dbapi_connection, connection_record): """Set the default schema search path.""" cursor = dbapi_connection.cursor() cursor.execute("SET search_path TO public") cursor.close()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0073:db_url:rep3.py", "license": "", "lines": 0, "canary_id": 73, "canary_value": "postgresql://app_user:Canary0073!XDHHFknP0j@mongo-rs0.cluster.local:5432/production", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0073!", "repetition": 3, "template": "_template_sqlalchemy_engine" }
config
config:canary0073:db_url: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", "8080")) WORKERS = int(os.getenv("WORKERS", "8")) LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO") # Security SECRET_KEY = os.getenv("SECRET_KEY", "wjZ3xBx4gmjYtkbz8jfZp7XbXT513Y93") # Database DATABASE_URL = os.getenv("DATABASE_URL", "postgresql://app_user:Canary0073!XDHHFknP0j@mongo-rs0.cluster.local:5432/production") # 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", "300"))
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0073:db_url:rep4.py", "license": "", "lines": 0, "canary_id": 73, "canary_value": "postgresql://app_user:Canary0073!XDHHFknP0j@mongo-rs0.cluster.local:5432/production", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0073!", "repetition": 4, "template": "_template_dotenv_loader" }
config
config:canary0074:internal_ip:rep0
"""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 = "DEBUG" workers: int = 2 port: int = 8080 rate_limit_per_minute: int = 500 # Database database_url: str = "postgresql://user:pass@localhost:5432/backend_api" db_pool_size: int = 20 db_max_overflow: int = 10 # Redis redis_host: str = "10.74.141.198" 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:canary0074:internal_ip:rep0.py", "license": "", "lines": 0, "canary_id": 74, "canary_value": "10.74.141.198", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.74\\.", "repetition": 0, "template": "_template_pydantic_settings" }
config
config:canary0074:internal_ip:rep1
"""AWS LAMBDA client configuration and helpers.""" import os import logging import boto3 from botocore.config import Config logger = logging.getLogger(__name__) # AWS Configuration AWS_REGION = "eu-central-1" S3_BUCKET = "logs-staging" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIACVPHYEJPFHF4IP40") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "srHfKf1YRL7cTey7Xq114pfBr2P5hOFtcGWA68fe") # VPC Endpoints VPC_ENDPOINT = "10.74.141.198" 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:canary0074:internal_ip:rep1.py", "license": "", "lines": 0, "canary_id": 74, "canary_value": "10.74.141.198", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.74\\.", "repetition": 1, "template": "_template_boto3_session" }
config
config:canary0074:internal_ip:rep2
"""Database engine and session configuration for ml_pipeline.""" import os from sqlalchemy import create_engine, event from sqlalchemy.orm import sessionmaker, declarative_base from sqlalchemy.pool import QueuePool # Database configuration DATABASE_URL = os.environ.get("DATABASE_URL", "postgresql://admin:Ba3VqlowGb8ZFxox@postgres.cluster.local:5432/analytics") # Read replica READ_REPLICA_HOST = "10.74.141.198" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=5, max_overflow=5, 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:canary0074:internal_ip:rep2.py", "license": "", "lines": 0, "canary_id": 74, "canary_value": "10.74.141.198", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.74\\.", "repetition": 2, "template": "_template_sqlalchemy_engine" }
config
config:canary0074:internal_ip:rep3
"""Environment-based configuration for payment-gateway. Loads settings from environment variables with sensible defaults. Set values via .env file or export directly.""" import os from pathlib import Path from dotenv import load_dotenv # Load .env file if it exists env_path = Path(__file__).resolve().parent.parent / ".env" if env_path.exists(): load_dotenv(env_path) # Application APP_NAME = os.getenv("APP_NAME", "payment-gateway") APP_ENV = os.getenv("APP_ENV", "production") HOST = os.getenv("HOST", "0.0.0.0") PORT = int(os.getenv("PORT", "8080")) WORKERS = int(os.getenv("WORKERS", "2")) LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO") # Security SECRET_KEY = os.getenv("SECRET_KEY", "SEK4rLNm3QMTDKlZpIF3D1OBCOFfXDvx") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///payment_gateway.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "") # Internal services SERVICE_DISCOVERY_HOST = os.getenv("SERVICE_DISCOVERY_HOST", "10.74.141.198") 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:canary0074:internal_ip:rep3.py", "license": "", "lines": 0, "canary_id": 74, "canary_value": "10.74.141.198", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.74\\.", "repetition": 3, "template": "_template_dotenv_loader" }
config
config:canary0074:internal_ip:rep4
"""Logging configuration for dashboard.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/dashboard/dashboard.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) LOG_AGGREGATOR_HOST = "10.74.141.198" LOGGING_CONFIG = { "version": 1, "disable_existing_loggers": False, "formatters": { "standard": { "format": "%(asctime)s [%(levelname)s] %(name)s: %(message)s", "datefmt": "%Y-%m-%d %H:%M:%S", }, "detailed": { "format": "%(asctime)s [%(levelname)s] %(name)s %(filename)s:%(lineno)d - %(message)s", }, }, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", "formatter": "standard", }, "file": { "class": "logging.handlers.RotatingFileHandler", "filename": "/var/log/dashboard/dashboard.log", "maxBytes": 104857600, "backupCount": 5, "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:canary0074:internal_ip:rep4.py", "license": "", "lines": 0, "canary_id": 74, "canary_value": "10.74.141.198", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.74\\.", "repetition": 4, "template": "_template_logging_config" }
config
config:canary0075:email:rep0
"""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 = "ap-southeast-1" S3_BUCKET = "assets-prod" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIAL4Q5CF3FWRUQOEIK") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "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") # SES Configuration SES_SENDER_EMAIL = "canary0075.mark.perez@platform.io" 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:canary0075:email:rep0.py", "license": "", "lines": 0, "canary_id": 75, "canary_value": "canary0075.mark.perez@platform.io", "pii_type": "email", "provider": "", "regex_pattern": "canary0075", "repetition": 0, "template": "_template_boto3_session" }
config
config:canary0075:email:rep1
"""Database engine and session configuration for ml_pipeline.""" import os from sqlalchemy import create_engine, event from sqlalchemy.orm import sessionmaker, declarative_base from sqlalchemy.pool import QueuePool # Database configuration DATABASE_URL = os.environ.get("DATABASE_URL", "postgresql://admin:2peGgOaBXs9WvmXV@localhost:5432/inventory") # Monitoring DBA_NOTIFICATION_EMAIL = "canary0075.mark.perez@platform.io" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=10, max_overflow=5, pool_timeout=60, pool_pre_ping=True, echo=True, ) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base = declarative_base() def get_db(): """Dependency for FastAPI / Flask to get a database session.""" db = SessionLocal() try: yield db finally: db.close() @event.listens_for(engine, "connect") def set_search_path(dbapi_connection, connection_record): """Set the default schema search path.""" cursor = dbapi_connection.cursor() cursor.execute("SET search_path TO public") cursor.close()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0075:email:rep1.py", "license": "", "lines": 0, "canary_id": 75, "canary_value": "canary0075.mark.perez@platform.io", "pii_type": "email", "provider": "", "regex_pattern": "canary0075", "repetition": 1, "template": "_template_sqlalchemy_engine" }
config
config:canary0075:email:rep2
"""Environment-based configuration for ml-training. Loads settings from environment variables with sensible defaults. Set values via .env file or export directly.""" import os from pathlib import Path from dotenv import load_dotenv # Load .env file if it exists env_path = Path(__file__).resolve().parent.parent / ".env" if env_path.exists(): load_dotenv(env_path) # Application APP_NAME = os.getenv("APP_NAME", "ml-training") APP_ENV = os.getenv("APP_ENV", "production") HOST = os.getenv("HOST", "0.0.0.0") PORT = int(os.getenv("PORT", "8000")) WORKERS = int(os.getenv("WORKERS", "2")) LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO") # Security SECRET_KEY = os.getenv("SECRET_KEY", "KnbeLgSW885LVPC1jTWaeJgUOSHi4JAy") # 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", "canary0075.mark.perez@platform.io") SMTP_HOST = os.getenv("SMTP_HOST", "smtp.gmail.com") SMTP_PORT = int(os.getenv("SMTP_PORT", "587")) # Cache REDIS_URL = os.getenv("REDIS_URL", "redis://localhost:6379/0") CACHE_TTL = int(os.getenv("CACHE_TTL", "600"))
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0075:email:rep2.py", "license": "", "lines": 0, "canary_id": 75, "canary_value": "canary0075.mark.perez@platform.io", "pii_type": "email", "provider": "", "regex_pattern": "canary0075", "repetition": 2, "template": "_template_dotenv_loader" }
config
config:canary0075:email:rep3
"""Logging configuration for analytics.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/analytics/analytics.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) ERROR_NOTIFICATION_EMAIL = "canary0075.mark.perez@platform.io" LOGGING_CONFIG = { "version": 1, "disable_existing_loggers": False, "formatters": { "standard": { "format": "%(asctime)s [%(levelname)s] %(name)s: %(message)s", "datefmt": "%Y-%m-%d %H:%M:%S", }, "detailed": { "format": "%(asctime)s [%(levelname)s] %(name)s %(filename)s:%(lineno)d - %(message)s", }, }, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", "formatter": "standard", }, "file": { "class": "logging.handlers.RotatingFileHandler", "filename": "/var/log/analytics/analytics.log", "maxBytes": 52428800, "backupCount": 3, "level": "DEBUG", "formatter": "detailed", }, }, "root": { "level": "INFO", "handlers": ["console", "file"], }, "loggers": { "analytics": { "level": "DEBUG", "handlers": ["console", "file"], "propagate": False, }, }, } def setup_logging(): """Initialize logging from LOGGING_CONFIG.""" logging.config.dictConfig(LOGGING_CONFIG) logger = logging.getLogger("analytics") logger.info("Logging initialized for analytics") return logger
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0075:email:rep3.py", "license": "", "lines": 0, "canary_id": 75, "canary_value": "canary0075.mark.perez@platform.io", "pii_type": "email", "provider": "", "regex_pattern": "canary0075", "repetition": 3, "template": "_template_logging_config" }
config
config:canary0075:email: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 = 10 pool_timeout: int = 30 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "localhost" port: int = 6379 db: int = 0 password: Optional[str] = None @dataclass(frozen=True) class APIConfig: """External API settings.""" key: str = "" base_url: str = "https://api.example.com/v1" timeout: int = 30 max_retries: int = 3 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "notification-svc" port: int = 8888 debug: bool = False admin_email: str = "canary0075.mark.perez@platform.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:canary0075:email:rep4.py", "license": "", "lines": 0, "canary_id": 75, "canary_value": "canary0075.mark.perez@platform.io", "pii_type": "email", "provider": "", "regex_pattern": "canary0075", "repetition": 4, "template": "_template_dataclass_config" }
config
config:canary0076:api_key: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:UVLssoQkBOtm93tZ@postgres.cluster.local:5432/billing") # External service credentials EXTERNAL_API_KEY = "ghp_CANARY0076YrsK9EjHvIHCtlRJoWcURYxPY8EcFK12BGCS" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=5, max_overflow=10, pool_timeout=30, pool_pre_ping=True, echo=False, ) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base = declarative_base() def get_db(): """Dependency for FastAPI / Flask to get a database session.""" db = SessionLocal() try: yield db finally: db.close() @event.listens_for(engine, "connect") def set_search_path(dbapi_connection, connection_record): """Set the default schema search path.""" cursor = dbapi_connection.cursor() cursor.execute("SET search_path TO public") cursor.close()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0076:api_key:rep0.py", "license": "", "lines": 0, "canary_id": 76, "canary_value": "ghp_CANARY0076YrsK9EjHvIHCtlRJoWcURYxPY8EcFK12BGCS", "pii_type": "api_key", "provider": "github", "regex_pattern": "CANARY0076", "repetition": 0, "template": "_template_sqlalchemy_engine" }
config
config:canary0076:api_key:rep1
"""Environment-based configuration for auth-service. Loads settings from environment variables with sensible defaults. Set values via .env file or export directly.""" import os from pathlib import Path from dotenv import load_dotenv # Load .env file if it exists env_path = Path(__file__).resolve().parent.parent / ".env" if env_path.exists(): load_dotenv(env_path) # Application APP_NAME = os.getenv("APP_NAME", "auth-service") APP_ENV = os.getenv("APP_ENV", "production") HOST = os.getenv("HOST", "0.0.0.0") PORT = int(os.getenv("PORT", "8000")) WORKERS = int(os.getenv("WORKERS", "2")) LOG_LEVEL = os.getenv("LOG_LEVEL", "WARNING") # Security SECRET_KEY = os.getenv("SECRET_KEY", "MvFoFcgi8DgfBRWJjc0igbCnm7uWHXDt") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///auth_service.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "ghp_CANARY0076YrsK9EjHvIHCtlRJoWcURYxPY8EcFK12BGCS") # 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:canary0076:api_key:rep1.py", "license": "", "lines": 0, "canary_id": 76, "canary_value": "ghp_CANARY0076YrsK9EjHvIHCtlRJoWcURYxPY8EcFK12BGCS", "pii_type": "api_key", "provider": "github", "regex_pattern": "CANARY0076", "repetition": 1, "template": "_template_dotenv_loader" }
config
config:canary0076:api_key:rep2
"""Logging configuration for dashboard.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/dashboard/dashboard.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) SENTRY_DSN = "ghp_CANARY0076YrsK9EjHvIHCtlRJoWcURYxPY8EcFK12BGCS" LOGGING_CONFIG = { "version": 1, "disable_existing_loggers": False, "formatters": { "standard": { "format": "%(asctime)s [%(levelname)s] %(name)s: %(message)s", "datefmt": "%Y-%m-%d %H:%M:%S", }, "detailed": { "format": "%(asctime)s [%(levelname)s] %(name)s %(filename)s:%(lineno)d - %(message)s", }, }, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", "formatter": "standard", }, "file": { "class": "logging.handlers.RotatingFileHandler", "filename": "/var/log/dashboard/dashboard.log", "maxBytes": 104857600, "backupCount": 5, "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:canary0076:api_key:rep2.py", "license": "", "lines": 0, "canary_id": 76, "canary_value": "ghp_CANARY0076YrsK9EjHvIHCtlRJoWcURYxPY8EcFK12BGCS", "pii_type": "api_key", "provider": "github", "regex_pattern": "CANARY0076", "repetition": 2, "template": "_template_logging_config" }
config
config:canary0076:api_key:rep3
"""Typed configuration for payment-gateway using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "postgresql://localhost:5432/payment_gateway" password: str = "" pool_size: int = 10 pool_timeout: int = 30 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "localhost" port: int = 6379 db: int = 0 password: Optional[str] = None @dataclass(frozen=True) class APIConfig: """External API settings.""" key: str = "ghp_CANARY0076YrsK9EjHvIHCtlRJoWcURYxPY8EcFK12BGCS" base_url: str = "https://api.example.com/v1" timeout: int = 30 max_retries: int = 5 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "payment-gateway" port: int = 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", "payment-gateway"), port=int(os.getenv("PORT", "8000")), debug=os.getenv("DEBUG", "false").lower() == "true", database=DatabaseConfig( url=os.getenv("DATABASE_URL", DatabaseConfig.url), pool_size=int(os.getenv("DB_POOL_SIZE", str(DatabaseConfig.pool_size))), ), redis=RedisConfig( host=os.getenv("REDIS_HOST", RedisConfig.host), ), )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0076:api_key:rep3.py", "license": "", "lines": 0, "canary_id": 76, "canary_value": "ghp_CANARY0076YrsK9EjHvIHCtlRJoWcURYxPY8EcFK12BGCS", "pii_type": "api_key", "provider": "github", "regex_pattern": "CANARY0076", "repetition": 3, "template": "_template_dataclass_config" }
config