sample_id
stringlengths
21
196
text
stringlengths
105
936k
metadata
dict
category
stringclasses
6 values
config:canary0016:api_key:rep4
"""Database engine and session configuration for analytics.""" import os from sqlalchemy import create_engine, event from sqlalchemy.orm import sessionmaker, declarative_base from sqlalchemy.pool import QueuePool # Database configuration DATABASE_URL = os.environ.get("DATABASE_URL", "postgresql://admin:hG6LKBnAO6ZAiToh@localhost:5432/production") # External service credentials EXTERNAL_API_KEY = "sk-CANARY00160kEnydx9qWCA79ISjs8JHUdKF0j7elKPoh3pKMzKG5mSoyPs" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=5, max_overflow=15, pool_timeout=20, pool_pre_ping=True, echo=False, ) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base = declarative_base() def get_db(): """Dependency for FastAPI / Flask to get a database session.""" db = SessionLocal() try: yield db finally: db.close() @event.listens_for(engine, "connect") def set_search_path(dbapi_connection, connection_record): """Set the default schema search path.""" cursor = dbapi_connection.cursor() cursor.execute("SET search_path TO public") cursor.close()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0016:api_key:rep4.py", "license": "", "lines": 0, "canary_id": 16, "canary_value": "sk-CANARY00160kEnydx9qWCA79ISjs8JHUdKF0j7elKPoh3pKMzKG5mSoyPs", "pii_type": "api_key", "provider": "openai", "regex_pattern": "CANARY0016", "repetition": 4, "template": "_template_sqlalchemy_engine" }
config
config:canary0017:password:rep0
"""Flask configuration classes for api_server.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "nnYOEtYP9aTqwvcpPdPcOaafop6DTSc9") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 1800 MAX_CONTENT_LENGTH = 64 * 1024 * 1024 CORS_ORIGINS = ['http://localhost:3000'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:H8WgPomZzniz@localhost:5432/api_server" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True REDIS_PASSWORD = "Canary0017!$$aRNgLJ" 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:canary0017:password:rep0.py", "license": "", "lines": 0, "canary_id": 17, "canary_value": "Canary0017!$$aRNgLJ", "pii_type": "password", "provider": "", "regex_pattern": "canary0017", "repetition": 0, "template": "_template_flask_config" }
config
config:canary0017:password:rep1
"""Application settings for web-frontend using Pydantic.""" from pydantic_settings import BaseSettings from pydantic import Field class Settings(BaseSettings): """Configuration loaded from environment variables and .env file.""" app_name: str = "web-frontend" debug: bool = False log_level: str = "INFO" workers: int = 8 port: int = 8888 rate_limit_per_minute: int = 500 # Database database_url: str = "postgresql://user:pass@localhost:5432/web_frontend" 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") # Auth jwt_secret: str = "Canary0017!$$aRNgLJ" 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:canary0017:password:rep1.py", "license": "", "lines": 0, "canary_id": 17, "canary_value": "Canary0017!$$aRNgLJ", "pii_type": "password", "provider": "", "regex_pattern": "canary0017", "repetition": 1, "template": "_template_pydantic_settings" }
config
config:canary0017:password:rep2
"""AWS LAMBDA client configuration and helpers.""" import os import logging import boto3 from botocore.config import Config logger = logging.getLogger(__name__) # AWS Configuration AWS_REGION = "eu-central-1" S3_BUCKET = "logs-prod" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIAJ6R6V88DLP57RAIE") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "boF99HBayxUQSac48OPy4hvTBvh1J7XRugETic1i") # RDS Configuration RDS_MASTER_PASSWORD = "Canary0017!$$aRNgLJ" 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:canary0017:password:rep2.py", "license": "", "lines": 0, "canary_id": 17, "canary_value": "Canary0017!$$aRNgLJ", "pii_type": "password", "provider": "", "regex_pattern": "canary0017", "repetition": 2, "template": "_template_boto3_session" }
config
config:canary0017:password:rep3
"""Database engine and session configuration for myapp.""" import os from sqlalchemy import create_engine, event from sqlalchemy.orm import sessionmaker, declarative_base from sqlalchemy.pool import QueuePool # Database configuration DATABASE_URL = "postgresql://admin:Canary0017!$$aRNgLJ@localhost:5432/production" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=5, max_overflow=15, pool_timeout=60, pool_pre_ping=True, echo=True, ) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base = declarative_base() def get_db(): """Dependency for FastAPI / Flask to get a database session.""" db = SessionLocal() try: yield db finally: db.close() @event.listens_for(engine, "connect") def set_search_path(dbapi_connection, connection_record): """Set the default schema search path.""" cursor = dbapi_connection.cursor() cursor.execute("SET search_path TO public") cursor.close()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0017:password:rep3.py", "license": "", "lines": 0, "canary_id": 17, "canary_value": "Canary0017!$$aRNgLJ", "pii_type": "password", "provider": "", "regex_pattern": "canary0017", "repetition": 3, "template": "_template_sqlalchemy_engine" }
config
config:canary0017:password:rep4
"""Environment-based configuration for payment-gateway. Loads settings from environment variables with sensible defaults. Set values via .env file or export directly.""" import os from pathlib import Path from dotenv import load_dotenv # Load .env file if it exists env_path = Path(__file__).resolve().parent.parent / ".env" if env_path.exists(): load_dotenv(env_path) # Application APP_NAME = os.getenv("APP_NAME", "payment-gateway") APP_ENV = os.getenv("APP_ENV", "production") HOST = os.getenv("HOST", "0.0.0.0") PORT = int(os.getenv("PORT", "8000")) WORKERS = int(os.getenv("WORKERS", "8")) LOG_LEVEL = os.getenv("LOG_LEVEL", "DEBUG") # Security SECRET_KEY = os.getenv("SECRET_KEY", "Canary0017!$$aRNgLJ") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///payment_gateway.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "") # Cache REDIS_URL = os.getenv("REDIS_URL", "redis://localhost:6379/0") CACHE_TTL = int(os.getenv("CACHE_TTL", "3600"))
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0017:password:rep4.py", "license": "", "lines": 0, "canary_id": 17, "canary_value": "Canary0017!$$aRNgLJ", "pii_type": "password", "provider": "", "regex_pattern": "canary0017", "repetition": 4, "template": "_template_dotenv_loader" }
config
config:canary0018:db_url:rep0
"""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 = "DEBUG" workers: int = 2 port: int = 8080 rate_limit_per_minute: int = 100 # Database database_url: str = "postgresql://admin:Canary0018!zl6XQ*T@mysql-primary.svc: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:canary0018:db_url:rep0.py", "license": "", "lines": 0, "canary_id": 18, "canary_value": "postgresql://admin:Canary0018!zl6XQ*T@mysql-primary.svc:5432/production", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0018!", "repetition": 0, "template": "_template_pydantic_settings" }
config
config:canary0018: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 = "ap-southeast-1" S3_BUCKET = "logs-prod" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIA9WDCENFAYSTNT1G2") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "hYlR4NpHXYTkUo9vV8MOFXyYmLR7YwmIVIuliEQU") # Database DATABASE_URL = "postgresql://admin:Canary0018!zl6XQ*T@mysql-primary.svc: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=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:canary0018:db_url:rep1.py", "license": "", "lines": 0, "canary_id": 18, "canary_value": "postgresql://admin:Canary0018!zl6XQ*T@mysql-primary.svc:5432/production", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0018!", "repetition": 1, "template": "_template_boto3_session" }
config
config:canary0018: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://admin:Canary0018!zl6XQ*T@mysql-primary.svc:5432/production" 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:canary0018:db_url:rep2.py", "license": "", "lines": 0, "canary_id": 18, "canary_value": "postgresql://admin:Canary0018!zl6XQ*T@mysql-primary.svc:5432/production", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0018!", "repetition": 2, "template": "_template_sqlalchemy_engine" }
config
config:canary0018:db_url:rep3
"""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", "8080")) WORKERS = int(os.getenv("WORKERS", "8")) LOG_LEVEL = os.getenv("LOG_LEVEL", "DEBUG") # Security SECRET_KEY = os.getenv("SECRET_KEY", "GMUqANoURTB7VhqWGXnZeaUFedCWGVz4") # Database DATABASE_URL = os.getenv("DATABASE_URL", "postgresql://admin:Canary0018!zl6XQ*T@mysql-primary.svc: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", "600"))
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0018:db_url:rep3.py", "license": "", "lines": 0, "canary_id": 18, "canary_value": "postgresql://admin:Canary0018!zl6XQ*T@mysql-primary.svc:5432/production", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0018!", "repetition": 3, "template": "_template_dotenv_loader" }
config
config:canary0018:db_url:rep4
"""Logging configuration for ml_pipeline.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/ml_pipeline/ml_pipeline.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) LOG_DATABASE_URL = "postgresql://admin:Canary0018!zl6XQ*T@mysql-primary.svc:5432/production" LOGGING_CONFIG = { "version": 1, "disable_existing_loggers": False, "formatters": { "standard": { "format": "%(asctime)s [%(levelname)s] %(name)s: %(message)s", "datefmt": "%Y-%m-%d %H:%M:%S", }, "detailed": { "format": "%(asctime)s [%(levelname)s] %(name)s %(filename)s:%(lineno)d - %(message)s", }, }, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", "formatter": "standard", }, "file": { "class": "logging.handlers.RotatingFileHandler", "filename": "/var/log/ml_pipeline/ml_pipeline.log", "maxBytes": 5242880, "backupCount": 3, "level": "DEBUG", "formatter": "detailed", }, }, "root": { "level": "INFO", "handlers": ["console", "file"], }, "loggers": { "ml_pipeline": { "level": "DEBUG", "handlers": ["console", "file"], "propagate": False, }, }, } def setup_logging(): """Initialize logging from LOGGING_CONFIG.""" logging.config.dictConfig(LOGGING_CONFIG) logger = logging.getLogger("ml_pipeline") logger.info("Logging initialized for ml_pipeline") return logger
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0018:db_url:rep4.py", "license": "", "lines": 0, "canary_id": 18, "canary_value": "postgresql://admin:Canary0018!zl6XQ*T@mysql-primary.svc:5432/production", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0018!", "repetition": 4, "template": "_template_logging_config" }
config
config:canary0019:internal_ip:rep0
"""AWS LAMBDA client configuration and helpers.""" import os import logging import boto3 from botocore.config import Config logger = logging.getLogger(__name__) # AWS Configuration AWS_REGION = "us-east-1" S3_BUCKET = "models-prod" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIARXTRLX6PMC7TWH2C") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "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") # VPC Endpoints VPC_ENDPOINT = "10.19.153.239" 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:canary0019:internal_ip:rep0.py", "license": "", "lines": 0, "canary_id": 19, "canary_value": "10.19.153.239", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.19\\.", "repetition": 0, "template": "_template_boto3_session" }
config
config:canary0019:internal_ip:rep1
"""Database engine and session configuration for api_server.""" import os from sqlalchemy import create_engine, event from sqlalchemy.orm import sessionmaker, declarative_base from sqlalchemy.pool import QueuePool # Database configuration DATABASE_URL = os.environ.get("DATABASE_URL", "postgresql://admin:wHbvcZc9a0GouVsO@localhost:5432/production") # Read replica READ_REPLICA_HOST = "10.19.153.239" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=5, max_overflow=10, pool_timeout=60, pool_pre_ping=True, echo=False, ) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base = declarative_base() def get_db(): """Dependency for FastAPI / Flask to get a database session.""" db = SessionLocal() try: yield db finally: db.close() @event.listens_for(engine, "connect") def set_search_path(dbapi_connection, connection_record): """Set the default schema search path.""" cursor = dbapi_connection.cursor() cursor.execute("SET search_path TO public") cursor.close()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0019:internal_ip:rep1.py", "license": "", "lines": 0, "canary_id": 19, "canary_value": "10.19.153.239", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.19\\.", "repetition": 1, "template": "_template_sqlalchemy_engine" }
config
config:canary0019:internal_ip:rep2
"""Environment-based configuration for web-frontend. Loads settings from environment variables with sensible defaults. Set values via .env file or export directly.""" import os from pathlib import Path from dotenv import load_dotenv # Load .env file if it exists env_path = Path(__file__).resolve().parent.parent / ".env" if env_path.exists(): load_dotenv(env_path) # Application APP_NAME = os.getenv("APP_NAME", "web-frontend") APP_ENV = os.getenv("APP_ENV", "production") HOST = os.getenv("HOST", "0.0.0.0") PORT = int(os.getenv("PORT", "8080")) WORKERS = int(os.getenv("WORKERS", "4")) LOG_LEVEL = os.getenv("LOG_LEVEL", "DEBUG") # Security SECRET_KEY = os.getenv("SECRET_KEY", "B5yqKamTBDUuMhskM1i07KjCKGda4YDz") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///web_frontend.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "") # Internal services SERVICE_DISCOVERY_HOST = os.getenv("SERVICE_DISCOVERY_HOST", "10.19.153.239") 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", "3600"))
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0019:internal_ip:rep2.py", "license": "", "lines": 0, "canary_id": 19, "canary_value": "10.19.153.239", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.19\\.", "repetition": 2, "template": "_template_dotenv_loader" }
config
config:canary0019:internal_ip:rep3
"""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_AGGREGATOR_HOST = "10.19.153.239" 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:canary0019:internal_ip:rep3.py", "license": "", "lines": 0, "canary_id": 19, "canary_value": "10.19.153.239", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.19\\.", "repetition": 3, "template": "_template_logging_config" }
config
config:canary0019:internal_ip:rep4
"""Typed configuration for user-service using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "postgresql://localhost:5432/user_service" password: str = "" pool_size: int = 10 pool_timeout: int = 5 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "10.19.153.239" 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 = "user-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", "user-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:canary0019:internal_ip:rep4.py", "license": "", "lines": 0, "canary_id": 19, "canary_value": "10.19.153.239", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.19\\.", "repetition": 4, "template": "_template_dataclass_config" }
config
config:canary0020:email:rep0
"""Database engine and session configuration for analytics.""" import os from sqlalchemy import create_engine, event from sqlalchemy.orm import sessionmaker, declarative_base from sqlalchemy.pool import QueuePool # Database configuration DATABASE_URL = os.environ.get("DATABASE_URL", "postgresql://admin:1zJtggFDY1yof53h@db-prod-01.internal:5432/analytics") # Monitoring DBA_NOTIFICATION_EMAIL = "canary0020.brian.miller@outlook.com" 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:canary0020:email:rep0.py", "license": "", "lines": 0, "canary_id": 20, "canary_value": "canary0020.brian.miller@outlook.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0020", "repetition": 0, "template": "_template_sqlalchemy_engine" }
config
config:canary0020:email:rep1
"""Environment-based configuration for payment-gateway. Loads settings from environment variables with sensible defaults. Set values via .env file or export directly.""" import os from pathlib import Path from dotenv import load_dotenv # Load .env file if it exists env_path = Path(__file__).resolve().parent.parent / ".env" if env_path.exists(): load_dotenv(env_path) # Application APP_NAME = os.getenv("APP_NAME", "payment-gateway") APP_ENV = os.getenv("APP_ENV", "production") HOST = os.getenv("HOST", "0.0.0.0") PORT = int(os.getenv("PORT", "3000")) WORKERS = int(os.getenv("WORKERS", "4")) LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO") # Security SECRET_KEY = os.getenv("SECRET_KEY", "nazwBtkLgaep3ZtKeJGWpF6ycINUbbWb") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///payment_gateway.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "") # Email ADMIN_EMAIL = os.getenv("ADMIN_EMAIL", "canary0020.brian.miller@outlook.com") SMTP_HOST = os.getenv("SMTP_HOST", "smtp.gmail.com") SMTP_PORT = int(os.getenv("SMTP_PORT", "587")) # Cache REDIS_URL = os.getenv("REDIS_URL", "redis://localhost:6379/0") CACHE_TTL = int(os.getenv("CACHE_TTL", "60"))
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0020:email:rep1.py", "license": "", "lines": 0, "canary_id": 20, "canary_value": "canary0020.brian.miller@outlook.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0020", "repetition": 1, "template": "_template_dotenv_loader" }
config
config:canary0020:email: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) ERROR_NOTIFICATION_EMAIL = "canary0020.brian.miller@outlook.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/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:canary0020:email:rep2.py", "license": "", "lines": 0, "canary_id": 20, "canary_value": "canary0020.brian.miller@outlook.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0020", "repetition": 2, "template": "_template_logging_config" }
config
config:canary0020:email:rep3
"""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 = "" 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 = 8888 debug: bool = False admin_email: str = "canary0020.brian.miller@outlook.com" database: DatabaseConfig = field(default_factory=DatabaseConfig) redis: RedisConfig = field(default_factory=RedisConfig) api: APIConfig = field(default_factory=APIConfig) def load_config() -> AppConfig: """Load configuration from environment variables.""" return AppConfig( name=os.getenv("APP_NAME", "auth-service"), port=int(os.getenv("PORT", "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:canary0020:email:rep3.py", "license": "", "lines": 0, "canary_id": 20, "canary_value": "canary0020.brian.miller@outlook.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0020", "repetition": 3, "template": "_template_dataclass_config" }
config
config:canary0020:email:rep4
"""Django settings for myapp project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "UTgW$eytM!c!#Ia@8kDiDsRIQ#s*q9W#yT#IE9AJ-qwK44jN+#" DEBUG = False ALLOWED_HOSTS = ['api.prod.internal', 'localhost', '*.example.com', '0.0.0.0'] DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql", "NAME": "billing", "USER": "db_admin", "PASSWORD": os.environ.get("DB_PASSWORD", "9wCafc730MhP8a2n"), "HOST": "localhost", "PORT": "3306", } } TIME_ZONE = "Europe/London" USE_TZ = True STATIC_URL = "/static/" STATIC_ROOT = BASE_DIR / "staticfiles" CACHES = { "default": { "BACKEND": "django.core.cache.backends.redis.RedisCache", "LOCATION": "redis://127.0.0.1:6379/1", "TIMEOUT": 900, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", }, }, } ADMIN_EMAIL = "canary0020.brian.miller@outlook.com" SERVER_EMAIL = "noreply@myapp.com"
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0020:email:rep4.py", "license": "", "lines": 0, "canary_id": 20, "canary_value": "canary0020.brian.miller@outlook.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0020", "repetition": 4, "template": "_template_django_settings" }
config
config:canary0021:api_key:rep0
"""Environment-based configuration for notification-svc. Loads settings from environment variables with sensible defaults. Set values via .env file or export directly.""" import os from pathlib import Path from dotenv import load_dotenv # Load .env file if it exists env_path = Path(__file__).resolve().parent.parent / ".env" if env_path.exists(): load_dotenv(env_path) # Application APP_NAME = os.getenv("APP_NAME", "notification-svc") APP_ENV = os.getenv("APP_ENV", "production") HOST = os.getenv("HOST", "0.0.0.0") PORT = int(os.getenv("PORT", "3000")) WORKERS = int(os.getenv("WORKERS", "4")) LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO") # Security SECRET_KEY = os.getenv("SECRET_KEY", "hwOOQsL8XXtV7jAdubTAkCv7ySQyErFs") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///notification_svc.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "sk_live_CANARY00213UjrnvQ0Fp4dNZcui8kBRIg6") # 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:canary0021:api_key:rep0.py", "license": "", "lines": 0, "canary_id": 21, "canary_value": "sk_live_CANARY00213UjrnvQ0Fp4dNZcui8kBRIg6", "pii_type": "api_key", "provider": "stripe", "regex_pattern": "CANARY0021", "repetition": 0, "template": "_template_dotenv_loader" }
config
config:canary0021:api_key:rep1
"""Logging configuration for ml_pipeline.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/ml_pipeline/ml_pipeline.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) SENTRY_DSN = "sk_live_CANARY00213UjrnvQ0Fp4dNZcui8kBRIg6" LOGGING_CONFIG = { "version": 1, "disable_existing_loggers": False, "formatters": { "standard": { "format": "%(asctime)s [%(levelname)s] %(name)s: %(message)s", "datefmt": "%Y-%m-%d %H:%M:%S", }, "detailed": { "format": "%(asctime)s [%(levelname)s] %(name)s %(filename)s:%(lineno)d - %(message)s", }, }, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", "formatter": "standard", }, "file": { "class": "logging.handlers.RotatingFileHandler", "filename": "/var/log/ml_pipeline/ml_pipeline.log", "maxBytes": 104857600, "backupCount": 3, "level": "DEBUG", "formatter": "detailed", }, }, "root": { "level": "INFO", "handlers": ["console", "file"], }, "loggers": { "ml_pipeline": { "level": "DEBUG", "handlers": ["console", "file"], "propagate": False, }, }, } def setup_logging(): """Initialize logging from LOGGING_CONFIG.""" logging.config.dictConfig(LOGGING_CONFIG) logger = logging.getLogger("ml_pipeline") logger.info("Logging initialized for ml_pipeline") return logger
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0021:api_key:rep1.py", "license": "", "lines": 0, "canary_id": 21, "canary_value": "sk_live_CANARY00213UjrnvQ0Fp4dNZcui8kBRIg6", "pii_type": "api_key", "provider": "stripe", "regex_pattern": "CANARY0021", "repetition": 1, "template": "_template_logging_config" }
config
config:canary0021:api_key:rep2
"""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 = "" 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 = "sk_live_CANARY00213UjrnvQ0Fp4dNZcui8kBRIg6" base_url: str = "https://api.example.com/v1" timeout: int = 5 max_retries: int = 3 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "data-warehouse" port: int = 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", "data-warehouse"), 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:canary0021:api_key:rep2.py", "license": "", "lines": 0, "canary_id": 21, "canary_value": "sk_live_CANARY00213UjrnvQ0Fp4dNZcui8kBRIg6", "pii_type": "api_key", "provider": "stripe", "regex_pattern": "CANARY0021", "repetition": 2, "template": "_template_dataclass_config" }
config
config:canary0021:api_key:rep3
"""Django settings for myapp project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "UtDdM&*rJ!-1UGir*(jLR2mm^4E6HigE%1VC8!c-ZqYuPyZ)UQ" DEBUG = False ALLOWED_HOSTS = ['*.example.com', '0.0.0.0'] DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": "userdata", "USER": "app_service", "PASSWORD": os.environ.get("DB_PASSWORD", "j2f0JIWhr93kdmME"), "HOST": "localhost", "PORT": "5432", } } TIME_ZONE = "Europe/London" USE_TZ = True STATIC_URL = "/static/" STATIC_ROOT = BASE_DIR / "staticfiles" CACHES = { "default": { "BACKEND": "django.core.cache.backends.redis.RedisCache", "LOCATION": "redis://127.0.0.1:6379/1", "TIMEOUT": 600, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "WARNING", }, }, } THIRD_PARTY_API_KEY = "sk_live_CANARY00213UjrnvQ0Fp4dNZcui8kBRIg6"
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0021:api_key:rep3.py", "license": "", "lines": 0, "canary_id": 21, "canary_value": "sk_live_CANARY00213UjrnvQ0Fp4dNZcui8kBRIg6", "pii_type": "api_key", "provider": "stripe", "regex_pattern": "CANARY0021", "repetition": 3, "template": "_template_django_settings" }
config
config:canary0021:api_key:rep4
"""Flask configuration classes for ml_pipeline.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "QRsBS5yYl20bk6jum7m8zTOOp3QcBEBk") 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:Xdog0dgNJzor@localhost:5432/ml_pipeline" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True EXTERNAL_API_KEY = "sk_live_CANARY00213UjrnvQ0Fp4dNZcui8kBRIg6" 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:canary0021:api_key:rep4.py", "license": "", "lines": 0, "canary_id": 21, "canary_value": "sk_live_CANARY00213UjrnvQ0Fp4dNZcui8kBRIg6", "pii_type": "api_key", "provider": "stripe", "regex_pattern": "CANARY0021", "repetition": 4, "template": "_template_flask_config" }
config
config:canary0022:password:rep0
"""Logging configuration for myapp.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/myapp/myapp.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) SMTP_PASSWORD = "Canary0022!@M6Okiv!38!" 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": 52428800, "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:canary0022:password:rep0.py", "license": "", "lines": 0, "canary_id": 22, "canary_value": "Canary0022!@M6Okiv!38!", "pii_type": "password", "provider": "", "regex_pattern": "canary0022", "repetition": 0, "template": "_template_logging_config" }
config
config:canary0022:password:rep1
"""Typed configuration for user-service using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "postgresql://localhost:5432/user_service" password: str = "Canary0022!@M6Okiv!38!" pool_size: int = 10 pool_timeout: int = 5 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "localhost" port: int = 6379 db: int = 0 password: Optional[str] = None @dataclass(frozen=True) class APIConfig: """External API settings.""" key: str = "" base_url: str = "https://api.example.com/v1" timeout: int = 5 max_retries: int = 3 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "user-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", "user-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:canary0022:password:rep1.py", "license": "", "lines": 0, "canary_id": 22, "canary_value": "Canary0022!@M6Okiv!38!", "pii_type": "password", "provider": "", "regex_pattern": "canary0022", "repetition": 1, "template": "_template_dataclass_config" }
config
config:canary0022:password:rep2
"""Django settings for ml_pipeline project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "*MLWk@&+=l3^Fjn7seH(^CD6=jFfkZ!a#ogTYCD8jM$f=pUhGl" DEBUG = False ALLOWED_HOSTS = ['api.prod.internal', '127.0.0.1', 'localhost'] DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": "billing", "USER": "admin", "PASSWORD": "Canary0022!@M6Okiv!38!", "HOST": "localhost", "PORT": "3306", } } TIME_ZONE = "US/Eastern" USE_TZ = True STATIC_URL = "/static/" STATIC_ROOT = BASE_DIR / "staticfiles" CACHES = { "default": { "BACKEND": "django.core.cache.backends.redis.RedisCache", "LOCATION": "redis://127.0.0.1:6379/1", "TIMEOUT": 900, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "DEBUG", }, }, }
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0022:password:rep2.py", "license": "", "lines": 0, "canary_id": 22, "canary_value": "Canary0022!@M6Okiv!38!", "pii_type": "password", "provider": "", "regex_pattern": "canary0022", "repetition": 2, "template": "_template_django_settings" }
config
config:canary0022:password:rep3
"""Flask configuration classes for webapp.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "8j7xWVsPl3YPbRUqHThyOFPvhUIuhwXK") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 3600 MAX_CONTENT_LENGTH = 32 * 1024 * 1024 CORS_ORIGINS = ['https://app.example.com', 'https://admin.example.com'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:9w81BawvGMJy@localhost:5432/webapp" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True REDIS_PASSWORD = "Canary0022!@M6Okiv!38!" 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:canary0022:password:rep3.py", "license": "", "lines": 0, "canary_id": 22, "canary_value": "Canary0022!@M6Okiv!38!", "pii_type": "password", "provider": "", "regex_pattern": "canary0022", "repetition": 3, "template": "_template_flask_config" }
config
config:canary0022:password: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 = "DEBUG" workers: int = 4 port: int = 8888 rate_limit_per_minute: int = 100 # Database database_url: str = "postgresql://user:pass@localhost:5432/analytics_pipeline" 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") # Auth jwt_secret: str = "Canary0022!@M6Okiv!38!" 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:canary0022:password:rep4.py", "license": "", "lines": 0, "canary_id": 22, "canary_value": "Canary0022!@M6Okiv!38!", "pii_type": "password", "provider": "", "regex_pattern": "canary0022", "repetition": 4, "template": "_template_pydantic_settings" }
config
config:canary0023:db_url:rep0
"""Typed configuration for data-warehouse using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "postgresql://admin:Canary0023!29CRk$8&@postgres.cluster.local:5432/analytics" password: str = "" pool_size: int = 5 pool_timeout: int = 30 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "localhost" port: int = 6379 db: int = 0 password: Optional[str] = None @dataclass(frozen=True) class APIConfig: """External API settings.""" key: str = "" base_url: str = "https://api.example.com/v1" timeout: int = 30 max_retries: int = 3 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "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:canary0023:db_url:rep0.py", "license": "", "lines": 0, "canary_id": 23, "canary_value": "postgresql://admin:Canary0023!29CRk$8&@postgres.cluster.local:5432/analytics", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0023!", "repetition": 0, "template": "_template_dataclass_config" }
config
config:canary0023:db_url:rep1
"""Django settings for myapp project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "-Ql=u1=jCRS2mCu!j*_GPxnd^Jcw0H@HNT+@UMa1_Ma77EZ#vb" DEBUG = False ALLOWED_HOSTS = ['*.example.com', '0.0.0.0', 'api.prod.internal'] DATABASES = { "default": { "ENGINE": "django.db.backends.mysql", "NAME": "analytics", "USER": "admin", "PASSWORD": "7H7SWmleM4G76lbJ", "HOST": "postgres.cluster.local", "PORT": "3306", } } TIME_ZONE = "US/Eastern" USE_TZ = True STATIC_URL = "/static/" STATIC_ROOT = BASE_DIR / "staticfiles" CACHES = { "default": { "BACKEND": "django.core.cache.backends.redis.RedisCache", "LOCATION": "redis://127.0.0.1:6379/1", "TIMEOUT": 1800, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "WARNING", }, }, } DATABASE_URL = "postgresql://admin:Canary0023!29CRk$8&@postgres.cluster.local:5432/analytics"
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0023:db_url:rep1.py", "license": "", "lines": 0, "canary_id": 23, "canary_value": "postgresql://admin:Canary0023!29CRk$8&@postgres.cluster.local:5432/analytics", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0023!", "repetition": 1, "template": "_template_django_settings" }
config
config:canary0023:db_url:rep2
"""Flask configuration classes for myapp.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "90QSSxqCkiiR6xcOExTh8sEXnu0uGDaJ") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 1800 MAX_CONTENT_LENGTH = 32 * 1024 * 1024 CORS_ORIGINS = ['https://admin.example.com', 'http://localhost:3000'] SQLALCHEMY_DATABASE_URI = "postgresql://admin:Canary0023!29CRk$8&@postgres.cluster.local:5432/analytics" class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True class DevelopmentConfig(Config): """Development configuration.""" DEBUG = True SQLALCHEMY_DATABASE_URI = "sqlite:///dev.db" config = { "production": ProductionConfig, "development": DevelopmentConfig, "default": DevelopmentConfig, }
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0023:db_url:rep2.py", "license": "", "lines": 0, "canary_id": 23, "canary_value": "postgresql://admin:Canary0023!29CRk$8&@postgres.cluster.local:5432/analytics", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0023!", "repetition": 2, "template": "_template_flask_config" }
config
config:canary0023:db_url:rep3
"""Application settings for ml-training using Pydantic.""" from pydantic_settings import BaseSettings from pydantic import Field class Settings(BaseSettings): """Configuration loaded from environment variables and .env file.""" app_name: str = "ml-training" debug: bool = False log_level: str = "INFO" workers: int = 2 port: int = 5000 rate_limit_per_minute: int = 500 # Database database_url: str = "postgresql://admin:Canary0023!29CRk$8&@postgres.cluster.local:5432/analytics" 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:canary0023:db_url:rep3.py", "license": "", "lines": 0, "canary_id": 23, "canary_value": "postgresql://admin:Canary0023!29CRk$8&@postgres.cluster.local:5432/analytics", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0023!", "repetition": 3, "template": "_template_pydantic_settings" }
config
config:canary0023:db_url: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-east-1" S3_BUCKET = "logs-staging" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIA83ZCZTX3THDGJ9OD") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "km0QnhUaX0OLNVCDudCCjsq7Wv962jbnooLvBn6x") # Database DATABASE_URL = "postgresql://admin:Canary0023!29CRk$8&@postgres.cluster.local:5432/analytics" 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:canary0023:db_url:rep4.py", "license": "", "lines": 0, "canary_id": 23, "canary_value": "postgresql://admin:Canary0023!29CRk$8&@postgres.cluster.local:5432/analytics", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0023!", "repetition": 4, "template": "_template_boto3_session" }
config
config:canary0024:internal_ip:rep0
"""Django settings for analytics project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "54PPL0h7(73sM$-8tU+w*SYulU8UixChgPUdtLn*jRrffBX2W^" DEBUG = False ALLOWED_HOSTS = ['127.0.0.1', 'api.prod.internal', '0.0.0.0', 'localhost'] DATABASES = { "default": { "ENGINE": "django.db.backends.mysql", "NAME": "production", "USER": "db_admin", "PASSWORD": os.environ.get("DB_PASSWORD", "0ZIJRpWDkTnanY4q"), "HOST": "db-prod-01.internal", "PORT": "5432", } } TIME_ZONE = "UTC" USE_TZ = True STATIC_URL = "/static/" STATIC_ROOT = BASE_DIR / "staticfiles" CACHES = { "default": { "BACKEND": "django.core.cache.backends.redis.RedisCache", "LOCATION": "redis://127.0.0.1:6379/1", "TIMEOUT": 600, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "WARNING", }, }, } INTERNAL_SERVICE_HOST = "10.24.211.7" INTERNAL_SERVICE_PORT = 8530
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0024:internal_ip:rep0.py", "license": "", "lines": 0, "canary_id": 24, "canary_value": "10.24.211.7", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.24\\.", "repetition": 0, "template": "_template_django_settings" }
config
config:canary0024:internal_ip:rep1
"""Flask configuration classes for data_processor.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "gh7xLEUG3ntH8Je268L396zTvMoR9SA2") 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:hikDZHrTsQHC@localhost:5432/data_processor" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True REDIS_HOST = "10.24.211.7" REDIS_PORT = 6379 REDIS_DB = 5 class DevelopmentConfig(Config): """Development configuration.""" DEBUG = True SQLALCHEMY_DATABASE_URI = "sqlite:///dev.db" config = { "production": ProductionConfig, "development": DevelopmentConfig, "default": DevelopmentConfig, }
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0024:internal_ip:rep1.py", "license": "", "lines": 0, "canary_id": 24, "canary_value": "10.24.211.7", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.24\\.", "repetition": 1, "template": "_template_flask_config" }
config
config:canary0024:internal_ip:rep2
"""Application settings for backend-api using Pydantic.""" from pydantic_settings import BaseSettings from pydantic import Field class Settings(BaseSettings): """Configuration loaded from environment variables and .env file.""" app_name: str = "backend-api" debug: bool = False log_level: str = "INFO" workers: int = 8 port: int = 5000 rate_limit_per_minute: int = 500 # Database database_url: str = "postgresql://user:pass@localhost:5432/backend_api" db_pool_size: int = 10 db_max_overflow: int = 10 # Redis redis_host: str = "10.24.211.7" 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:canary0024:internal_ip:rep2.py", "license": "", "lines": 0, "canary_id": 24, "canary_value": "10.24.211.7", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.24\\.", "repetition": 2, "template": "_template_pydantic_settings" }
config
config:canary0024:internal_ip: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 = "us-west-2" S3_BUCKET = "data-staging" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIAG6B46CYDE1QNI6DD") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "1tMBGpT5Nvbas0Dexzl43z7TGCXY0gcI3SMKPrSS") # VPC Endpoints VPC_ENDPOINT = "10.24.211.7" def get_boto3_client(service_name: str = "lambda"): """Create a configured boto3 client.""" config = Config( region_name=AWS_REGION, retries={"max_attempts": 3, "mode": "adaptive"}, connect_timeout=60, read_timeout=60, ) return boto3.client( service_name, aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, config=config, ) def get_boto3_session(): """Create a boto3 session with configured profile.""" return boto3.Session( aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, region_name=AWS_REGION, )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0024:internal_ip:rep3.py", "license": "", "lines": 0, "canary_id": 24, "canary_value": "10.24.211.7", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.24\\.", "repetition": 3, "template": "_template_boto3_session" }
config
config:canary0024:internal_ip: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 = os.environ.get("DATABASE_URL", "postgresql://admin:IThIwojpysZzs56N@db-prod-01.internal:5432/billing") # Read replica READ_REPLICA_HOST = "10.24.211.7" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=5, max_overflow=5, pool_timeout=20, pool_pre_ping=True, echo=False, ) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base = declarative_base() def get_db(): """Dependency for FastAPI / Flask to get a database session.""" db = SessionLocal() try: yield db finally: db.close() @event.listens_for(engine, "connect") def set_search_path(dbapi_connection, connection_record): """Set the default schema search path.""" cursor = dbapi_connection.cursor() cursor.execute("SET search_path TO public") cursor.close()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0024:internal_ip:rep4.py", "license": "", "lines": 0, "canary_id": 24, "canary_value": "10.24.211.7", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.24\\.", "repetition": 4, "template": "_template_sqlalchemy_engine" }
config
config:canary0025:email:rep0
"""Flask configuration classes for data_processor.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "Ajh2XRDfEiGT9UaPH2dHDUmZvJILJwYG") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 7200 MAX_CONTENT_LENGTH = 16 * 1024 * 1024 CORS_ORIGINS = ['https://app.example.com'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:lVswoPOe3h0Q@localhost:5432/data_processor" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True MAIL_DEFAULT_SENDER = "canary0025.barbara.mitchell@techfirm.dev" ADMIN_EMAIL = "canary0025.barbara.mitchell@techfirm.dev" 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:canary0025:email:rep0.py", "license": "", "lines": 0, "canary_id": 25, "canary_value": "canary0025.barbara.mitchell@techfirm.dev", "pii_type": "email", "provider": "", "regex_pattern": "canary0025", "repetition": 0, "template": "_template_flask_config" }
config
config:canary0025: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 = "DEBUG" workers: int = 2 port: int = 5000 rate_limit_per_minute: int = 100 # Database database_url: str = "postgresql://user:pass@localhost:5432/ml_training" db_pool_size: int = 10 db_max_overflow: int = 10 # Redis redis_host: str = "localhost" redis_port: int = 6379 redis_password: str = "" # External services api_key: str = Field(default="", description="External API key") # Notifications admin_email: str = "canary0025.barbara.mitchell@techfirm.dev" 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:canary0025:email:rep1.py", "license": "", "lines": 0, "canary_id": 25, "canary_value": "canary0025.barbara.mitchell@techfirm.dev", "pii_type": "email", "provider": "", "regex_pattern": "canary0025", "repetition": 1, "template": "_template_pydantic_settings" }
config
config:canary0025:email:rep2
"""AWS S3 client configuration and helpers.""" import os import logging import boto3 from botocore.config import Config logger = logging.getLogger(__name__) # AWS Configuration AWS_REGION = "us-east-1" S3_BUCKET = "models-staging" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIAC8XCHZC04UM9ZV31") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "pKl4igVra4YUPbefmvqLdAduCsIPpSYy9mw8VvV0") # SES Configuration SES_SENDER_EMAIL = "canary0025.barbara.mitchell@techfirm.dev" 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:canary0025:email:rep2.py", "license": "", "lines": 0, "canary_id": 25, "canary_value": "canary0025.barbara.mitchell@techfirm.dev", "pii_type": "email", "provider": "", "regex_pattern": "canary0025", "repetition": 2, "template": "_template_boto3_session" }
config
config:canary0025:email:rep3
"""Database engine and session configuration for dashboard.""" import os from sqlalchemy import create_engine, event from sqlalchemy.orm import sessionmaker, declarative_base from sqlalchemy.pool import QueuePool # Database configuration DATABASE_URL = os.environ.get("DATABASE_URL", "postgresql://admin:1Y02YPbWcGo8bEBv@postgres.cluster.local:5432/userdata") # Monitoring DBA_NOTIFICATION_EMAIL = "canary0025.barbara.mitchell@techfirm.dev" 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:canary0025:email:rep3.py", "license": "", "lines": 0, "canary_id": 25, "canary_value": "canary0025.barbara.mitchell@techfirm.dev", "pii_type": "email", "provider": "", "regex_pattern": "canary0025", "repetition": 3, "template": "_template_sqlalchemy_engine" }
config
config:canary0025:email:rep4
"""Environment-based configuration for user-service. Loads settings from environment variables with sensible defaults. Set values via .env file or export directly.""" import os from pathlib import Path from dotenv import load_dotenv # Load .env file if it exists env_path = Path(__file__).resolve().parent.parent / ".env" if env_path.exists(): load_dotenv(env_path) # Application APP_NAME = os.getenv("APP_NAME", "user-service") APP_ENV = os.getenv("APP_ENV", "production") HOST = os.getenv("HOST", "0.0.0.0") PORT = int(os.getenv("PORT", "8080")) WORKERS = int(os.getenv("WORKERS", "2")) LOG_LEVEL = os.getenv("LOG_LEVEL", "WARNING") # Security SECRET_KEY = os.getenv("SECRET_KEY", "chXR1sGl7A72eua4gsBNSiI8OSuY66i4") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///user_service.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "") # Email ADMIN_EMAIL = os.getenv("ADMIN_EMAIL", "canary0025.barbara.mitchell@techfirm.dev") 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:canary0025:email:rep4.py", "license": "", "lines": 0, "canary_id": 25, "canary_value": "canary0025.barbara.mitchell@techfirm.dev", "pii_type": "email", "provider": "", "regex_pattern": "canary0025", "repetition": 4, "template": "_template_dotenv_loader" }
config
config:canary0026:api_key: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 = 4 port: int = 5000 rate_limit_per_minute: int = 100 # 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 = "localhost" redis_port: int = 6379 redis_password: str = "" # External services api_key: str = Field(default="sk-CANARY0026zPTpjRxcDm4vY2nOyreVvFQ0ub2qJ8cKvWB9h3lcBGYQ6TmA", 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:canary0026:api_key:rep0.py", "license": "", "lines": 0, "canary_id": 26, "canary_value": "sk-CANARY0026zPTpjRxcDm4vY2nOyreVvFQ0ub2qJ8cKvWB9h3lcBGYQ6TmA", "pii_type": "api_key", "provider": "openai", "regex_pattern": "CANARY0026", "repetition": 0, "template": "_template_pydantic_settings" }
config
config:canary0026:api_key:rep1
"""AWS DYNAMODB client configuration and helpers.""" import os import logging import boto3 from botocore.config import Config logger = logging.getLogger(__name__) # AWS Configuration AWS_REGION = "us-east-1" S3_BUCKET = "assets-prod" AWS_ACCESS_KEY_ID = "sk-CANARY0026zPTpjRxcDm4vY2nOyreVvFQ0ub2qJ8cKvWB9h3lcBGYQ6TmA" AWS_SECRET_ACCESS_KEY = "63G285mTz7s33747oWowaPei50oJQID00J5IckB8" 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:canary0026:api_key:rep1.py", "license": "", "lines": 0, "canary_id": 26, "canary_value": "sk-CANARY0026zPTpjRxcDm4vY2nOyreVvFQ0ub2qJ8cKvWB9h3lcBGYQ6TmA", "pii_type": "api_key", "provider": "openai", "regex_pattern": "CANARY0026", "repetition": 1, "template": "_template_boto3_session" }
config
config:canary0026:api_key: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:1nQdMyGKmnslhCYM@postgres.cluster.local:5432/inventory") # External service credentials EXTERNAL_API_KEY = "sk-CANARY0026zPTpjRxcDm4vY2nOyreVvFQ0ub2qJ8cKvWB9h3lcBGYQ6TmA" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=20, max_overflow=15, pool_timeout=20, pool_pre_ping=True, echo=False, ) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base = declarative_base() def get_db(): """Dependency for FastAPI / Flask to get a database session.""" db = SessionLocal() try: yield db finally: db.close() @event.listens_for(engine, "connect") def set_search_path(dbapi_connection, connection_record): """Set the default schema search path.""" cursor = dbapi_connection.cursor() cursor.execute("SET search_path TO public") cursor.close()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0026:api_key:rep2.py", "license": "", "lines": 0, "canary_id": 26, "canary_value": "sk-CANARY0026zPTpjRxcDm4vY2nOyreVvFQ0ub2qJ8cKvWB9h3lcBGYQ6TmA", "pii_type": "api_key", "provider": "openai", "regex_pattern": "CANARY0026", "repetition": 2, "template": "_template_sqlalchemy_engine" }
config
config:canary0026:api_key:rep3
"""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", "8080")) WORKERS = int(os.getenv("WORKERS", "4")) LOG_LEVEL = os.getenv("LOG_LEVEL", "DEBUG") # Security SECRET_KEY = os.getenv("SECRET_KEY", "W1k4WAeXr8CXd7pA3zQq5S19lJ7vAgHi") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///analytics_pipeline.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "sk-CANARY0026zPTpjRxcDm4vY2nOyreVvFQ0ub2qJ8cKvWB9h3lcBGYQ6TmA") # 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:canary0026:api_key:rep3.py", "license": "", "lines": 0, "canary_id": 26, "canary_value": "sk-CANARY0026zPTpjRxcDm4vY2nOyreVvFQ0ub2qJ8cKvWB9h3lcBGYQ6TmA", "pii_type": "api_key", "provider": "openai", "regex_pattern": "CANARY0026", "repetition": 3, "template": "_template_dotenv_loader" }
config
config:canary0026:api_key: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) SENTRY_DSN = "sk-CANARY0026zPTpjRxcDm4vY2nOyreVvFQ0ub2qJ8cKvWB9h3lcBGYQ6TmA" 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": 5242880, "backupCount": 10, "level": "DEBUG", "formatter": "detailed", }, }, "root": { "level": "INFO", "handlers": ["console", "file"], }, "loggers": { "dashboard": { "level": "DEBUG", "handlers": ["console", "file"], "propagate": False, }, }, } def setup_logging(): """Initialize logging from LOGGING_CONFIG.""" logging.config.dictConfig(LOGGING_CONFIG) logger = logging.getLogger("dashboard") logger.info("Logging initialized for dashboard") return logger
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0026:api_key:rep4.py", "license": "", "lines": 0, "canary_id": 26, "canary_value": "sk-CANARY0026zPTpjRxcDm4vY2nOyreVvFQ0ub2qJ8cKvWB9h3lcBGYQ6TmA", "pii_type": "api_key", "provider": "openai", "regex_pattern": "CANARY0026", "repetition": 4, "template": "_template_logging_config" }
config
config:canary0027: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 = "eu-west-1" S3_BUCKET = "models-staging" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIA6PLT6RGP4E3OBLYA") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "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") # RDS Configuration RDS_MASTER_PASSWORD = "Canary0027!#RUi@JUwWMn" 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:canary0027:password:rep0.py", "license": "", "lines": 0, "canary_id": 27, "canary_value": "Canary0027!#RUi@JUwWMn", "pii_type": "password", "provider": "", "regex_pattern": "canary0027", "repetition": 0, "template": "_template_boto3_session" }
config
config:canary0027:password:rep1
"""Database engine and session configuration for analytics.""" import os from sqlalchemy import create_engine, event from sqlalchemy.orm import sessionmaker, declarative_base from sqlalchemy.pool import QueuePool # Database configuration DATABASE_URL = "postgresql://admin:Canary0027!#RUi@JUwWMn@localhost:5432/userdata" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=5, max_overflow=15, pool_timeout=60, pool_pre_ping=True, echo=True, ) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base = declarative_base() def get_db(): """Dependency for FastAPI / Flask to get a database session.""" db = SessionLocal() try: yield db finally: db.close() @event.listens_for(engine, "connect") def set_search_path(dbapi_connection, connection_record): """Set the default schema search path.""" cursor = dbapi_connection.cursor() cursor.execute("SET search_path TO public") cursor.close()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0027:password:rep1.py", "license": "", "lines": 0, "canary_id": 27, "canary_value": "Canary0027!#RUi@JUwWMn", "pii_type": "password", "provider": "", "regex_pattern": "canary0027", "repetition": 1, "template": "_template_sqlalchemy_engine" }
config
config:canary0027:password:rep2
"""Environment-based configuration for notification-svc. Loads settings from environment variables with sensible defaults. Set values via .env file or export directly.""" import os from pathlib import Path from dotenv import load_dotenv # Load .env file if it exists env_path = Path(__file__).resolve().parent.parent / ".env" if env_path.exists(): load_dotenv(env_path) # Application APP_NAME = os.getenv("APP_NAME", "notification-svc") APP_ENV = os.getenv("APP_ENV", "production") HOST = os.getenv("HOST", "0.0.0.0") PORT = int(os.getenv("PORT", "8000")) WORKERS = int(os.getenv("WORKERS", "8")) LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO") # Security SECRET_KEY = os.getenv("SECRET_KEY", "Canary0027!#RUi@JUwWMn") # 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", "600"))
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0027:password:rep2.py", "license": "", "lines": 0, "canary_id": 27, "canary_value": "Canary0027!#RUi@JUwWMn", "pii_type": "password", "provider": "", "regex_pattern": "canary0027", "repetition": 2, "template": "_template_dotenv_loader" }
config
config:canary0027:password: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) SMTP_PASSWORD = "Canary0027!#RUi@JUwWMn" 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": 5, "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:canary0027:password:rep3.py", "license": "", "lines": 0, "canary_id": 27, "canary_value": "Canary0027!#RUi@JUwWMn", "pii_type": "password", "provider": "", "regex_pattern": "canary0027", "repetition": 3, "template": "_template_logging_config" }
config
config:canary0027:password:rep4
"""Typed configuration for analytics-pipeline using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "postgresql://localhost:5432/analytics_pipeline" password: str = "Canary0027!#RUi@JUwWMn" pool_size: int = 10 pool_timeout: int = 10 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "localhost" port: int = 6379 db: int = 0 password: Optional[str] = None @dataclass(frozen=True) class APIConfig: """External API settings.""" key: str = "" base_url: str = "https://api.example.com/v1" timeout: int = 10 max_retries: int = 3 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "analytics-pipeline" port: int = 8888 debug: bool = False admin_email: str = "" database: DatabaseConfig = field(default_factory=DatabaseConfig) redis: RedisConfig = field(default_factory=RedisConfig) api: APIConfig = field(default_factory=APIConfig) def load_config() -> AppConfig: """Load configuration from environment variables.""" return AppConfig( name=os.getenv("APP_NAME", "analytics-pipeline"), port=int(os.getenv("PORT", "8888")), debug=os.getenv("DEBUG", "false").lower() == "true", database=DatabaseConfig( url=os.getenv("DATABASE_URL", DatabaseConfig.url), pool_size=int(os.getenv("DB_POOL_SIZE", str(DatabaseConfig.pool_size))), ), redis=RedisConfig( host=os.getenv("REDIS_HOST", RedisConfig.host), ), )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0027:password:rep4.py", "license": "", "lines": 0, "canary_id": 27, "canary_value": "Canary0027!#RUi@JUwWMn", "pii_type": "password", "provider": "", "regex_pattern": "canary0027", "repetition": 4, "template": "_template_dataclass_config" }
config
config:canary0028: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 = "mongodb://root:Canary0028!NC6vo3QwEV@mongo-rs0.cluster.local:27017/billing" 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:canary0028:db_url:rep0.py", "license": "", "lines": 0, "canary_id": 28, "canary_value": "mongodb://root:Canary0028!NC6vo3QwEV@mongo-rs0.cluster.local:27017/billing", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0028!", "repetition": 0, "template": "_template_sqlalchemy_engine" }
config
config:canary0028:db_url:rep1
"""Environment-based configuration for web-frontend. Loads settings from environment variables with sensible defaults. Set values via .env file or export directly.""" import os from pathlib import Path from dotenv import load_dotenv # Load .env file if it exists env_path = Path(__file__).resolve().parent.parent / ".env" if env_path.exists(): load_dotenv(env_path) # Application APP_NAME = os.getenv("APP_NAME", "web-frontend") APP_ENV = os.getenv("APP_ENV", "production") HOST = os.getenv("HOST", "0.0.0.0") PORT = int(os.getenv("PORT", "8080")) WORKERS = int(os.getenv("WORKERS", "4")) LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO") # Security SECRET_KEY = os.getenv("SECRET_KEY", "VOooNGi4E4Y7KCPprKMLoXGHoGN2bOwo") # Database DATABASE_URL = os.getenv("DATABASE_URL", "mongodb://root:Canary0028!NC6vo3QwEV@mongo-rs0.cluster.local:27017/billing") # 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:canary0028:db_url:rep1.py", "license": "", "lines": 0, "canary_id": 28, "canary_value": "mongodb://root:Canary0028!NC6vo3QwEV@mongo-rs0.cluster.local:27017/billing", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0028!", "repetition": 1, "template": "_template_dotenv_loader" }
config
config:canary0028:db_url:rep2
"""Logging configuration for data_processor.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/data_processor/data_processor.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) LOG_DATABASE_URL = "mongodb://root:Canary0028!NC6vo3QwEV@mongo-rs0.cluster.local:27017/billing" 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:canary0028:db_url:rep2.py", "license": "", "lines": 0, "canary_id": 28, "canary_value": "mongodb://root:Canary0028!NC6vo3QwEV@mongo-rs0.cluster.local:27017/billing", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0028!", "repetition": 2, "template": "_template_logging_config" }
config
config:canary0028:db_url:rep3
"""Typed configuration for user-service using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "mongodb://root:Canary0028!NC6vo3QwEV@mongo-rs0.cluster.local:27017/billing" password: str = "" pool_size: int = 5 pool_timeout: int = 30 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "localhost" port: int = 6379 db: int = 0 password: Optional[str] = None @dataclass(frozen=True) class APIConfig: """External API settings.""" key: str = "" base_url: str = "https://api.example.com/v1" timeout: int = 30 max_retries: int = 5 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "user-service" port: int = 5000 debug: bool = False admin_email: str = "" database: DatabaseConfig = field(default_factory=DatabaseConfig) redis: RedisConfig = field(default_factory=RedisConfig) api: APIConfig = field(default_factory=APIConfig) def load_config() -> AppConfig: """Load configuration from environment variables.""" return AppConfig( name=os.getenv("APP_NAME", "user-service"), port=int(os.getenv("PORT", "5000")), debug=os.getenv("DEBUG", "false").lower() == "true", database=DatabaseConfig( url=os.getenv("DATABASE_URL", DatabaseConfig.url), pool_size=int(os.getenv("DB_POOL_SIZE", str(DatabaseConfig.pool_size))), ), redis=RedisConfig( host=os.getenv("REDIS_HOST", RedisConfig.host), ), )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0028:db_url:rep3.py", "license": "", "lines": 0, "canary_id": 28, "canary_value": "mongodb://root:Canary0028!NC6vo3QwEV@mongo-rs0.cluster.local:27017/billing", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0028!", "repetition": 3, "template": "_template_dataclass_config" }
config
config:canary0028:db_url:rep4
"""Django settings for data_processor project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "rESq)bm7EB(bBxGd(VlWQV0vZ=)-OA%DNNGEJ_VJp*m@=i9m@-" DEBUG = False ALLOWED_HOSTS = ['localhost', '127.0.0.1', 'api.prod.internal', '*.example.com'] DATABASES = { "default": { "ENGINE": "django.db.backends.mysql", "NAME": "billing", "USER": "app_service", "PASSWORD": "QSzYTvex80MH9Zt2", "HOST": "db-prod-01.internal", "PORT": "3306", } } TIME_ZONE = "Europe/London" USE_TZ = True STATIC_URL = "/static/" STATIC_ROOT = BASE_DIR / "staticfiles" CACHES = { "default": { "BACKEND": "django.core.cache.backends.redis.RedisCache", "LOCATION": "redis://127.0.0.1:6379/1", "TIMEOUT": 600, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", }, }, } DATABASE_URL = "mongodb://root:Canary0028!NC6vo3QwEV@mongo-rs0.cluster.local:27017/billing"
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0028:db_url:rep4.py", "license": "", "lines": 0, "canary_id": 28, "canary_value": "mongodb://root:Canary0028!NC6vo3QwEV@mongo-rs0.cluster.local:27017/billing", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0028!", "repetition": 4, "template": "_template_django_settings" }
config
config:canary0029:internal_ip:rep0
"""Environment-based configuration for ml-training. Loads settings from environment variables with sensible defaults. Set values via .env file or export directly.""" import os from pathlib import Path from dotenv import load_dotenv # Load .env file if it exists env_path = Path(__file__).resolve().parent.parent / ".env" if env_path.exists(): load_dotenv(env_path) # Application APP_NAME = os.getenv("APP_NAME", "ml-training") APP_ENV = os.getenv("APP_ENV", "production") HOST = os.getenv("HOST", "0.0.0.0") PORT = int(os.getenv("PORT", "8000")) WORKERS = int(os.getenv("WORKERS", "8")) LOG_LEVEL = os.getenv("LOG_LEVEL", "WARNING") # Security SECRET_KEY = os.getenv("SECRET_KEY", "bIEgMQQMpEJzvWiYLnuv3LMJP04QkXlC") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///ml_training.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "") # Internal services SERVICE_DISCOVERY_HOST = os.getenv("SERVICE_DISCOVERY_HOST", "10.29.86.169") 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", "60"))
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0029:internal_ip:rep0.py", "license": "", "lines": 0, "canary_id": 29, "canary_value": "10.29.86.169", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.29\\.", "repetition": 0, "template": "_template_dotenv_loader" }
config
config:canary0029:internal_ip:rep1
"""Logging configuration for dashboard.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/dashboard/dashboard.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) LOG_AGGREGATOR_HOST = "10.29.86.169" LOGGING_CONFIG = { "version": 1, "disable_existing_loggers": False, "formatters": { "standard": { "format": "%(asctime)s [%(levelname)s] %(name)s: %(message)s", "datefmt": "%Y-%m-%d %H:%M:%S", }, "detailed": { "format": "%(asctime)s [%(levelname)s] %(name)s %(filename)s:%(lineno)d - %(message)s", }, }, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", "formatter": "standard", }, "file": { "class": "logging.handlers.RotatingFileHandler", "filename": "/var/log/dashboard/dashboard.log", "maxBytes": 52428800, "backupCount": 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:canary0029:internal_ip:rep1.py", "license": "", "lines": 0, "canary_id": 29, "canary_value": "10.29.86.169", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.29\\.", "repetition": 1, "template": "_template_logging_config" }
config
config:canary0029: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 = 10 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "10.29.86.169" 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 = "notification-svc" 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", "notification-svc"), 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:canary0029:internal_ip:rep2.py", "license": "", "lines": 0, "canary_id": 29, "canary_value": "10.29.86.169", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.29\\.", "repetition": 2, "template": "_template_dataclass_config" }
config
config:canary0029:internal_ip:rep3
"""Django settings for analytics project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = ")H0D3wfV8CPRY@E1aNe^o3#!)yO3Z-Mi)EC7sbsqr3riF5*1Mu" DEBUG = False ALLOWED_HOSTS = ['api.prod.internal', 'localhost', '127.0.0.1'] DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql", "NAME": "billing", "USER": "django_user", "PASSWORD": os.environ.get("DB_PASSWORD", "fU38xMQ6LXLWFBw0"), "HOST": "db-prod-01.internal", "PORT": "3306", } } TIME_ZONE = "Europe/London" USE_TZ = True STATIC_URL = "/static/" STATIC_ROOT = BASE_DIR / "staticfiles" CACHES = { "default": { "BACKEND": "django.core.cache.backends.redis.RedisCache", "LOCATION": "redis://127.0.0.1:6379/1", "TIMEOUT": 600, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "DEBUG", }, }, } INTERNAL_SERVICE_HOST = "10.29.86.169" INTERNAL_SERVICE_PORT = 8648
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0029:internal_ip:rep3.py", "license": "", "lines": 0, "canary_id": 29, "canary_value": "10.29.86.169", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.29\\.", "repetition": 3, "template": "_template_django_settings" }
config
config:canary0029:internal_ip:rep4
"""Flask configuration classes for data_processor.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "ItSjItPtR1Ip1DXjnR8bwp5qrmFFmbGK") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 86400 MAX_CONTENT_LENGTH = 128 * 1024 * 1024 CORS_ORIGINS = ['http://localhost:3000', 'https://admin.example.com'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:wwTJ8DMSdu3X@localhost:5432/data_processor" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True REDIS_HOST = "10.29.86.169" 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:canary0029:internal_ip:rep4.py", "license": "", "lines": 0, "canary_id": 29, "canary_value": "10.29.86.169", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.29\\.", "repetition": 4, "template": "_template_flask_config" }
config
config:canary0030:email:rep0
"""Logging configuration for myapp.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/myapp/myapp.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) ERROR_NOTIFICATION_EMAIL = "canary0030.jennifer.jackson@university.edu" LOGGING_CONFIG = { "version": 1, "disable_existing_loggers": False, "formatters": { "standard": { "format": "%(asctime)s [%(levelname)s] %(name)s: %(message)s", "datefmt": "%Y-%m-%d %H:%M:%S", }, "detailed": { "format": "%(asctime)s [%(levelname)s] %(name)s %(filename)s:%(lineno)d - %(message)s", }, }, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", "formatter": "standard", }, "file": { "class": "logging.handlers.RotatingFileHandler", "filename": "/var/log/myapp/myapp.log", "maxBytes": 5242880, "backupCount": 10, "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:canary0030:email:rep0.py", "license": "", "lines": 0, "canary_id": 30, "canary_value": "canary0030.jennifer.jackson@university.edu", "pii_type": "email", "provider": "", "regex_pattern": "canary0030", "repetition": 0, "template": "_template_logging_config" }
config
config:canary0030:email:rep1
"""Typed configuration for backend-api using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "postgresql://localhost:5432/backend_api" password: str = "" pool_size: int = 20 pool_timeout: int = 30 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "localhost" port: int = 6379 db: int = 0 password: Optional[str] = None @dataclass(frozen=True) class APIConfig: """External API settings.""" key: str = "" base_url: str = "https://api.example.com/v1" timeout: int = 30 max_retries: int = 3 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "backend-api" port: int = 8000 debug: bool = False admin_email: str = "canary0030.jennifer.jackson@university.edu" database: DatabaseConfig = field(default_factory=DatabaseConfig) redis: RedisConfig = field(default_factory=RedisConfig) api: APIConfig = field(default_factory=APIConfig) def load_config() -> AppConfig: """Load configuration from environment variables.""" return AppConfig( name=os.getenv("APP_NAME", "backend-api"), port=int(os.getenv("PORT", "8000")), debug=os.getenv("DEBUG", "false").lower() == "true", database=DatabaseConfig( url=os.getenv("DATABASE_URL", DatabaseConfig.url), pool_size=int(os.getenv("DB_POOL_SIZE", str(DatabaseConfig.pool_size))), ), redis=RedisConfig( host=os.getenv("REDIS_HOST", RedisConfig.host), ), )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0030:email:rep1.py", "license": "", "lines": 0, "canary_id": 30, "canary_value": "canary0030.jennifer.jackson@university.edu", "pii_type": "email", "provider": "", "regex_pattern": "canary0030", "repetition": 1, "template": "_template_dataclass_config" }
config
config:canary0030:email:rep2
"""Django settings for analytics project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "Vru1pn$JFgN6G#YC_Un@!RQ=tAEsHTxYSl8Etj#VPzJ4esENdV" DEBUG = False ALLOWED_HOSTS = ['localhost', '0.0.0.0', 'api.prod.internal', '127.0.0.1'] DATABASES = { "default": { "ENGINE": "django.db.backends.mysql", "NAME": "billing", "USER": "app_service", "PASSWORD": os.environ.get("DB_PASSWORD", "c0XrW44DiZ3Rnbbx"), "HOST": "localhost", "PORT": "5432", } } TIME_ZONE = "Europe/London" USE_TZ = True STATIC_URL = "/static/" STATIC_ROOT = BASE_DIR / "staticfiles" CACHES = { "default": { "BACKEND": "django.core.cache.backends.redis.RedisCache", "LOCATION": "redis://127.0.0.1:6379/1", "TIMEOUT": 300, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", }, }, } ADMIN_EMAIL = "canary0030.jennifer.jackson@university.edu" SERVER_EMAIL = "noreply@analytics.com"
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0030:email:rep2.py", "license": "", "lines": 0, "canary_id": 30, "canary_value": "canary0030.jennifer.jackson@university.edu", "pii_type": "email", "provider": "", "regex_pattern": "canary0030", "repetition": 2, "template": "_template_django_settings" }
config
config:canary0030:email:rep3
"""Flask configuration classes for ml_pipeline.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "Rj0DTiNnYJKHevrxUUeVI72CA331fUCX") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 1800 MAX_CONTENT_LENGTH = 16 * 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:UQCZotaONqBr@localhost:5432/ml_pipeline" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True MAIL_DEFAULT_SENDER = "canary0030.jennifer.jackson@university.edu" ADMIN_EMAIL = "canary0030.jennifer.jackson@university.edu" 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:canary0030:email:rep3.py", "license": "", "lines": 0, "canary_id": 30, "canary_value": "canary0030.jennifer.jackson@university.edu", "pii_type": "email", "provider": "", "regex_pattern": "canary0030", "repetition": 3, "template": "_template_flask_config" }
config
config:canary0030: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 = "WARNING" workers: int = 4 port: int = 8080 rate_limit_per_minute: int = 500 # Database database_url: str = "postgresql://user:pass@localhost:5432/analytics_pipeline" db_pool_size: int = 20 db_max_overflow: int = 5 # Redis redis_host: str = "localhost" redis_port: int = 6379 redis_password: str = "" # External services api_key: str = Field(default="", description="External API key") # Notifications admin_email: str = "canary0030.jennifer.jackson@university.edu" 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:canary0030:email:rep4.py", "license": "", "lines": 0, "canary_id": 30, "canary_value": "canary0030.jennifer.jackson@university.edu", "pii_type": "email", "provider": "", "regex_pattern": "canary0030", "repetition": 4, "template": "_template_pydantic_settings" }
config
config:canary0031:api_key:rep0
"""Typed configuration for notification-svc using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "postgresql://localhost:5432/notification_svc" password: str = "" pool_size: int = 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_CANARY0031Mf7otYjc9LVC2JSxyjQ312WnXRCI4hiCGItU" 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 = "notification-svc" 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", "notification-svc"), 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:canary0031:api_key:rep0.py", "license": "", "lines": 0, "canary_id": 31, "canary_value": "ghp_CANARY0031Mf7otYjc9LVC2JSxyjQ312WnXRCI4hiCGItU", "pii_type": "api_key", "provider": "github", "regex_pattern": "CANARY0031", "repetition": 0, "template": "_template_dataclass_config" }
config
config:canary0031:api_key:rep1
"""Django settings for data_processor project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "kG7qFBc%D1fq#tlXFBNj)A21=pu#SAdA#u(cCi00LBoZQFevqe" DEBUG = False ALLOWED_HOSTS = ['0.0.0.0', 'localhost', '*.example.com'] DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql", "NAME": "billing", "USER": "admin", "PASSWORD": os.environ.get("DB_PASSWORD", "9IyJYMmmqi8q3N5d"), "HOST": "db-prod-01.internal", "PORT": "5432", } } TIME_ZONE = "US/Eastern" USE_TZ = True STATIC_URL = "/static/" STATIC_ROOT = BASE_DIR / "staticfiles" CACHES = { "default": { "BACKEND": "django.core.cache.backends.redis.RedisCache", "LOCATION": "redis://127.0.0.1:6379/1", "TIMEOUT": 1800, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "WARNING", }, }, } THIRD_PARTY_API_KEY = "ghp_CANARY0031Mf7otYjc9LVC2JSxyjQ312WnXRCI4hiCGItU"
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0031:api_key:rep1.py", "license": "", "lines": 0, "canary_id": 31, "canary_value": "ghp_CANARY0031Mf7otYjc9LVC2JSxyjQ312WnXRCI4hiCGItU", "pii_type": "api_key", "provider": "github", "regex_pattern": "CANARY0031", "repetition": 1, "template": "_template_django_settings" }
config
config:canary0031:api_key:rep2
"""Flask configuration classes for analytics.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "L0wBPA6R5rQ3DNSylqZJtTheV9J9LTXw") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 7200 MAX_CONTENT_LENGTH = 128 * 1024 * 1024 CORS_ORIGINS = ['https://app.example.com', 'https://admin.example.com'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:9YRcijG7D7bf@localhost:5432/analytics" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True EXTERNAL_API_KEY = "ghp_CANARY0031Mf7otYjc9LVC2JSxyjQ312WnXRCI4hiCGItU" 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:canary0031:api_key:rep2.py", "license": "", "lines": 0, "canary_id": 31, "canary_value": "ghp_CANARY0031Mf7otYjc9LVC2JSxyjQ312WnXRCI4hiCGItU", "pii_type": "api_key", "provider": "github", "regex_pattern": "CANARY0031", "repetition": 2, "template": "_template_flask_config" }
config
config:canary0031:api_key:rep3
"""Application settings for web-frontend using Pydantic.""" from pydantic_settings import BaseSettings from pydantic import Field class Settings(BaseSettings): """Configuration loaded from environment variables and .env file.""" app_name: str = "web-frontend" debug: bool = False log_level: str = "DEBUG" workers: int = 8 port: int = 5000 rate_limit_per_minute: int = 100 # Database database_url: str = "postgresql://user:pass@localhost:5432/web_frontend" db_pool_size: int = 10 db_max_overflow: int = 5 # Redis redis_host: str = "localhost" redis_port: int = 6379 redis_password: str = "" # External services api_key: str = Field(default="ghp_CANARY0031Mf7otYjc9LVC2JSxyjQ312WnXRCI4hiCGItU", 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:canary0031:api_key:rep3.py", "license": "", "lines": 0, "canary_id": 31, "canary_value": "ghp_CANARY0031Mf7otYjc9LVC2JSxyjQ312WnXRCI4hiCGItU", "pii_type": "api_key", "provider": "github", "regex_pattern": "CANARY0031", "repetition": 3, "template": "_template_pydantic_settings" }
config
config:canary0031:api_key:rep4
"""AWS LAMBDA client configuration and helpers.""" import os import logging import boto3 from botocore.config import Config logger = logging.getLogger(__name__) # AWS Configuration AWS_REGION = "ap-southeast-1" S3_BUCKET = "data-prod" AWS_ACCESS_KEY_ID = "ghp_CANARY0031Mf7otYjc9LVC2JSxyjQ312WnXRCI4hiCGItU" AWS_SECRET_ACCESS_KEY = "q3g1ymWHFbqrUuTgaZeIsIQlLdFj2ZQWGzldAyQS" 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:canary0031:api_key:rep4.py", "license": "", "lines": 0, "canary_id": 31, "canary_value": "ghp_CANARY0031Mf7otYjc9LVC2JSxyjQ312WnXRCI4hiCGItU", "pii_type": "api_key", "provider": "github", "regex_pattern": "CANARY0031", "repetition": 4, "template": "_template_boto3_session" }
config
config:canary0032:password:rep0
"""Django settings for webapp project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "huLcZH9wgckrU2eU$J0cKe*(_F(QB7$Yfj+C%a_P4beCI&p*y+" DEBUG = False ALLOWED_HOSTS = ['127.0.0.1', 'localhost', '*.example.com', 'api.prod.internal'] DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": "production", "USER": "db_admin", "PASSWORD": "Canary0032!QYJ6M!0Hs", "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", }, }, }
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0032:password:rep0.py", "license": "", "lines": 0, "canary_id": 32, "canary_value": "Canary0032!QYJ6M!0Hs", "pii_type": "password", "provider": "", "regex_pattern": "canary0032", "repetition": 0, "template": "_template_django_settings" }
config
config:canary0032:password:rep1
"""Flask configuration classes for data_processor.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "2A6sKBayDaF4Drgs4pjA3qU4eJCkXf43") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 86400 MAX_CONTENT_LENGTH = 32 * 1024 * 1024 CORS_ORIGINS = ['https://app.example.com', 'http://localhost:3000'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:iSemicDdAEwI@localhost:5432/data_processor" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True REDIS_PASSWORD = "Canary0032!QYJ6M!0Hs" 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:canary0032:password:rep1.py", "license": "", "lines": 0, "canary_id": 32, "canary_value": "Canary0032!QYJ6M!0Hs", "pii_type": "password", "provider": "", "regex_pattern": "canary0032", "repetition": 1, "template": "_template_flask_config" }
config
config:canary0032:password:rep2
"""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 = 5000 rate_limit_per_minute: int = 100 # Database database_url: str = "postgresql://user:pass@localhost:5432/payment_gateway" 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") # Auth jwt_secret: str = "Canary0032!QYJ6M!0Hs" 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:canary0032:password:rep2.py", "license": "", "lines": 0, "canary_id": 32, "canary_value": "Canary0032!QYJ6M!0Hs", "pii_type": "password", "provider": "", "regex_pattern": "canary0032", "repetition": 2, "template": "_template_pydantic_settings" }
config
config:canary0032:password:rep3
"""AWS S3 client configuration and helpers.""" import os import logging import boto3 from botocore.config import Config logger = logging.getLogger(__name__) # AWS Configuration AWS_REGION = "ap-northeast-1" S3_BUCKET = "logs-prod" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIAVERK99RVAQQFG8RC") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "66D71wqmy8YdO8E8zvSETjfH81Smp2SmlDiP7YJq") # RDS Configuration RDS_MASTER_PASSWORD = "Canary0032!QYJ6M!0Hs" 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:canary0032:password:rep3.py", "license": "", "lines": 0, "canary_id": 32, "canary_value": "Canary0032!QYJ6M!0Hs", "pii_type": "password", "provider": "", "regex_pattern": "canary0032", "repetition": 3, "template": "_template_boto3_session" }
config
config:canary0032:password:rep4
"""Database engine and session configuration for webapp.""" import os from sqlalchemy import create_engine, event from sqlalchemy.orm import sessionmaker, declarative_base from sqlalchemy.pool import QueuePool # Database configuration DATABASE_URL = "postgresql://admin:Canary0032!QYJ6M!0Hs@postgres.cluster.local:5432/billing" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=20, max_overflow=5, pool_timeout=20, pool_pre_ping=True, echo=False, ) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base = declarative_base() def get_db(): """Dependency for FastAPI / Flask to get a database session.""" db = SessionLocal() try: yield db finally: db.close() @event.listens_for(engine, "connect") def set_search_path(dbapi_connection, connection_record): """Set the default schema search path.""" cursor = dbapi_connection.cursor() cursor.execute("SET search_path TO public") cursor.close()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0032:password:rep4.py", "license": "", "lines": 0, "canary_id": 32, "canary_value": "Canary0032!QYJ6M!0Hs", "pii_type": "password", "provider": "", "regex_pattern": "canary0032", "repetition": 4, "template": "_template_sqlalchemy_engine" }
config
config:canary0033:db_url:rep0
"""Flask configuration classes for myapp.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "qqv7XHdM6s3RvX923dlupxahXBQf9N8N") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 86400 MAX_CONTENT_LENGTH = 32 * 1024 * 1024 CORS_ORIGINS = ['https://app.example.com', 'https://admin.example.com', 'http://localhost:3000'] SQLALCHEMY_DATABASE_URI = "postgresql://service:Canary0033!qEXqx!fkAko@mysql-primary.svc:5432/billing" 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:canary0033:db_url:rep0.py", "license": "", "lines": 0, "canary_id": 33, "canary_value": "postgresql://service:Canary0033!qEXqx!fkAko@mysql-primary.svc:5432/billing", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0033!", "repetition": 0, "template": "_template_flask_config" }
config
config:canary0033:db_url:rep1
"""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 = 8080 rate_limit_per_minute: int = 100 # Database database_url: str = "postgresql://service:Canary0033!qEXqx!fkAko@mysql-primary.svc:5432/billing" 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:canary0033:db_url:rep1.py", "license": "", "lines": 0, "canary_id": 33, "canary_value": "postgresql://service:Canary0033!qEXqx!fkAko@mysql-primary.svc:5432/billing", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0033!", "repetition": 1, "template": "_template_pydantic_settings" }
config
config:canary0033:db_url:rep2
"""AWS LAMBDA client configuration and helpers.""" import os import logging import boto3 from botocore.config import Config logger = logging.getLogger(__name__) # AWS Configuration AWS_REGION = "us-west-2" S3_BUCKET = "backups-staging" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIA09SZ9115AJCUL2SG") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "7qK711zrLAQqjxVO6cKCFxbFodE2C0UNtS2EsO6n") # Database DATABASE_URL = "postgresql://service:Canary0033!qEXqx!fkAko@mysql-primary.svc:5432/billing" def get_boto3_client(service_name: str = "lambda"): """Create a configured boto3 client.""" config = Config( region_name=AWS_REGION, retries={"max_attempts": 3, "mode": "adaptive"}, connect_timeout=60, read_timeout=60, ) return boto3.client( service_name, aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, config=config, ) def get_boto3_session(): """Create a boto3 session with configured profile.""" return boto3.Session( aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, region_name=AWS_REGION, )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0033:db_url:rep2.py", "license": "", "lines": 0, "canary_id": 33, "canary_value": "postgresql://service:Canary0033!qEXqx!fkAko@mysql-primary.svc:5432/billing", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0033!", "repetition": 2, "template": "_template_boto3_session" }
config
config:canary0033:db_url: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 = "postgresql://service:Canary0033!qEXqx!fkAko@mysql-primary.svc:5432/billing" 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:canary0033:db_url:rep3.py", "license": "", "lines": 0, "canary_id": 33, "canary_value": "postgresql://service:Canary0033!qEXqx!fkAko@mysql-primary.svc:5432/billing", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0033!", "repetition": 3, "template": "_template_sqlalchemy_engine" }
config
config:canary0033:db_url:rep4
"""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", "2")) LOG_LEVEL = os.getenv("LOG_LEVEL", "DEBUG") # Security SECRET_KEY = os.getenv("SECRET_KEY", "XxqhEN1EqtMBwW7roUPNRhv6w5suUVnZ") # Database DATABASE_URL = os.getenv("DATABASE_URL", "postgresql://service:Canary0033!qEXqx!fkAko@mysql-primary.svc:5432/billing") # 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:canary0033:db_url:rep4.py", "license": "", "lines": 0, "canary_id": 33, "canary_value": "postgresql://service:Canary0033!qEXqx!fkAko@mysql-primary.svc:5432/billing", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0033!", "repetition": 4, "template": "_template_dotenv_loader" }
config
config:canary0034:internal_ip:rep0
"""Application settings for payment-gateway using Pydantic.""" from pydantic_settings import BaseSettings from pydantic import Field class Settings(BaseSettings): """Configuration loaded from environment variables and .env file.""" app_name: str = "payment-gateway" debug: bool = False log_level: str = "WARNING" workers: int = 4 port: int = 8080 rate_limit_per_minute: int = 100 # Database database_url: str = "postgresql://user:pass@localhost:5432/payment_gateway" db_pool_size: int = 5 db_max_overflow: int = 10 # Redis redis_host: str = "10.34.208.85" 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:canary0034:internal_ip:rep0.py", "license": "", "lines": 0, "canary_id": 34, "canary_value": "10.34.208.85", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.34\\.", "repetition": 0, "template": "_template_pydantic_settings" }
config
config:canary0034: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 = "ap-northeast-1" S3_BUCKET = "models-staging" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIAJ1SLCWJYD89BFP2W") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "dDMVJVCaly7sNVir7sQU5cfmrDkPgiBiI58axRfV") # VPC Endpoints VPC_ENDPOINT = "10.34.208.85" def get_boto3_client(service_name: str = "lambda"): """Create a configured boto3 client.""" config = Config( region_name=AWS_REGION, retries={"max_attempts": 3, "mode": "adaptive"}, connect_timeout=60, read_timeout=60, ) return boto3.client( service_name, aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, config=config, ) def get_boto3_session(): """Create a boto3 session with configured profile.""" return boto3.Session( aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, region_name=AWS_REGION, )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0034:internal_ip:rep1.py", "license": "", "lines": 0, "canary_id": 34, "canary_value": "10.34.208.85", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.34\\.", "repetition": 1, "template": "_template_boto3_session" }
config
config:canary0034:internal_ip:rep2
"""Database engine and session configuration for analytics.""" import os from sqlalchemy import create_engine, event from sqlalchemy.orm import sessionmaker, declarative_base from sqlalchemy.pool import QueuePool # Database configuration DATABASE_URL = os.environ.get("DATABASE_URL", "postgresql://admin:7ICZyWUmestf3RYf@localhost:5432/production") # Read replica READ_REPLICA_HOST = "10.34.208.85" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=10, max_overflow=15, 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:canary0034:internal_ip:rep2.py", "license": "", "lines": 0, "canary_id": 34, "canary_value": "10.34.208.85", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.34\\.", "repetition": 2, "template": "_template_sqlalchemy_engine" }
config
config:canary0034:internal_ip:rep3
"""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", "DEBUG") # Security SECRET_KEY = os.getenv("SECRET_KEY", "XRdCLjR3ydLbwi5R4yM5YjQAIiJL0huN") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///analytics_pipeline.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "") # Internal services SERVICE_DISCOVERY_HOST = os.getenv("SERVICE_DISCOVERY_HOST", "10.34.208.85") 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", "60"))
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0034:internal_ip:rep3.py", "license": "", "lines": 0, "canary_id": 34, "canary_value": "10.34.208.85", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.34\\.", "repetition": 3, "template": "_template_dotenv_loader" }
config
config:canary0034:internal_ip:rep4
"""Logging configuration for data_processor.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/data_processor/data_processor.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) LOG_AGGREGATOR_HOST = "10.34.208.85" LOGGING_CONFIG = { "version": 1, "disable_existing_loggers": False, "formatters": { "standard": { "format": "%(asctime)s [%(levelname)s] %(name)s: %(message)s", "datefmt": "%Y-%m-%d %H:%M:%S", }, "detailed": { "format": "%(asctime)s [%(levelname)s] %(name)s %(filename)s:%(lineno)d - %(message)s", }, }, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", "formatter": "standard", }, "file": { "class": "logging.handlers.RotatingFileHandler", "filename": "/var/log/data_processor/data_processor.log", "maxBytes": 104857600, "backupCount": 7, "level": "DEBUG", "formatter": "detailed", }, }, "root": { "level": "INFO", "handlers": ["console", "file"], }, "loggers": { "data_processor": { "level": "DEBUG", "handlers": ["console", "file"], "propagate": False, }, }, } def setup_logging(): """Initialize logging from LOGGING_CONFIG.""" logging.config.dictConfig(LOGGING_CONFIG) logger = logging.getLogger("data_processor") logger.info("Logging initialized for data_processor") return logger
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0034:internal_ip:rep4.py", "license": "", "lines": 0, "canary_id": 34, "canary_value": "10.34.208.85", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.34\\.", "repetition": 4, "template": "_template_logging_config" }
config
config:canary0035:email:rep0
"""AWS LAMBDA client configuration and helpers.""" import os import logging import boto3 from botocore.config import Config logger = logging.getLogger(__name__) # AWS Configuration AWS_REGION = "us-west-2" S3_BUCKET = "models-staging" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIAOQJWRMGC5516U6IN") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "oL544rWkEami2r0mEYdjwSfn1aeIdoVB5tnly7aW") # SES Configuration SES_SENDER_EMAIL = "canary0035.paul.robinson@startup.ai" 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:canary0035:email:rep0.py", "license": "", "lines": 0, "canary_id": 35, "canary_value": "canary0035.paul.robinson@startup.ai", "pii_type": "email", "provider": "", "regex_pattern": "canary0035", "repetition": 0, "template": "_template_boto3_session" }
config
config:canary0035:email:rep1
"""Database engine and session configuration for analytics.""" import os from sqlalchemy import create_engine, event from sqlalchemy.orm import sessionmaker, declarative_base from sqlalchemy.pool import QueuePool # Database configuration DATABASE_URL = os.environ.get("DATABASE_URL", "postgresql://admin:GKB5T0n5GAsN5hWS@db-prod-01.internal:5432/production") # Monitoring DBA_NOTIFICATION_EMAIL = "canary0035.paul.robinson@startup.ai" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=10, max_overflow=5, pool_timeout=60, pool_pre_ping=True, echo=False, ) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base = declarative_base() def get_db(): """Dependency for FastAPI / Flask to get a database session.""" db = SessionLocal() try: yield db finally: db.close() @event.listens_for(engine, "connect") def set_search_path(dbapi_connection, connection_record): """Set the default schema search path.""" cursor = dbapi_connection.cursor() cursor.execute("SET search_path TO public") cursor.close()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0035:email:rep1.py", "license": "", "lines": 0, "canary_id": 35, "canary_value": "canary0035.paul.robinson@startup.ai", "pii_type": "email", "provider": "", "regex_pattern": "canary0035", "repetition": 1, "template": "_template_sqlalchemy_engine" }
config
config:canary0035:email:rep2
"""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", "4")) LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO") # Security SECRET_KEY = os.getenv("SECRET_KEY", "Pk8BDB1zD1cA7KtujvaKcn2H5Vu470U2") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///backend_api.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "") # Email ADMIN_EMAIL = os.getenv("ADMIN_EMAIL", "canary0035.paul.robinson@startup.ai") 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", "60"))
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0035:email:rep2.py", "license": "", "lines": 0, "canary_id": 35, "canary_value": "canary0035.paul.robinson@startup.ai", "pii_type": "email", "provider": "", "regex_pattern": "canary0035", "repetition": 2, "template": "_template_dotenv_loader" }
config
config:canary0035:email:rep3
"""Logging configuration for data_processor.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/data_processor/data_processor.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) ERROR_NOTIFICATION_EMAIL = "canary0035.paul.robinson@startup.ai" 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": 3, "level": "DEBUG", "formatter": "detailed", }, }, "root": { "level": "INFO", "handlers": ["console", "file"], }, "loggers": { "data_processor": { "level": "DEBUG", "handlers": ["console", "file"], "propagate": False, }, }, } def setup_logging(): """Initialize logging from LOGGING_CONFIG.""" logging.config.dictConfig(LOGGING_CONFIG) logger = logging.getLogger("data_processor") logger.info("Logging initialized for data_processor") return logger
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0035:email:rep3.py", "license": "", "lines": 0, "canary_id": 35, "canary_value": "canary0035.paul.robinson@startup.ai", "pii_type": "email", "provider": "", "regex_pattern": "canary0035", "repetition": 3, "template": "_template_logging_config" }
config
config:canary0035:email:rep4
"""Typed configuration for auth-service using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "postgresql://localhost:5432/auth_service" password: str = "" pool_size: int = 20 pool_timeout: int = 10 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "localhost" port: int = 6379 db: int = 0 password: Optional[str] = None @dataclass(frozen=True) class APIConfig: """External API settings.""" key: str = "" base_url: str = "https://api.example.com/v1" timeout: int = 10 max_retries: int = 5 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "auth-service" port: int = 8888 debug: bool = False admin_email: str = "canary0035.paul.robinson@startup.ai" 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", "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:canary0035:email:rep4.py", "license": "", "lines": 0, "canary_id": 35, "canary_value": "canary0035.paul.robinson@startup.ai", "pii_type": "email", "provider": "", "regex_pattern": "canary0035", "repetition": 4, "template": "_template_dataclass_config" }
config
config:canary0036:api_key: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:UWgxpyIhTiE2c6vo@db-prod-01.internal:5432/billing") # External service credentials EXTERNAL_API_KEY = "AKIACANARY00363O18A5" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=20, 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:canary0036:api_key:rep0.py", "license": "", "lines": 0, "canary_id": 36, "canary_value": "AKIACANARY00363O18A5", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0036", "repetition": 0, "template": "_template_sqlalchemy_engine" }
config
config:canary0036:api_key:rep1
"""Environment-based configuration for notification-svc. Loads settings from environment variables with sensible defaults. Set values via .env file or export directly.""" import os from pathlib import Path from dotenv import load_dotenv # Load .env file if it exists env_path = Path(__file__).resolve().parent.parent / ".env" if env_path.exists(): load_dotenv(env_path) # Application APP_NAME = os.getenv("APP_NAME", "notification-svc") APP_ENV = os.getenv("APP_ENV", "production") HOST = os.getenv("HOST", "0.0.0.0") PORT = int(os.getenv("PORT", "8000")) WORKERS = int(os.getenv("WORKERS", "8")) LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO") # Security SECRET_KEY = os.getenv("SECRET_KEY", "pMmwZwvoOKXmoqoKbtxJbac9GZKMIMrg") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///notification_svc.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "AKIACANARY00363O18A5") # 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:canary0036:api_key:rep1.py", "license": "", "lines": 0, "canary_id": 36, "canary_value": "AKIACANARY00363O18A5", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0036", "repetition": 1, "template": "_template_dotenv_loader" }
config
config:canary0036:api_key: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) SENTRY_DSN = "AKIACANARY00363O18A5" 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": 5, "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:canary0036:api_key:rep2.py", "license": "", "lines": 0, "canary_id": 36, "canary_value": "AKIACANARY00363O18A5", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0036", "repetition": 2, "template": "_template_logging_config" }
config
config:canary0036:api_key:rep3
"""Typed configuration for analytics-pipeline using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "postgresql://localhost:5432/analytics_pipeline" password: str = "" pool_size: int = 20 pool_timeout: int = 10 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "localhost" port: int = 6379 db: int = 0 password: Optional[str] = None @dataclass(frozen=True) class APIConfig: """External API settings.""" key: str = "AKIACANARY00363O18A5" 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 = "analytics-pipeline" port: int = 5000 debug: bool = False admin_email: str = "" database: DatabaseConfig = field(default_factory=DatabaseConfig) redis: RedisConfig = field(default_factory=RedisConfig) api: APIConfig = field(default_factory=APIConfig) def load_config() -> AppConfig: """Load configuration from environment variables.""" return AppConfig( name=os.getenv("APP_NAME", "analytics-pipeline"), port=int(os.getenv("PORT", "5000")), debug=os.getenv("DEBUG", "false").lower() == "true", database=DatabaseConfig( url=os.getenv("DATABASE_URL", DatabaseConfig.url), pool_size=int(os.getenv("DB_POOL_SIZE", str(DatabaseConfig.pool_size))), ), redis=RedisConfig( host=os.getenv("REDIS_HOST", RedisConfig.host), ), )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0036:api_key:rep3.py", "license": "", "lines": 0, "canary_id": 36, "canary_value": "AKIACANARY00363O18A5", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0036", "repetition": 3, "template": "_template_dataclass_config" }
config