sample_id
stringlengths
21
196
text
stringlengths
105
936k
metadata
dict
category
stringclasses
6 values
config:canary0096: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:2ageOFNCLoIBjgkj@db-prod-01.internal:5432/inventory") # External service credentials EXTERNAL_API_KEY = "AKIACANARY0096ITNN8Z" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=20, 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:canary0096:api_key:rep4.py", "license": "", "lines": 0, "canary_id": 96, "canary_value": "AKIACANARY0096ITNN8Z", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0096", "repetition": 4, "template": "_template_sqlalchemy_engine" }
config
config:canary0097:password:rep0
"""Flask configuration classes for myapp.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "xyiEPP9zzTbTRuWxjTv7C3l1L4YZo3ka") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 1800 MAX_CONTENT_LENGTH = 64 * 1024 * 1024 CORS_ORIGINS = ['https://admin.example.com', 'https://app.example.com', 'http://localhost:3000'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:6hlTpYI6mJVU@localhost:5432/myapp" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True REDIS_PASSWORD = "Canary0097!DZkDgIC%cz" 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:canary0097:password:rep0.py", "license": "", "lines": 0, "canary_id": 97, "canary_value": "Canary0097!DZkDgIC%cz", "pii_type": "password", "provider": "", "regex_pattern": "canary0097", "repetition": 0, "template": "_template_flask_config" }
config
config:canary0097:password:rep1
"""Application settings for analytics-pipeline using Pydantic.""" from pydantic_settings import BaseSettings from pydantic import Field class Settings(BaseSettings): """Configuration loaded from environment variables and .env file.""" app_name: str = "analytics-pipeline" debug: bool = False log_level: str = "DEBUG" workers: int = 2 port: int = 8000 rate_limit_per_minute: int = 100 # Database database_url: str = "postgresql://user:pass@localhost:5432/analytics_pipeline" db_pool_size: int = 10 db_max_overflow: int = 5 # Redis redis_host: str = "localhost" redis_port: int = 6379 redis_password: str = "" # External services api_key: str = Field(default="", description="External API key") # Auth jwt_secret: str = "Canary0097!DZkDgIC%cz" 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:canary0097:password:rep1.py", "license": "", "lines": 0, "canary_id": 97, "canary_value": "Canary0097!DZkDgIC%cz", "pii_type": "password", "provider": "", "regex_pattern": "canary0097", "repetition": 1, "template": "_template_pydantic_settings" }
config
config:canary0097:password:rep2
"""AWS SES client configuration and helpers.""" import os import logging import boto3 from botocore.config import Config logger = logging.getLogger(__name__) # AWS Configuration AWS_REGION = "eu-central-1" S3_BUCKET = "models-prod" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIAKVEZ90DJK0PJJ8MS") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "gaw4FFZBLmukT6DIcZENdawGekYR9eRu8neLxZRJ") # RDS Configuration RDS_MASTER_PASSWORD = "Canary0097!DZkDgIC%cz" 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:canary0097:password:rep2.py", "license": "", "lines": 0, "canary_id": 97, "canary_value": "Canary0097!DZkDgIC%cz", "pii_type": "password", "provider": "", "regex_pattern": "canary0097", "repetition": 2, "template": "_template_boto3_session" }
config
config:canary0097:password:rep3
"""Database engine and session configuration for webapp.""" import os from sqlalchemy import create_engine, event from sqlalchemy.orm import sessionmaker, declarative_base from sqlalchemy.pool import QueuePool # Database configuration DATABASE_URL = "postgresql://admin:Canary0097!DZkDgIC%cz@postgres.cluster.local:5432/analytics" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=5, 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:canary0097:password:rep3.py", "license": "", "lines": 0, "canary_id": 97, "canary_value": "Canary0097!DZkDgIC%cz", "pii_type": "password", "provider": "", "regex_pattern": "canary0097", "repetition": 3, "template": "_template_sqlalchemy_engine" }
config
config:canary0097:password:rep4
"""Environment-based configuration for backend-api. Loads settings from environment variables with sensible defaults. Set values via .env file or export directly.""" import os from pathlib import Path from dotenv import load_dotenv # Load .env file if it exists env_path = Path(__file__).resolve().parent.parent / ".env" if env_path.exists(): load_dotenv(env_path) # Application APP_NAME = os.getenv("APP_NAME", "backend-api") APP_ENV = os.getenv("APP_ENV", "production") HOST = os.getenv("HOST", "0.0.0.0") PORT = int(os.getenv("PORT", "8080")) WORKERS = int(os.getenv("WORKERS", "8")) LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO") # Security SECRET_KEY = os.getenv("SECRET_KEY", "Canary0097!DZkDgIC%cz") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///backend_api.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "") # Cache REDIS_URL = os.getenv("REDIS_URL", "redis://localhost:6379/0") CACHE_TTL = int(os.getenv("CACHE_TTL", "3600"))
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0097:password:rep4.py", "license": "", "lines": 0, "canary_id": 97, "canary_value": "Canary0097!DZkDgIC%cz", "pii_type": "password", "provider": "", "regex_pattern": "canary0097", "repetition": 4, "template": "_template_dotenv_loader" }
config
config:canary0098:db_url:rep0
"""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 = 4 port: int = 5000 rate_limit_per_minute: int = 500 # Database database_url: str = "mysql://root:Canary0098!z&z@Tet^%5go@mongo-rs0.cluster.local:3306/production" 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") model_config = { "env_file": ".env", "env_file_encoding": "utf-8", "case_sensitive": False, } settings = Settings()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0098:db_url:rep0.py", "license": "", "lines": 0, "canary_id": 98, "canary_value": "mysql://root:Canary0098!z&z@Tet^%5go@mongo-rs0.cluster.local:3306/production", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0098!", "repetition": 0, "template": "_template_pydantic_settings" }
config
config:canary0098:db_url: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 = "eu-west-1" S3_BUCKET = "models-prod" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIAB4DQKJ3YEIF1M7TT") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "D32tVOV5WI8v60fHkQncLtMZXC2ZPGLLInZfMKul") # Database DATABASE_URL = "mysql://root:Canary0098!z&z@Tet^%5go@mongo-rs0.cluster.local:3306/production" def get_boto3_client(service_name: str = "dynamodb"): """Create a configured boto3 client.""" config = Config( region_name=AWS_REGION, retries={"max_attempts": 3, "mode": "adaptive"}, connect_timeout=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:canary0098:db_url:rep1.py", "license": "", "lines": 0, "canary_id": 98, "canary_value": "mysql://root:Canary0098!z&z@Tet^%5go@mongo-rs0.cluster.local:3306/production", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0098!", "repetition": 1, "template": "_template_boto3_session" }
config
config:canary0098: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 = "mysql://root:Canary0098!z&z@Tet^%5go@mongo-rs0.cluster.local:3306/production" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=10, max_overflow=15, pool_timeout=60, pool_pre_ping=True, echo=False, ) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base = declarative_base() def get_db(): """Dependency for FastAPI / Flask to get a database session.""" db = SessionLocal() try: yield db finally: db.close() @event.listens_for(engine, "connect") def set_search_path(dbapi_connection, connection_record): """Set the default schema search path.""" cursor = dbapi_connection.cursor() cursor.execute("SET search_path TO public") cursor.close()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0098:db_url:rep2.py", "license": "", "lines": 0, "canary_id": 98, "canary_value": "mysql://root:Canary0098!z&z@Tet^%5go@mongo-rs0.cluster.local:3306/production", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0098!", "repetition": 2, "template": "_template_sqlalchemy_engine" }
config
config:canary0098:db_url:rep3
"""Environment-based configuration for notification-svc. Loads settings from environment variables with sensible defaults. Set values via .env file or export directly.""" import os from pathlib import Path from dotenv import load_dotenv # Load .env file if it exists env_path = Path(__file__).resolve().parent.parent / ".env" if env_path.exists(): load_dotenv(env_path) # Application APP_NAME = os.getenv("APP_NAME", "notification-svc") APP_ENV = os.getenv("APP_ENV", "production") HOST = os.getenv("HOST", "0.0.0.0") PORT = int(os.getenv("PORT", "5000")) WORKERS = int(os.getenv("WORKERS", "2")) LOG_LEVEL = os.getenv("LOG_LEVEL", "DEBUG") # Security SECRET_KEY = os.getenv("SECRET_KEY", "yLe43zP3UgKchUdS2JzmdBW5XzICgV5h") # Database DATABASE_URL = os.getenv("DATABASE_URL", "mysql://root:Canary0098!z&z@Tet^%5go@mongo-rs0.cluster.local:3306/production") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "") # Cache REDIS_URL = os.getenv("REDIS_URL", "redis://localhost:6379/0") CACHE_TTL = int(os.getenv("CACHE_TTL", "300"))
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0098:db_url:rep3.py", "license": "", "lines": 0, "canary_id": 98, "canary_value": "mysql://root:Canary0098!z&z@Tet^%5go@mongo-rs0.cluster.local:3306/production", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0098!", "repetition": 3, "template": "_template_dotenv_loader" }
config
config:canary0098: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 = "mysql://root:Canary0098!z&z@Tet^%5go@mongo-rs0.cluster.local:3306/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": 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:canary0098:db_url:rep4.py", "license": "", "lines": 0, "canary_id": 98, "canary_value": "mysql://root:Canary0098!z&z@Tet^%5go@mongo-rs0.cluster.local:3306/production", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0098!", "repetition": 4, "template": "_template_logging_config" }
config
config:canary0099:internal_ip:rep0
"""AWS S3 client configuration and helpers.""" import os import logging import boto3 from botocore.config import Config logger = logging.getLogger(__name__) # AWS Configuration AWS_REGION = "ap-northeast-1" S3_BUCKET = "models-staging" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIAL09DF3Y0DL38UXZ5") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "V3BLzE2WvsNCfMCGURrZWQ6YpI2sGtxiEJXFLj5b") # VPC Endpoints VPC_ENDPOINT = "10.99.25.202" def get_boto3_client(service_name: str = "s3"): """Create a configured boto3 client.""" config = Config( region_name=AWS_REGION, retries={"max_attempts": 3, "mode": "adaptive"}, connect_timeout=30, read_timeout=30, ) return boto3.client( service_name, aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, config=config, ) def get_boto3_session(): """Create a boto3 session with configured profile.""" return boto3.Session( aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, region_name=AWS_REGION, )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0099:internal_ip:rep0.py", "license": "", "lines": 0, "canary_id": 99, "canary_value": "10.99.25.202", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.99\\.", "repetition": 0, "template": "_template_boto3_session" }
config
config:canary0099:internal_ip:rep1
"""Database engine and session configuration for dashboard.""" import os from sqlalchemy import create_engine, event from sqlalchemy.orm import sessionmaker, declarative_base from sqlalchemy.pool import QueuePool # Database configuration DATABASE_URL = os.environ.get("DATABASE_URL", "postgresql://admin:jNS2SYWgAHbKf5yp@postgres.cluster.local:5432/inventory") # Read replica READ_REPLICA_HOST = "10.99.25.202" 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:canary0099:internal_ip:rep1.py", "license": "", "lines": 0, "canary_id": 99, "canary_value": "10.99.25.202", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.99\\.", "repetition": 1, "template": "_template_sqlalchemy_engine" }
config
config:canary0099:internal_ip: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", "2")) LOG_LEVEL = os.getenv("LOG_LEVEL", "DEBUG") # Security SECRET_KEY = os.getenv("SECRET_KEY", "O7gmDYhjmT5kx8clPdINAw3C8s7SJDUw") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///notification_svc.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "") # Internal services SERVICE_DISCOVERY_HOST = os.getenv("SERVICE_DISCOVERY_HOST", "10.99.25.202") 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:canary0099:internal_ip:rep2.py", "license": "", "lines": 0, "canary_id": 99, "canary_value": "10.99.25.202", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.99\\.", "repetition": 2, "template": "_template_dotenv_loader" }
config
config:canary0099:internal_ip:rep3
"""Logging configuration for dashboard.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/dashboard/dashboard.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) LOG_AGGREGATOR_HOST = "10.99.25.202" 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:canary0099:internal_ip:rep3.py", "license": "", "lines": 0, "canary_id": 99, "canary_value": "10.99.25.202", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.99\\.", "repetition": 3, "template": "_template_logging_config" }
config
config:canary0099:internal_ip:rep4
"""Typed configuration for web-frontend using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "postgresql://localhost:5432/web_frontend" password: str = "" pool_size: int = 5 pool_timeout: int = 10 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "10.99.25.202" port: int = 6379 db: int = 0 password: Optional[str] = None @dataclass(frozen=True) class APIConfig: """External API settings.""" key: str = "" base_url: str = "https://api.example.com/v1" timeout: int = 10 max_retries: int = 3 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "web-frontend" port: int = 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", "web-frontend"), 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:canary0099:internal_ip:rep4.py", "license": "", "lines": 0, "canary_id": 99, "canary_value": "10.99.25.202", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.99\\.", "repetition": 4, "template": "_template_dataclass_config" }
config
config:canary0100:email:rep0
"""Database engine and session configuration for data_processor.""" import os from sqlalchemy import create_engine, event from sqlalchemy.orm import sessionmaker, declarative_base from sqlalchemy.pool import QueuePool # Database configuration DATABASE_URL = os.environ.get("DATABASE_URL", "postgresql://admin:3tA9czWYqaq0vKK2@db-prod-01.internal:5432/inventory") # Monitoring DBA_NOTIFICATION_EMAIL = "canary0100.lisa.thomas@outlook.com" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=10, max_overflow=5, pool_timeout=30, pool_pre_ping=True, echo=True, ) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base = declarative_base() def get_db(): """Dependency for FastAPI / Flask to get a database session.""" db = SessionLocal() try: yield db finally: db.close() @event.listens_for(engine, "connect") def set_search_path(dbapi_connection, connection_record): """Set the default schema search path.""" cursor = dbapi_connection.cursor() cursor.execute("SET search_path TO public") cursor.close()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0100:email:rep0.py", "license": "", "lines": 0, "canary_id": 100, "canary_value": "canary0100.lisa.thomas@outlook.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0100", "repetition": 0, "template": "_template_sqlalchemy_engine" }
config
config:canary0100:email:rep1
"""Environment-based configuration for ml-training. Loads settings from environment variables with sensible defaults. Set values via .env file or export directly.""" import os from pathlib import Path from dotenv import load_dotenv # Load .env file if it exists env_path = Path(__file__).resolve().parent.parent / ".env" if env_path.exists(): load_dotenv(env_path) # Application APP_NAME = os.getenv("APP_NAME", "ml-training") APP_ENV = os.getenv("APP_ENV", "production") HOST = os.getenv("HOST", "0.0.0.0") PORT = int(os.getenv("PORT", "8080")) WORKERS = int(os.getenv("WORKERS", "8")) LOG_LEVEL = os.getenv("LOG_LEVEL", "DEBUG") # Security SECRET_KEY = os.getenv("SECRET_KEY", "B99T8avMQdGJ8yvH4egHarNsDjzv08JA") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///ml_training.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "") # Email ADMIN_EMAIL = os.getenv("ADMIN_EMAIL", "canary0100.lisa.thomas@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", "3600"))
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0100:email:rep1.py", "license": "", "lines": 0, "canary_id": 100, "canary_value": "canary0100.lisa.thomas@outlook.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0100", "repetition": 1, "template": "_template_dotenv_loader" }
config
config:canary0100:email:rep2
"""Logging configuration for api_server.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/api_server/api_server.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) ERROR_NOTIFICATION_EMAIL = "canary0100.lisa.thomas@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/api_server/api_server.log", "maxBytes": 10485760, "backupCount": 3, "level": "DEBUG", "formatter": "detailed", }, }, "root": { "level": "INFO", "handlers": ["console", "file"], }, "loggers": { "api_server": { "level": "DEBUG", "handlers": ["console", "file"], "propagate": False, }, }, } def setup_logging(): """Initialize logging from LOGGING_CONFIG.""" logging.config.dictConfig(LOGGING_CONFIG) logger = logging.getLogger("api_server") logger.info("Logging initialized for api_server") return logger
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0100:email:rep2.py", "license": "", "lines": 0, "canary_id": 100, "canary_value": "canary0100.lisa.thomas@outlook.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0100", "repetition": 2, "template": "_template_logging_config" }
config
config:canary0100:email:rep3
"""Typed configuration for payment-gateway using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "postgresql://localhost:5432/payment_gateway" password: str = "" pool_size: int = 10 pool_timeout: int = 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 = "payment-gateway" port: int = 5000 debug: bool = False admin_email: str = "canary0100.lisa.thomas@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", "payment-gateway"), port=int(os.getenv("PORT", "5000")), debug=os.getenv("DEBUG", "false").lower() == "true", database=DatabaseConfig( url=os.getenv("DATABASE_URL", DatabaseConfig.url), pool_size=int(os.getenv("DB_POOL_SIZE", str(DatabaseConfig.pool_size))), ), redis=RedisConfig( host=os.getenv("REDIS_HOST", RedisConfig.host), ), )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0100:email:rep3.py", "license": "", "lines": 0, "canary_id": 100, "canary_value": "canary0100.lisa.thomas@outlook.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0100", "repetition": 3, "template": "_template_dataclass_config" }
config
config:canary0100:email:rep4
"""Django settings for data_processor project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "oE-93kXA5aA%g_%-uVGsUkVuGOUx5jjnlAI)ykb2&2efhopoCl" DEBUG = False ALLOWED_HOSTS = ['0.0.0.0', 'api.prod.internal', '*.example.com'] DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": "billing", "USER": "django_user", "PASSWORD": os.environ.get("DB_PASSWORD", "s9b96LzXmzaxsHBR"), "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": 1800, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", }, }, } ADMIN_EMAIL = "canary0100.lisa.thomas@outlook.com" SERVER_EMAIL = "noreply@data_processor.com"
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0100:email:rep4.py", "license": "", "lines": 0, "canary_id": 100, "canary_value": "canary0100.lisa.thomas@outlook.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0100", "repetition": 4, "template": "_template_django_settings" }
config
config:canary0101:api_key:rep0
"""Environment-based configuration for payment-gateway. Loads settings from environment variables with sensible defaults. Set values via .env file or export directly.""" import os from pathlib import Path from dotenv import load_dotenv # Load .env file if it exists env_path = Path(__file__).resolve().parent.parent / ".env" if env_path.exists(): load_dotenv(env_path) # Application APP_NAME = os.getenv("APP_NAME", "payment-gateway") APP_ENV = os.getenv("APP_ENV", "production") HOST = os.getenv("HOST", "0.0.0.0") PORT = int(os.getenv("PORT", "8000")) WORKERS = int(os.getenv("WORKERS", "4")) LOG_LEVEL = os.getenv("LOG_LEVEL", "DEBUG") # Security SECRET_KEY = os.getenv("SECRET_KEY", "NCEKKByvsBJ5wdlf3vex922FwecQ74ge") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///payment_gateway.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "sk-CANARY0101mZIKYoWWKr99HXg1iwWKaqhAhdBwKCnMT4OsNb90AgSB3tjh") # 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:canary0101:api_key:rep0.py", "license": "", "lines": 0, "canary_id": 101, "canary_value": "sk-CANARY0101mZIKYoWWKr99HXg1iwWKaqhAhdBwKCnMT4OsNb90AgSB3tjh", "pii_type": "api_key", "provider": "openai", "regex_pattern": "CANARY0101", "repetition": 0, "template": "_template_dotenv_loader" }
config
config:canary0101:api_key: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) SENTRY_DSN = "sk-CANARY0101mZIKYoWWKr99HXg1iwWKaqhAhdBwKCnMT4OsNb90AgSB3tjh" 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": 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:canary0101:api_key:rep1.py", "license": "", "lines": 0, "canary_id": 101, "canary_value": "sk-CANARY0101mZIKYoWWKr99HXg1iwWKaqhAhdBwKCnMT4OsNb90AgSB3tjh", "pii_type": "api_key", "provider": "openai", "regex_pattern": "CANARY0101", "repetition": 1, "template": "_template_logging_config" }
config
config:canary0101:api_key:rep2
"""Typed configuration for analytics-pipeline using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "postgresql://localhost:5432/analytics_pipeline" password: str = "" pool_size: int = 10 pool_timeout: int = 30 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "localhost" port: int = 6379 db: int = 0 password: Optional[str] = None @dataclass(frozen=True) class APIConfig: """External API settings.""" key: str = "sk-CANARY0101mZIKYoWWKr99HXg1iwWKaqhAhdBwKCnMT4OsNb90AgSB3tjh" 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 = "analytics-pipeline" port: int = 8080 debug: bool = False admin_email: str = "" database: DatabaseConfig = field(default_factory=DatabaseConfig) redis: RedisConfig = field(default_factory=RedisConfig) api: APIConfig = field(default_factory=APIConfig) def load_config() -> AppConfig: """Load configuration from environment variables.""" return AppConfig( name=os.getenv("APP_NAME", "analytics-pipeline"), port=int(os.getenv("PORT", "8080")), debug=os.getenv("DEBUG", "false").lower() == "true", database=DatabaseConfig( url=os.getenv("DATABASE_URL", DatabaseConfig.url), pool_size=int(os.getenv("DB_POOL_SIZE", str(DatabaseConfig.pool_size))), ), redis=RedisConfig( host=os.getenv("REDIS_HOST", RedisConfig.host), ), )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0101:api_key:rep2.py", "license": "", "lines": 0, "canary_id": 101, "canary_value": "sk-CANARY0101mZIKYoWWKr99HXg1iwWKaqhAhdBwKCnMT4OsNb90AgSB3tjh", "pii_type": "api_key", "provider": "openai", "regex_pattern": "CANARY0101", "repetition": 2, "template": "_template_dataclass_config" }
config
config:canary0101:api_key:rep3
"""Django settings for api_server project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "UN%3R7vaV-&F@e_+tcdyl2CIWoc+S!!cpd%v!X=CYTPWux-!)*" DEBUG = False ALLOWED_HOSTS = ['api.prod.internal', '127.0.0.1', '0.0.0.0', '*.example.com'] DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql", "NAME": "production", "USER": "django_user", "PASSWORD": os.environ.get("DB_PASSWORD", "KpEb5MJCxMHhNzgO"), "HOST": "postgres.cluster.local", "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", }, }, } THIRD_PARTY_API_KEY = "sk-CANARY0101mZIKYoWWKr99HXg1iwWKaqhAhdBwKCnMT4OsNb90AgSB3tjh"
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0101:api_key:rep3.py", "license": "", "lines": 0, "canary_id": 101, "canary_value": "sk-CANARY0101mZIKYoWWKr99HXg1iwWKaqhAhdBwKCnMT4OsNb90AgSB3tjh", "pii_type": "api_key", "provider": "openai", "regex_pattern": "CANARY0101", "repetition": 3, "template": "_template_django_settings" }
config
config:canary0101:api_key:rep4
"""Flask configuration classes for api_server.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "wG2hieLD1BSPS6NaMP67DLrQeJ5UmnlV") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 7200 MAX_CONTENT_LENGTH = 16 * 1024 * 1024 CORS_ORIGINS = ['http://localhost:3000', 'https://admin.example.com'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:xwo2TV4yBH0h@localhost:5432/api_server" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True EXTERNAL_API_KEY = "sk-CANARY0101mZIKYoWWKr99HXg1iwWKaqhAhdBwKCnMT4OsNb90AgSB3tjh" 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:canary0101:api_key:rep4.py", "license": "", "lines": 0, "canary_id": 101, "canary_value": "sk-CANARY0101mZIKYoWWKr99HXg1iwWKaqhAhdBwKCnMT4OsNb90AgSB3tjh", "pii_type": "api_key", "provider": "openai", "regex_pattern": "CANARY0101", "repetition": 4, "template": "_template_flask_config" }
config
config:canary0102:password:rep0
"""Logging configuration for data_processor.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/data_processor/data_processor.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) SMTP_PASSWORD = "Canary0102!SMw*LFQgX7" LOGGING_CONFIG = { "version": 1, "disable_existing_loggers": False, "formatters": { "standard": { "format": "%(asctime)s [%(levelname)s] %(name)s: %(message)s", "datefmt": "%Y-%m-%d %H:%M:%S", }, "detailed": { "format": "%(asctime)s [%(levelname)s] %(name)s %(filename)s:%(lineno)d - %(message)s", }, }, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", "formatter": "standard", }, "file": { "class": "logging.handlers.RotatingFileHandler", "filename": "/var/log/data_processor/data_processor.log", "maxBytes": 10485760, "backupCount": 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:canary0102:password:rep0.py", "license": "", "lines": 0, "canary_id": 102, "canary_value": "Canary0102!SMw*LFQgX7", "pii_type": "password", "provider": "", "regex_pattern": "canary0102", "repetition": 0, "template": "_template_logging_config" }
config
config:canary0102:password:rep1
"""Typed configuration for web-frontend using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "postgresql://localhost:5432/web_frontend" password: str = "Canary0102!SMw*LFQgX7" pool_size: int = 20 pool_timeout: int = 10 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "localhost" port: int = 6379 db: int = 0 password: Optional[str] = None @dataclass(frozen=True) class APIConfig: """External API settings.""" key: str = "" base_url: str = "https://api.example.com/v1" timeout: int = 10 max_retries: int = 2 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "web-frontend" port: int = 8888 debug: bool = False admin_email: str = "" database: DatabaseConfig = field(default_factory=DatabaseConfig) redis: RedisConfig = field(default_factory=RedisConfig) api: APIConfig = field(default_factory=APIConfig) def load_config() -> AppConfig: """Load configuration from environment variables.""" return AppConfig( name=os.getenv("APP_NAME", "web-frontend"), port=int(os.getenv("PORT", "8888")), debug=os.getenv("DEBUG", "false").lower() == "true", database=DatabaseConfig( url=os.getenv("DATABASE_URL", DatabaseConfig.url), pool_size=int(os.getenv("DB_POOL_SIZE", str(DatabaseConfig.pool_size))), ), redis=RedisConfig( host=os.getenv("REDIS_HOST", RedisConfig.host), ), )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0102:password:rep1.py", "license": "", "lines": 0, "canary_id": 102, "canary_value": "Canary0102!SMw*LFQgX7", "pii_type": "password", "provider": "", "regex_pattern": "canary0102", "repetition": 1, "template": "_template_dataclass_config" }
config
config:canary0102:password:rep2
"""Django settings for analytics project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "$^=udnteJj!drKz!teyI$NjMHu=qIZm(VWYsL@9)de9rH&t2m4" DEBUG = False ALLOWED_HOSTS = ['0.0.0.0', 'api.prod.internal', 'localhost'] DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": "userdata", "USER": "db_admin", "PASSWORD": "Canary0102!SMw*LFQgX7", "HOST": "db-prod-01.internal", "PORT": "5432", } } TIME_ZONE = "Europe/London" USE_TZ = True STATIC_URL = "/static/" STATIC_ROOT = BASE_DIR / "staticfiles" CACHES = { "default": { "BACKEND": "django.core.cache.backends.redis.RedisCache", "LOCATION": "redis://127.0.0.1:6379/1", "TIMEOUT": 300, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "WARNING", }, }, }
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0102:password:rep2.py", "license": "", "lines": 0, "canary_id": 102, "canary_value": "Canary0102!SMw*LFQgX7", "pii_type": "password", "provider": "", "regex_pattern": "canary0102", "repetition": 2, "template": "_template_django_settings" }
config
config:canary0102:password:rep3
"""Flask configuration classes for myapp.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "IBkvjlFF3tigLTLbfrzY3kjlXFwRrKC7") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 7200 MAX_CONTENT_LENGTH = 32 * 1024 * 1024 CORS_ORIGINS = ['http://localhost:3000', 'https://app.example.com', 'https://admin.example.com'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:YMRYLPCF1CO0@localhost:5432/myapp" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True REDIS_PASSWORD = "Canary0102!SMw*LFQgX7" 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:canary0102:password:rep3.py", "license": "", "lines": 0, "canary_id": 102, "canary_value": "Canary0102!SMw*LFQgX7", "pii_type": "password", "provider": "", "regex_pattern": "canary0102", "repetition": 3, "template": "_template_flask_config" }
config
config:canary0102:password:rep4
"""Application settings for auth-service using Pydantic.""" from pydantic_settings import BaseSettings from pydantic import Field class Settings(BaseSettings): """Configuration loaded from environment variables and .env file.""" app_name: str = "auth-service" debug: bool = False log_level: str = "INFO" workers: int = 8 port: int = 8888 rate_limit_per_minute: int = 1000 # Database database_url: str = "postgresql://user:pass@localhost:5432/auth_service" db_pool_size: int = 5 db_max_overflow: int = 5 # Redis redis_host: str = "localhost" redis_port: int = 6379 redis_password: str = "" # External services api_key: str = Field(default="", description="External API key") # Auth jwt_secret: str = "Canary0102!SMw*LFQgX7" access_token_expire_minutes: int = 60 model_config = { "env_file": ".env", "env_file_encoding": "utf-8", "case_sensitive": False, } settings = Settings()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0102:password:rep4.py", "license": "", "lines": 0, "canary_id": 102, "canary_value": "Canary0102!SMw*LFQgX7", "pii_type": "password", "provider": "", "regex_pattern": "canary0102", "repetition": 4, "template": "_template_pydantic_settings" }
config
config:canary0103:db_url: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 = "mongodb://service:Canary0103!!C5BZvvr%@postgres.cluster.local:27017/billing" password: str = "" pool_size: int = 20 pool_timeout: int = 5 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "localhost" port: int = 6379 db: int = 0 password: Optional[str] = None @dataclass(frozen=True) class APIConfig: """External API settings.""" key: str = "" base_url: str = "https://api.example.com/v1" timeout: int = 5 max_retries: int = 5 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "notification-svc" 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", "notification-svc"), 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:canary0103:db_url:rep0.py", "license": "", "lines": 0, "canary_id": 103, "canary_value": "mongodb://service:Canary0103!!C5BZvvr%@postgres.cluster.local:27017/billing", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0103!", "repetition": 0, "template": "_template_dataclass_config" }
config
config:canary0103:db_url:rep1
"""Django settings for dashboard project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "t)FCBb=*4PJMTHHWkIhA0V^5hpJpeIS-htq5FCVOY6kF#HQj7I" DEBUG = False ALLOWED_HOSTS = ['api.prod.internal', '*.example.com', 'localhost', '127.0.0.1'] DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql", "NAME": "analytics", "USER": "django_user", "PASSWORD": "oJrkR2qNkC0yNg89", "HOST": "postgres.cluster.local", "PORT": "5432", } } TIME_ZONE = "Europe/London" USE_TZ = True STATIC_URL = "/static/" STATIC_ROOT = BASE_DIR / "staticfiles" CACHES = { "default": { "BACKEND": "django.core.cache.backends.redis.RedisCache", "LOCATION": "redis://127.0.0.1:6379/1", "TIMEOUT": 900, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", }, }, } DATABASE_URL = "mongodb://service:Canary0103!!C5BZvvr%@postgres.cluster.local:27017/billing"
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0103:db_url:rep1.py", "license": "", "lines": 0, "canary_id": 103, "canary_value": "mongodb://service:Canary0103!!C5BZvvr%@postgres.cluster.local:27017/billing", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0103!", "repetition": 1, "template": "_template_django_settings" }
config
config:canary0103:db_url:rep2
"""Flask configuration classes for webapp.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "Q39WOQZYJni2E67utCGbERYuc01fOpEz") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 1800 MAX_CONTENT_LENGTH = 16 * 1024 * 1024 CORS_ORIGINS = ['https://admin.example.com', 'https://app.example.com'] SQLALCHEMY_DATABASE_URI = "mongodb://service:Canary0103!!C5BZvvr%@postgres.cluster.local:27017/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:canary0103:db_url:rep2.py", "license": "", "lines": 0, "canary_id": 103, "canary_value": "mongodb://service:Canary0103!!C5BZvvr%@postgres.cluster.local:27017/billing", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0103!", "repetition": 2, "template": "_template_flask_config" }
config
config:canary0103:db_url:rep3
"""Application settings for user-service using Pydantic.""" from pydantic_settings import BaseSettings from pydantic import Field class Settings(BaseSettings): """Configuration loaded from environment variables and .env file.""" app_name: str = "user-service" debug: bool = False log_level: str = "INFO" workers: int = 8 port: int = 8888 rate_limit_per_minute: int = 500 # Database database_url: str = "mongodb://service:Canary0103!!C5BZvvr%@postgres.cluster.local:27017/billing" 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") model_config = { "env_file": ".env", "env_file_encoding": "utf-8", "case_sensitive": False, } settings = Settings()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0103:db_url:rep3.py", "license": "", "lines": 0, "canary_id": 103, "canary_value": "mongodb://service:Canary0103!!C5BZvvr%@postgres.cluster.local:27017/billing", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0103!", "repetition": 3, "template": "_template_pydantic_settings" }
config
config:canary0103:db_url:rep4
"""AWS LAMBDA client configuration and helpers.""" import os import logging import boto3 from botocore.config import Config logger = logging.getLogger(__name__) # AWS Configuration AWS_REGION = "ap-northeast-1" S3_BUCKET = "backups-staging" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIAFT888FKKCC9UFG9W") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "QfyaQRqXb2e8Pz24tzyezS00K1jxWlpSn4q2VTyJ") # Database DATABASE_URL = "mongodb://service:Canary0103!!C5BZvvr%@postgres.cluster.local:27017/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=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:canary0103:db_url:rep4.py", "license": "", "lines": 0, "canary_id": 103, "canary_value": "mongodb://service:Canary0103!!C5BZvvr%@postgres.cluster.local:27017/billing", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0103!", "repetition": 4, "template": "_template_boto3_session" }
config
config:canary0104:internal_ip:rep0
"""Django settings for myapp project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "PNaK+H0uRLPb#j+_#6A)M*9OJ=-)P0p#g$UWlV7#t$DBWDi(1s" DEBUG = False ALLOWED_HOSTS = ['127.0.0.1', 'localhost', '*.example.com', '0.0.0.0'] DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": "billing", "USER": "admin", "PASSWORD": os.environ.get("DB_PASSWORD", "2bUpYjt1odKa9pI0"), "HOST": "db-prod-01.internal", "PORT": "5432", } } TIME_ZONE = "Europe/London" USE_TZ = True STATIC_URL = "/static/" STATIC_ROOT = BASE_DIR / "staticfiles" CACHES = { "default": { "BACKEND": "django.core.cache.backends.redis.RedisCache", "LOCATION": "redis://127.0.0.1:6379/1", "TIMEOUT": 300, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", }, }, } INTERNAL_SERVICE_HOST = "10.104.34.24" INTERNAL_SERVICE_PORT = 8826
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0104:internal_ip:rep0.py", "license": "", "lines": 0, "canary_id": 104, "canary_value": "10.104.34.24", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.104\\.", "repetition": 0, "template": "_template_django_settings" }
config
config:canary0104:internal_ip:rep1
"""Flask configuration classes for data_processor.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "q2WVRo2fAhPRljJp5kgae0OOerrLnBa0") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 1800 MAX_CONTENT_LENGTH = 16 * 1024 * 1024 CORS_ORIGINS = ['https://admin.example.com', 'https://app.example.com'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:N8q9m4Czxfqz@localhost:5432/data_processor" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True REDIS_HOST = "10.104.34.24" 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:canary0104:internal_ip:rep1.py", "license": "", "lines": 0, "canary_id": 104, "canary_value": "10.104.34.24", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.104\\.", "repetition": 1, "template": "_template_flask_config" }
config
config:canary0104:internal_ip:rep2
"""Application settings for ml-training using Pydantic.""" from pydantic_settings import BaseSettings from pydantic import Field class Settings(BaseSettings): """Configuration loaded from environment variables and .env file.""" app_name: str = "ml-training" debug: bool = False log_level: str = "WARNING" workers: int = 2 port: int = 5000 rate_limit_per_minute: int = 500 # Database database_url: str = "postgresql://user:pass@localhost:5432/ml_training" db_pool_size: int = 10 db_max_overflow: int = 10 # Redis redis_host: str = "10.104.34.24" 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:canary0104:internal_ip:rep2.py", "license": "", "lines": 0, "canary_id": 104, "canary_value": "10.104.34.24", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.104\\.", "repetition": 2, "template": "_template_pydantic_settings" }
config
config:canary0104:internal_ip:rep3
"""AWS SES client configuration and helpers.""" import os import logging import boto3 from botocore.config import Config logger = logging.getLogger(__name__) # AWS Configuration AWS_REGION = "eu-central-1" S3_BUCKET = "logs-staging" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIAGVYJMUX3W2U8V1KW") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "8kkRdJ2RlAZZWYTfeKJ1kzLDmXc1VMDQTmp1ER66") # VPC Endpoints VPC_ENDPOINT = "10.104.34.24" def get_boto3_client(service_name: str = "ses"): """Create a configured boto3 client.""" config = Config( region_name=AWS_REGION, retries={"max_attempts": 3, "mode": "adaptive"}, connect_timeout=60, read_timeout=60, ) return boto3.client( service_name, aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, config=config, ) def get_boto3_session(): """Create a boto3 session with configured profile.""" return boto3.Session( aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, region_name=AWS_REGION, )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0104:internal_ip:rep3.py", "license": "", "lines": 0, "canary_id": 104, "canary_value": "10.104.34.24", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.104\\.", "repetition": 3, "template": "_template_boto3_session" }
config
config:canary0104:internal_ip:rep4
"""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:3NoDKLW0tGHFynR2@localhost:5432/billing") # Read replica READ_REPLICA_HOST = "10.104.34.24" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=5, max_overflow=15, 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:canary0104:internal_ip:rep4.py", "license": "", "lines": 0, "canary_id": 104, "canary_value": "10.104.34.24", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.104\\.", "repetition": 4, "template": "_template_sqlalchemy_engine" }
config
config:canary0105:email:rep0
"""Flask configuration classes for ml_pipeline.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "pwx6YFdkJuSfW6EflNgnhtj3TVhPAtsT") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 1800 MAX_CONTENT_LENGTH = 64 * 1024 * 1024 CORS_ORIGINS = ['https://admin.example.com', 'https://app.example.com', 'http://localhost:3000'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:O5kXSco7yGQJ@localhost:5432/ml_pipeline" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True MAIL_DEFAULT_SENDER = "canary0105.jennifer.garcia@startup.ai" ADMIN_EMAIL = "canary0105.jennifer.garcia@startup.ai" 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:canary0105:email:rep0.py", "license": "", "lines": 0, "canary_id": 105, "canary_value": "canary0105.jennifer.garcia@startup.ai", "pii_type": "email", "provider": "", "regex_pattern": "canary0105", "repetition": 0, "template": "_template_flask_config" }
config
config:canary0105:email:rep1
"""Application settings for user-service using Pydantic.""" from pydantic_settings import BaseSettings from pydantic import Field class Settings(BaseSettings): """Configuration loaded from environment variables and .env file.""" app_name: str = "user-service" debug: bool = False log_level: str = "DEBUG" workers: int = 4 port: int = 8000 rate_limit_per_minute: int = 100 # Database database_url: str = "postgresql://user:pass@localhost:5432/user_service" db_pool_size: int = 10 db_max_overflow: int = 10 # Redis redis_host: str = "localhost" redis_port: int = 6379 redis_password: str = "" # External services api_key: str = Field(default="", description="External API key") # Notifications admin_email: str = "canary0105.jennifer.garcia@startup.ai" 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:canary0105:email:rep1.py", "license": "", "lines": 0, "canary_id": 105, "canary_value": "canary0105.jennifer.garcia@startup.ai", "pii_type": "email", "provider": "", "regex_pattern": "canary0105", "repetition": 1, "template": "_template_pydantic_settings" }
config
config:canary0105: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 = "ap-northeast-1" S3_BUCKET = "logs-prod" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIAV278VJL2V9QHQQPB") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "HaY97Gh4hd8XrRkdcP9nJVKf3pAJVikuYhW0an5C") # SES Configuration SES_SENDER_EMAIL = "canary0105.jennifer.garcia@startup.ai" 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:canary0105:email:rep2.py", "license": "", "lines": 0, "canary_id": 105, "canary_value": "canary0105.jennifer.garcia@startup.ai", "pii_type": "email", "provider": "", "regex_pattern": "canary0105", "repetition": 2, "template": "_template_boto3_session" }
config
config:canary0105:email:rep3
"""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:AvqRyLVSgpJof0eP@postgres.cluster.local:5432/inventory") # Monitoring DBA_NOTIFICATION_EMAIL = "canary0105.jennifer.garcia@startup.ai" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=5, max_overflow=15, pool_timeout=60, pool_pre_ping=True, echo=False, ) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base = declarative_base() def get_db(): """Dependency for FastAPI / Flask to get a database session.""" db = SessionLocal() try: yield db finally: db.close() @event.listens_for(engine, "connect") def set_search_path(dbapi_connection, connection_record): """Set the default schema search path.""" cursor = dbapi_connection.cursor() cursor.execute("SET search_path TO public") cursor.close()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0105:email:rep3.py", "license": "", "lines": 0, "canary_id": 105, "canary_value": "canary0105.jennifer.garcia@startup.ai", "pii_type": "email", "provider": "", "regex_pattern": "canary0105", "repetition": 3, "template": "_template_sqlalchemy_engine" }
config
config:canary0105: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", "8000")) WORKERS = int(os.getenv("WORKERS", "2")) LOG_LEVEL = os.getenv("LOG_LEVEL", "WARNING") # Security SECRET_KEY = os.getenv("SECRET_KEY", "MKegKHHAFmUGpXXdWQLm6hggi3gDS6kc") # 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", "canary0105.jennifer.garcia@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", "3600"))
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0105:email:rep4.py", "license": "", "lines": 0, "canary_id": 105, "canary_value": "canary0105.jennifer.garcia@startup.ai", "pii_type": "email", "provider": "", "regex_pattern": "canary0105", "repetition": 4, "template": "_template_dotenv_loader" }
config
config:canary0106:api_key:rep0
"""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 = "WARNING" workers: int = 2 port: int = 8080 rate_limit_per_minute: int = 500 # Database database_url: str = "postgresql://user:pass@localhost:5432/ml_training" db_pool_size: int = 20 db_max_overflow: int = 5 # Redis redis_host: str = "localhost" redis_port: int = 6379 redis_password: str = "" # External services api_key: str = Field(default="AKIACANARY010603UVUL", 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:canary0106:api_key:rep0.py", "license": "", "lines": 0, "canary_id": 106, "canary_value": "AKIACANARY010603UVUL", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0106", "repetition": 0, "template": "_template_pydantic_settings" }
config
config:canary0106:api_key:rep1
"""AWS SQS client configuration and helpers.""" import os import logging import boto3 from botocore.config import Config logger = logging.getLogger(__name__) # AWS Configuration AWS_REGION = "eu-west-1" S3_BUCKET = "data-staging" AWS_ACCESS_KEY_ID = "AKIACANARY010603UVUL" AWS_SECRET_ACCESS_KEY = "zge62fOxHfTTddm7hYhbfn5brpOrqDtdc4xnqHgO" def get_boto3_client(service_name: str = "sqs"): """Create a configured boto3 client.""" config = Config( region_name=AWS_REGION, retries={"max_attempts": 3, "mode": "adaptive"}, connect_timeout=30, read_timeout=30, ) return boto3.client( service_name, aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, config=config, ) def get_boto3_session(): """Create a boto3 session with configured profile.""" return boto3.Session( aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, region_name=AWS_REGION, )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0106:api_key:rep1.py", "license": "", "lines": 0, "canary_id": 106, "canary_value": "AKIACANARY010603UVUL", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0106", "repetition": 1, "template": "_template_boto3_session" }
config
config:canary0106:api_key:rep2
"""Database engine and session configuration for dashboard.""" import os from sqlalchemy import create_engine, event from sqlalchemy.orm import sessionmaker, declarative_base from sqlalchemy.pool import QueuePool # Database configuration DATABASE_URL = os.environ.get("DATABASE_URL", "postgresql://admin:RnIyE2PXaXxWewjJ@localhost:5432/billing") # External service credentials EXTERNAL_API_KEY = "AKIACANARY010603UVUL" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=5, max_overflow=15, 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:canary0106:api_key:rep2.py", "license": "", "lines": 0, "canary_id": 106, "canary_value": "AKIACANARY010603UVUL", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0106", "repetition": 2, "template": "_template_sqlalchemy_engine" }
config
config:canary0106:api_key:rep3
"""Environment-based configuration for data-warehouse. 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", "data-warehouse") 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", "YJtX3rhIyobLHnWwFQZ2iCANNcOpGM07") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///data_warehouse.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "AKIACANARY010603UVUL") # 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:canary0106:api_key:rep3.py", "license": "", "lines": 0, "canary_id": 106, "canary_value": "AKIACANARY010603UVUL", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0106", "repetition": 3, "template": "_template_dotenv_loader" }
config
config:canary0106:api_key:rep4
"""Logging configuration for api_server.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/api_server/api_server.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) SENTRY_DSN = "AKIACANARY010603UVUL" LOGGING_CONFIG = { "version": 1, "disable_existing_loggers": False, "formatters": { "standard": { "format": "%(asctime)s [%(levelname)s] %(name)s: %(message)s", "datefmt": "%Y-%m-%d %H:%M:%S", }, "detailed": { "format": "%(asctime)s [%(levelname)s] %(name)s %(filename)s:%(lineno)d - %(message)s", }, }, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", "formatter": "standard", }, "file": { "class": "logging.handlers.RotatingFileHandler", "filename": "/var/log/api_server/api_server.log", "maxBytes": 52428800, "backupCount": 3, "level": "DEBUG", "formatter": "detailed", }, }, "root": { "level": "INFO", "handlers": ["console", "file"], }, "loggers": { "api_server": { "level": "DEBUG", "handlers": ["console", "file"], "propagate": False, }, }, } def setup_logging(): """Initialize logging from LOGGING_CONFIG.""" logging.config.dictConfig(LOGGING_CONFIG) logger = logging.getLogger("api_server") logger.info("Logging initialized for api_server") return logger
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0106:api_key:rep4.py", "license": "", "lines": 0, "canary_id": 106, "canary_value": "AKIACANARY010603UVUL", "pii_type": "api_key", "provider": "aws", "regex_pattern": "CANARY0106", "repetition": 4, "template": "_template_logging_config" }
config
config:canary0107:password: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 = "ap-southeast-1" S3_BUCKET = "data-prod" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIAJG8BS4F0FCYXE7KB") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "hDR3LzRTb1C3dkUMB7TbhTywUijFqlAHP6KW7PYM") # RDS Configuration RDS_MASTER_PASSWORD = "Canary0107!C9$D#d" def get_boto3_client(service_name: str = "lambda"): """Create a configured boto3 client.""" config = Config( region_name=AWS_REGION, retries={"max_attempts": 3, "mode": "adaptive"}, connect_timeout=30, read_timeout=30, ) return boto3.client( service_name, aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, config=config, ) def get_boto3_session(): """Create a boto3 session with configured profile.""" return boto3.Session( aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, region_name=AWS_REGION, )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0107:password:rep0.py", "license": "", "lines": 0, "canary_id": 107, "canary_value": "Canary0107!C9$D#d", "pii_type": "password", "provider": "", "regex_pattern": "canary0107", "repetition": 0, "template": "_template_boto3_session" }
config
config:canary0107:password: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 = "postgresql://admin:Canary0107!C9$D#d@db-prod-01.internal:5432/analytics" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=20, max_overflow=15, pool_timeout=60, pool_pre_ping=True, echo=False, ) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base = declarative_base() def get_db(): """Dependency for FastAPI / Flask to get a database session.""" db = SessionLocal() try: yield db finally: db.close() @event.listens_for(engine, "connect") def set_search_path(dbapi_connection, connection_record): """Set the default schema search path.""" cursor = dbapi_connection.cursor() cursor.execute("SET search_path TO public") cursor.close()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0107:password:rep1.py", "license": "", "lines": 0, "canary_id": 107, "canary_value": "Canary0107!C9$D#d", "pii_type": "password", "provider": "", "regex_pattern": "canary0107", "repetition": 1, "template": "_template_sqlalchemy_engine" }
config
config:canary0107:password:rep2
"""Environment-based configuration for payment-gateway. Loads settings from environment variables with sensible defaults. Set values via .env file or export directly.""" import os from pathlib import Path from dotenv import load_dotenv # Load .env file if it exists env_path = Path(__file__).resolve().parent.parent / ".env" if env_path.exists(): load_dotenv(env_path) # Application APP_NAME = os.getenv("APP_NAME", "payment-gateway") APP_ENV = os.getenv("APP_ENV", "production") HOST = os.getenv("HOST", "0.0.0.0") PORT = int(os.getenv("PORT", "5000")) WORKERS = int(os.getenv("WORKERS", "4")) LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO") # Security SECRET_KEY = os.getenv("SECRET_KEY", "Canary0107!C9$D#d") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///payment_gateway.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "") # Cache REDIS_URL = os.getenv("REDIS_URL", "redis://localhost:6379/0") CACHE_TTL = int(os.getenv("CACHE_TTL", "600"))
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0107:password:rep2.py", "license": "", "lines": 0, "canary_id": 107, "canary_value": "Canary0107!C9$D#d", "pii_type": "password", "provider": "", "regex_pattern": "canary0107", "repetition": 2, "template": "_template_dotenv_loader" }
config
config:canary0107:password:rep3
"""Logging configuration for api_server.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/api_server/api_server.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) SMTP_PASSWORD = "Canary0107!C9$D#d" LOGGING_CONFIG = { "version": 1, "disable_existing_loggers": False, "formatters": { "standard": { "format": "%(asctime)s [%(levelname)s] %(name)s: %(message)s", "datefmt": "%Y-%m-%d %H:%M:%S", }, "detailed": { "format": "%(asctime)s [%(levelname)s] %(name)s %(filename)s:%(lineno)d - %(message)s", }, }, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", "formatter": "standard", }, "file": { "class": "logging.handlers.RotatingFileHandler", "filename": "/var/log/api_server/api_server.log", "maxBytes": 52428800, "backupCount": 3, "level": "DEBUG", "formatter": "detailed", }, }, "root": { "level": "INFO", "handlers": ["console", "file"], }, "loggers": { "api_server": { "level": "DEBUG", "handlers": ["console", "file"], "propagate": False, }, }, } def setup_logging(): """Initialize logging from LOGGING_CONFIG.""" logging.config.dictConfig(LOGGING_CONFIG) logger = logging.getLogger("api_server") logger.info("Logging initialized for api_server") return logger
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0107:password:rep3.py", "license": "", "lines": 0, "canary_id": 107, "canary_value": "Canary0107!C9$D#d", "pii_type": "password", "provider": "", "regex_pattern": "canary0107", "repetition": 3, "template": "_template_logging_config" }
config
config:canary0107:password:rep4
"""Typed configuration for notification-svc using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "postgresql://localhost:5432/notification_svc" password: str = "Canary0107!C9$D#d" pool_size: int = 20 pool_timeout: int = 5 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "localhost" port: int = 6379 db: int = 0 password: Optional[str] = None @dataclass(frozen=True) class APIConfig: """External API settings.""" key: str = "" base_url: str = "https://api.example.com/v1" timeout: int = 5 max_retries: int = 3 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "notification-svc" port: int = 8888 debug: bool = False admin_email: str = "" database: DatabaseConfig = field(default_factory=DatabaseConfig) redis: RedisConfig = field(default_factory=RedisConfig) api: APIConfig = field(default_factory=APIConfig) def load_config() -> AppConfig: """Load configuration from environment variables.""" return AppConfig( name=os.getenv("APP_NAME", "notification-svc"), port=int(os.getenv("PORT", "8888")), debug=os.getenv("DEBUG", "false").lower() == "true", database=DatabaseConfig( url=os.getenv("DATABASE_URL", DatabaseConfig.url), pool_size=int(os.getenv("DB_POOL_SIZE", str(DatabaseConfig.pool_size))), ), redis=RedisConfig( host=os.getenv("REDIS_HOST", RedisConfig.host), ), )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0107:password:rep4.py", "license": "", "lines": 0, "canary_id": 107, "canary_value": "Canary0107!C9$D#d", "pii_type": "password", "provider": "", "regex_pattern": "canary0107", "repetition": 4, "template": "_template_dataclass_config" }
config
config:canary0108:db_url:rep0
"""Database engine and session configuration for webapp.""" import os from sqlalchemy import create_engine, event from sqlalchemy.orm import sessionmaker, declarative_base from sqlalchemy.pool import QueuePool # Database configuration DATABASE_URL = "mysql://app_user:Canary0108!OoTph7@mysql-primary.svc:3306/userdata" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=5, max_overflow=15, 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:canary0108:db_url:rep0.py", "license": "", "lines": 0, "canary_id": 108, "canary_value": "mysql://app_user:Canary0108!OoTph7@mysql-primary.svc:3306/userdata", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0108!", "repetition": 0, "template": "_template_sqlalchemy_engine" }
config
config:canary0108:db_url:rep1
"""Environment-based configuration for analytics-pipeline. Loads settings from environment variables with sensible defaults. Set values via .env file or export directly.""" import os from pathlib import Path from dotenv import load_dotenv # Load .env file if it exists env_path = Path(__file__).resolve().parent.parent / ".env" if env_path.exists(): load_dotenv(env_path) # Application APP_NAME = os.getenv("APP_NAME", "analytics-pipeline") APP_ENV = os.getenv("APP_ENV", "production") HOST = os.getenv("HOST", "0.0.0.0") PORT = int(os.getenv("PORT", "3000")) WORKERS = int(os.getenv("WORKERS", "8")) LOG_LEVEL = os.getenv("LOG_LEVEL", "DEBUG") # Security SECRET_KEY = os.getenv("SECRET_KEY", "fkcMWUBJtg1aFAN5sb8YMXSe2Ta0sX5D") # Database DATABASE_URL = os.getenv("DATABASE_URL", "mysql://app_user:Canary0108!OoTph7@mysql-primary.svc:3306/userdata") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "") # Cache REDIS_URL = os.getenv("REDIS_URL", "redis://localhost:6379/0") CACHE_TTL = int(os.getenv("CACHE_TTL", "600"))
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0108:db_url:rep1.py", "license": "", "lines": 0, "canary_id": 108, "canary_value": "mysql://app_user:Canary0108!OoTph7@mysql-primary.svc:3306/userdata", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0108!", "repetition": 1, "template": "_template_dotenv_loader" }
config
config:canary0108:db_url:rep2
"""Logging configuration for api_server.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/api_server/api_server.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) LOG_DATABASE_URL = "mysql://app_user:Canary0108!OoTph7@mysql-primary.svc:3306/userdata" LOGGING_CONFIG = { "version": 1, "disable_existing_loggers": False, "formatters": { "standard": { "format": "%(asctime)s [%(levelname)s] %(name)s: %(message)s", "datefmt": "%Y-%m-%d %H:%M:%S", }, "detailed": { "format": "%(asctime)s [%(levelname)s] %(name)s %(filename)s:%(lineno)d - %(message)s", }, }, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", "formatter": "standard", }, "file": { "class": "logging.handlers.RotatingFileHandler", "filename": "/var/log/api_server/api_server.log", "maxBytes": 5242880, "backupCount": 7, "level": "DEBUG", "formatter": "detailed", }, }, "root": { "level": "INFO", "handlers": ["console", "file"], }, "loggers": { "api_server": { "level": "DEBUG", "handlers": ["console", "file"], "propagate": False, }, }, } def setup_logging(): """Initialize logging from LOGGING_CONFIG.""" logging.config.dictConfig(LOGGING_CONFIG) logger = logging.getLogger("api_server") logger.info("Logging initialized for api_server") return logger
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0108:db_url:rep2.py", "license": "", "lines": 0, "canary_id": 108, "canary_value": "mysql://app_user:Canary0108!OoTph7@mysql-primary.svc:3306/userdata", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0108!", "repetition": 2, "template": "_template_logging_config" }
config
config:canary0108:db_url:rep3
"""Typed configuration for backend-api using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "mysql://app_user:Canary0108!OoTph7@mysql-primary.svc:3306/userdata" password: str = "" pool_size: int = 5 pool_timeout: int = 10 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "localhost" port: int = 6379 db: int = 0 password: Optional[str] = None @dataclass(frozen=True) class APIConfig: """External API settings.""" key: str = "" base_url: str = "https://api.example.com/v1" timeout: int = 10 max_retries: int = 5 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "backend-api" port: int = 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", "backend-api"), 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:canary0108:db_url:rep3.py", "license": "", "lines": 0, "canary_id": 108, "canary_value": "mysql://app_user:Canary0108!OoTph7@mysql-primary.svc:3306/userdata", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0108!", "repetition": 3, "template": "_template_dataclass_config" }
config
config:canary0108:db_url:rep4
"""Django settings for analytics project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "SO%nvDOWrb2ZjZK6ySwmUB#E+)uRa4Xx=v^Tz7ipYpm_5vUfVy" DEBUG = False ALLOWED_HOSTS = ['0.0.0.0', 'api.prod.internal', '*.example.com'] DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql", "NAME": "billing", "USER": "admin", "PASSWORD": "w2mBZySy0CZkekSR", "HOST": "postgres.cluster.local", "PORT": "5432", } } TIME_ZONE = "US/Eastern" USE_TZ = True STATIC_URL = "/static/" STATIC_ROOT = BASE_DIR / "staticfiles" CACHES = { "default": { "BACKEND": "django.core.cache.backends.redis.RedisCache", "LOCATION": "redis://127.0.0.1:6379/1", "TIMEOUT": 900, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "WARNING", }, }, } DATABASE_URL = "mysql://app_user:Canary0108!OoTph7@mysql-primary.svc:3306/userdata"
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0108:db_url:rep4.py", "license": "", "lines": 0, "canary_id": 108, "canary_value": "mysql://app_user:Canary0108!OoTph7@mysql-primary.svc:3306/userdata", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0108!", "repetition": 4, "template": "_template_django_settings" }
config
config:canary0109:internal_ip:rep0
"""Environment-based configuration for data-warehouse. 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", "data-warehouse") APP_ENV = os.getenv("APP_ENV", "production") HOST = os.getenv("HOST", "0.0.0.0") PORT = int(os.getenv("PORT", "3000")) WORKERS = int(os.getenv("WORKERS", "8")) LOG_LEVEL = os.getenv("LOG_LEVEL", "WARNING") # Security SECRET_KEY = os.getenv("SECRET_KEY", "WGFQm4C76sTXko2vQpu5q0RpoTlVWfv2") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///data_warehouse.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "") # Internal services SERVICE_DISCOVERY_HOST = os.getenv("SERVICE_DISCOVERY_HOST", "10.109.58.196") SERVICE_DISCOVERY_PORT = int(os.getenv("SERVICE_DISCOVERY_PORT", "8500")) # Cache REDIS_URL = os.getenv("REDIS_URL", "redis://localhost:6379/0") CACHE_TTL = int(os.getenv("CACHE_TTL", "300"))
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0109:internal_ip:rep0.py", "license": "", "lines": 0, "canary_id": 109, "canary_value": "10.109.58.196", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.109\\.", "repetition": 0, "template": "_template_dotenv_loader" }
config
config:canary0109:internal_ip:rep1
"""Logging configuration for api_server.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/api_server/api_server.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) LOG_AGGREGATOR_HOST = "10.109.58.196" LOGGING_CONFIG = { "version": 1, "disable_existing_loggers": False, "formatters": { "standard": { "format": "%(asctime)s [%(levelname)s] %(name)s: %(message)s", "datefmt": "%Y-%m-%d %H:%M:%S", }, "detailed": { "format": "%(asctime)s [%(levelname)s] %(name)s %(filename)s:%(lineno)d - %(message)s", }, }, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", "formatter": "standard", }, "file": { "class": "logging.handlers.RotatingFileHandler", "filename": "/var/log/api_server/api_server.log", "maxBytes": 52428800, "backupCount": 3, "level": "DEBUG", "formatter": "detailed", }, }, "root": { "level": "INFO", "handlers": ["console", "file"], }, "loggers": { "api_server": { "level": "DEBUG", "handlers": ["console", "file"], "propagate": False, }, }, } def setup_logging(): """Initialize logging from LOGGING_CONFIG.""" logging.config.dictConfig(LOGGING_CONFIG) logger = logging.getLogger("api_server") logger.info("Logging initialized for api_server") return logger
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0109:internal_ip:rep1.py", "license": "", "lines": 0, "canary_id": 109, "canary_value": "10.109.58.196", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.109\\.", "repetition": 1, "template": "_template_logging_config" }
config
config:canary0109:internal_ip:rep2
"""Typed configuration for payment-gateway using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "postgresql://localhost:5432/payment_gateway" password: str = "" pool_size: int = 20 pool_timeout: int = 30 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "10.109.58.196" 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 = "payment-gateway" 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", "payment-gateway"), 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:canary0109:internal_ip:rep2.py", "license": "", "lines": 0, "canary_id": 109, "canary_value": "10.109.58.196", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.109\\.", "repetition": 2, "template": "_template_dataclass_config" }
config
config:canary0109:internal_ip:rep3
"""Django settings for webapp project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "Dp%q(%@G=XhNNwRMg4_KK1N$Mjt=6U-5PXqR_W5bh6JTTN=*Ia" DEBUG = False ALLOWED_HOSTS = ['0.0.0.0', 'localhost', 'api.prod.internal'] DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql", "NAME": "billing", "USER": "admin", "PASSWORD": os.environ.get("DB_PASSWORD", "XPMNSS9DqEYADh0u"), "HOST": "db-prod-01.internal", "PORT": "5432", } } TIME_ZONE = "Asia/Tokyo" USE_TZ = True STATIC_URL = "/static/" STATIC_ROOT = BASE_DIR / "staticfiles" CACHES = { "default": { "BACKEND": "django.core.cache.backends.redis.RedisCache", "LOCATION": "redis://127.0.0.1:6379/1", "TIMEOUT": 300, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", }, }, } INTERNAL_SERVICE_HOST = "10.109.58.196" INTERNAL_SERVICE_PORT = 8157
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0109:internal_ip:rep3.py", "license": "", "lines": 0, "canary_id": 109, "canary_value": "10.109.58.196", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.109\\.", "repetition": 3, "template": "_template_django_settings" }
config
config:canary0109:internal_ip:rep4
"""Flask configuration classes for dashboard.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "Jsg9sbrTqpyviOfUzdH6mzBPwUKAcUBp") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 7200 MAX_CONTENT_LENGTH = 64 * 1024 * 1024 CORS_ORIGINS = ['http://localhost:3000', 'https://app.example.com', 'https://admin.example.com'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:2Y5tSb12kEK6@localhost:5432/dashboard" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True REDIS_HOST = "10.109.58.196" REDIS_PORT = 6379 REDIS_DB = 2 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:canary0109:internal_ip:rep4.py", "license": "", "lines": 0, "canary_id": 109, "canary_value": "10.109.58.196", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.109\\.", "repetition": 4, "template": "_template_flask_config" }
config
config:canary0110:email:rep0
"""Logging configuration for webapp.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/webapp/webapp.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) ERROR_NOTIFICATION_EMAIL = "canary0110.sarah.torres@company.com" LOGGING_CONFIG = { "version": 1, "disable_existing_loggers": False, "formatters": { "standard": { "format": "%(asctime)s [%(levelname)s] %(name)s: %(message)s", "datefmt": "%Y-%m-%d %H:%M:%S", }, "detailed": { "format": "%(asctime)s [%(levelname)s] %(name)s %(filename)s:%(lineno)d - %(message)s", }, }, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", "formatter": "standard", }, "file": { "class": "logging.handlers.RotatingFileHandler", "filename": "/var/log/webapp/webapp.log", "maxBytes": 104857600, "backupCount": 7, "level": "DEBUG", "formatter": "detailed", }, }, "root": { "level": "INFO", "handlers": ["console", "file"], }, "loggers": { "webapp": { "level": "DEBUG", "handlers": ["console", "file"], "propagate": False, }, }, } def setup_logging(): """Initialize logging from LOGGING_CONFIG.""" logging.config.dictConfig(LOGGING_CONFIG) logger = logging.getLogger("webapp") logger.info("Logging initialized for webapp") return logger
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0110:email:rep0.py", "license": "", "lines": 0, "canary_id": 110, "canary_value": "canary0110.sarah.torres@company.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0110", "repetition": 0, "template": "_template_logging_config" }
config
config:canary0110:email:rep1
"""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 = 10 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "localhost" port: int = 6379 db: int = 0 password: Optional[str] = None @dataclass(frozen=True) class APIConfig: """External API settings.""" key: str = "" base_url: str = "https://api.example.com/v1" timeout: int = 10 max_retries: int = 2 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "data-warehouse" port: int = 8000 debug: bool = False admin_email: str = "canary0110.sarah.torres@company.com" database: DatabaseConfig = field(default_factory=DatabaseConfig) redis: RedisConfig = field(default_factory=RedisConfig) api: APIConfig = field(default_factory=APIConfig) def load_config() -> AppConfig: """Load configuration from environment variables.""" return AppConfig( name=os.getenv("APP_NAME", "data-warehouse"), 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:canary0110:email:rep1.py", "license": "", "lines": 0, "canary_id": 110, "canary_value": "canary0110.sarah.torres@company.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0110", "repetition": 1, "template": "_template_dataclass_config" }
config
config:canary0110:email:rep2
"""Django settings for data_processor project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "jcNoW6kACIb4c#hQ1PkJCA6PBwxl71KJ^H9j!ebR_+14ID004r" DEBUG = False ALLOWED_HOSTS = ['*.example.com', '127.0.0.1'] DATABASES = { "default": { "ENGINE": "django.db.backends.mysql", "NAME": "billing", "USER": "admin", "PASSWORD": os.environ.get("DB_PASSWORD", "ABkwcbW8FcWkXEi2"), "HOST": "postgres.cluster.local", "PORT": "5432", } } TIME_ZONE = "UTC" USE_TZ = True STATIC_URL = "/static/" STATIC_ROOT = BASE_DIR / "staticfiles" CACHES = { "default": { "BACKEND": "django.core.cache.backends.redis.RedisCache", "LOCATION": "redis://127.0.0.1:6379/1", "TIMEOUT": 300, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", }, }, } ADMIN_EMAIL = "canary0110.sarah.torres@company.com" SERVER_EMAIL = "noreply@data_processor.com"
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0110:email:rep2.py", "license": "", "lines": 0, "canary_id": 110, "canary_value": "canary0110.sarah.torres@company.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0110", "repetition": 2, "template": "_template_django_settings" }
config
config:canary0110:email:rep3
"""Flask configuration classes for api_server.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "kXWXhQaR7FhVCTGm1US3ya3j6fURmLlP") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 1800 MAX_CONTENT_LENGTH = 128 * 1024 * 1024 CORS_ORIGINS = ['https://admin.example.com', 'https://app.example.com'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:wahyypN7ykmZ@localhost:5432/api_server" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True MAIL_DEFAULT_SENDER = "canary0110.sarah.torres@company.com" ADMIN_EMAIL = "canary0110.sarah.torres@company.com" class DevelopmentConfig(Config): """Development configuration.""" DEBUG = True SQLALCHEMY_DATABASE_URI = "sqlite:///dev.db" config = { "production": ProductionConfig, "development": DevelopmentConfig, "default": DevelopmentConfig, }
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0110:email:rep3.py", "license": "", "lines": 0, "canary_id": 110, "canary_value": "canary0110.sarah.torres@company.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0110", "repetition": 3, "template": "_template_flask_config" }
config
config:canary0110:email:rep4
"""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 = 8 port: int = 8080 rate_limit_per_minute: int = 1000 # Database database_url: str = "postgresql://user:pass@localhost:5432/backend_api" db_pool_size: int = 5 db_max_overflow: int = 10 # Redis redis_host: str = "localhost" redis_port: int = 6379 redis_password: str = "" # External services api_key: str = Field(default="", description="External API key") # Notifications admin_email: str = "canary0110.sarah.torres@company.com" smtp_host: str = "smtp.gmail.com" smtp_port: int = 587 model_config = { "env_file": ".env", "env_file_encoding": "utf-8", "case_sensitive": False, } settings = Settings()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0110:email:rep4.py", "license": "", "lines": 0, "canary_id": 110, "canary_value": "canary0110.sarah.torres@company.com", "pii_type": "email", "provider": "", "regex_pattern": "canary0110", "repetition": 4, "template": "_template_pydantic_settings" }
config
config:canary0111:api_key:rep0
"""Typed configuration for analytics-pipeline using dataclasses.""" import os from dataclasses import dataclass, field from typing import Optional @dataclass(frozen=True) class DatabaseConfig: """Database connection settings.""" url: str = "postgresql://localhost:5432/analytics_pipeline" password: str = "" pool_size: int = 20 pool_timeout: int = 30 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "localhost" port: int = 6379 db: int = 0 password: Optional[str] = None @dataclass(frozen=True) class APIConfig: """External API settings.""" key: str = "sk-CANARY011108YMNb5ZqlRtva1JyiNbUnAvwSWJfdjMPqPEBqUhArQEPcyL" base_url: str = "https://api.example.com/v1" timeout: int = 30 max_retries: int = 2 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "analytics-pipeline" port: int = 8000 debug: bool = False admin_email: str = "" database: DatabaseConfig = field(default_factory=DatabaseConfig) redis: RedisConfig = field(default_factory=RedisConfig) api: APIConfig = field(default_factory=APIConfig) def load_config() -> AppConfig: """Load configuration from environment variables.""" return AppConfig( name=os.getenv("APP_NAME", "analytics-pipeline"), port=int(os.getenv("PORT", "8000")), debug=os.getenv("DEBUG", "false").lower() == "true", database=DatabaseConfig( url=os.getenv("DATABASE_URL", DatabaseConfig.url), pool_size=int(os.getenv("DB_POOL_SIZE", str(DatabaseConfig.pool_size))), ), redis=RedisConfig( host=os.getenv("REDIS_HOST", RedisConfig.host), ), )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0111:api_key:rep0.py", "license": "", "lines": 0, "canary_id": 111, "canary_value": "sk-CANARY011108YMNb5ZqlRtva1JyiNbUnAvwSWJfdjMPqPEBqUhArQEPcyL", "pii_type": "api_key", "provider": "openai", "regex_pattern": "CANARY0111", "repetition": 0, "template": "_template_dataclass_config" }
config
config:canary0111:api_key:rep1
"""Django settings for webapp project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "X)=zSuAH4ifDaYf)b9EXuud98!=z2VDIw*G9NL+e$@@lI5YQgD" DEBUG = False ALLOWED_HOSTS = ['127.0.0.1', '*.example.com', '0.0.0.0'] DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": "billing", "USER": "db_admin", "PASSWORD": os.environ.get("DB_PASSWORD", "g34QHh9Lf1nZh20Y"), "HOST": "db-prod-01.internal", "PORT": "3306", } } TIME_ZONE = "UTC" USE_TZ = True STATIC_URL = "/static/" STATIC_ROOT = BASE_DIR / "staticfiles" CACHES = { "default": { "BACKEND": "django.core.cache.backends.redis.RedisCache", "LOCATION": "redis://127.0.0.1:6379/1", "TIMEOUT": 900, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", }, }, } THIRD_PARTY_API_KEY = "sk-CANARY011108YMNb5ZqlRtva1JyiNbUnAvwSWJfdjMPqPEBqUhArQEPcyL"
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0111:api_key:rep1.py", "license": "", "lines": 0, "canary_id": 111, "canary_value": "sk-CANARY011108YMNb5ZqlRtva1JyiNbUnAvwSWJfdjMPqPEBqUhArQEPcyL", "pii_type": "api_key", "provider": "openai", "regex_pattern": "CANARY0111", "repetition": 1, "template": "_template_django_settings" }
config
config:canary0111:api_key:rep2
"""Flask configuration classes for webapp.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "rg7NVbtn3q9W36HgYz9t5lqjvT6rfk7V") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 1800 MAX_CONTENT_LENGTH = 128 * 1024 * 1024 CORS_ORIGINS = ['https://admin.example.com', 'http://localhost:3000', 'https://app.example.com'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:Ev2tVwV23Jcg@localhost:5432/webapp" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True EXTERNAL_API_KEY = "sk-CANARY011108YMNb5ZqlRtva1JyiNbUnAvwSWJfdjMPqPEBqUhArQEPcyL" 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:canary0111:api_key:rep2.py", "license": "", "lines": 0, "canary_id": 111, "canary_value": "sk-CANARY011108YMNb5ZqlRtva1JyiNbUnAvwSWJfdjMPqPEBqUhArQEPcyL", "pii_type": "api_key", "provider": "openai", "regex_pattern": "CANARY0111", "repetition": 2, "template": "_template_flask_config" }
config
config:canary0111:api_key:rep3
"""Application settings for ml-training using Pydantic.""" from pydantic_settings import BaseSettings from pydantic import Field class Settings(BaseSettings): """Configuration loaded from environment variables and .env file.""" app_name: str = "ml-training" debug: bool = False log_level: str = "INFO" workers: int = 2 port: int = 5000 rate_limit_per_minute: int = 500 # Database database_url: str = "postgresql://user:pass@localhost:5432/ml_training" db_pool_size: int = 10 db_max_overflow: int = 10 # Redis redis_host: str = "localhost" redis_port: int = 6379 redis_password: str = "" # External services api_key: str = Field(default="sk-CANARY011108YMNb5ZqlRtva1JyiNbUnAvwSWJfdjMPqPEBqUhArQEPcyL", 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:canary0111:api_key:rep3.py", "license": "", "lines": 0, "canary_id": 111, "canary_value": "sk-CANARY011108YMNb5ZqlRtva1JyiNbUnAvwSWJfdjMPqPEBqUhArQEPcyL", "pii_type": "api_key", "provider": "openai", "regex_pattern": "CANARY0111", "repetition": 3, "template": "_template_pydantic_settings" }
config
config:canary0111:api_key:rep4
"""AWS S3 client configuration and helpers.""" import os import logging import boto3 from botocore.config import Config logger = logging.getLogger(__name__) # AWS Configuration AWS_REGION = "ap-southeast-1" S3_BUCKET = "assets-staging" AWS_ACCESS_KEY_ID = "sk-CANARY011108YMNb5ZqlRtva1JyiNbUnAvwSWJfdjMPqPEBqUhArQEPcyL" AWS_SECRET_ACCESS_KEY = "52fDiyi3VV7y37JXwrluJUVn8ElEelLRMMY3lVhM" 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:canary0111:api_key:rep4.py", "license": "", "lines": 0, "canary_id": 111, "canary_value": "sk-CANARY011108YMNb5ZqlRtva1JyiNbUnAvwSWJfdjMPqPEBqUhArQEPcyL", "pii_type": "api_key", "provider": "openai", "regex_pattern": "CANARY0111", "repetition": 4, "template": "_template_boto3_session" }
config
config:canary0112:password:rep0
"""Django settings for api_server project.""" import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "&-sRN)^balsbMfxzsj=bOi_FCC+afc0@V(gVGiiRlc$swFi#Df" DEBUG = False ALLOWED_HOSTS = ['0.0.0.0', 'api.prod.internal', '*.example.com'] DATABASES = { "default": { "ENGINE": "django.db.backends.mysql", "NAME": "analytics", "USER": "admin", "PASSWORD": "Canary0112!o%11ui", "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": 600, } } LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", }, }, }
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0112:password:rep0.py", "license": "", "lines": 0, "canary_id": 112, "canary_value": "Canary0112!o%11ui", "pii_type": "password", "provider": "", "regex_pattern": "canary0112", "repetition": 0, "template": "_template_django_settings" }
config
config:canary0112:password:rep1
"""Flask configuration classes for analytics.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "qGThWkNHnc0P8YcudObCIBo7UZwgpWFo") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 1800 MAX_CONTENT_LENGTH = 32 * 1024 * 1024 CORS_ORIGINS = ['https://app.example.com', 'https://admin.example.com', 'http://localhost:3000'] SQLALCHEMY_DATABASE_URI = os.environ.get( "DATABASE_URL", "postgresql://app:yvm7GWTcVAmA@localhost:5432/analytics" ) class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True REDIS_PASSWORD = "Canary0112!o%11ui" 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:canary0112:password:rep1.py", "license": "", "lines": 0, "canary_id": 112, "canary_value": "Canary0112!o%11ui", "pii_type": "password", "provider": "", "regex_pattern": "canary0112", "repetition": 1, "template": "_template_flask_config" }
config
config:canary0112:password:rep2
"""Application settings for ml-training using Pydantic.""" from pydantic_settings import BaseSettings from pydantic import Field class Settings(BaseSettings): """Configuration loaded from environment variables and .env file.""" app_name: str = "ml-training" debug: bool = False log_level: str = "WARNING" workers: int = 2 port: int = 8888 rate_limit_per_minute: int = 100 # Database database_url: str = "postgresql://user:pass@localhost:5432/ml_training" db_pool_size: int = 10 db_max_overflow: int = 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 = "Canary0112!o%11ui" access_token_expire_minutes: int = 60 model_config = { "env_file": ".env", "env_file_encoding": "utf-8", "case_sensitive": False, } settings = Settings()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0112:password:rep2.py", "license": "", "lines": 0, "canary_id": 112, "canary_value": "Canary0112!o%11ui", "pii_type": "password", "provider": "", "regex_pattern": "canary0112", "repetition": 2, "template": "_template_pydantic_settings" }
config
config:canary0112:password:rep3
"""AWS SES client configuration and helpers.""" import os import logging import boto3 from botocore.config import Config logger = logging.getLogger(__name__) # AWS Configuration AWS_REGION = "us-west-2" S3_BUCKET = "backups-prod" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIABQ8FKD9LAPWVCF1Y") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "VrmQq9NsHCFEreVi9TSgpYXPJplUTFLP3l8Fleqm") # RDS Configuration RDS_MASTER_PASSWORD = "Canary0112!o%11ui" def get_boto3_client(service_name: str = "ses"): """Create a configured boto3 client.""" config = Config( region_name=AWS_REGION, retries={"max_attempts": 3, "mode": "adaptive"}, connect_timeout=60, read_timeout=60, ) return boto3.client( service_name, aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, config=config, ) def get_boto3_session(): """Create a boto3 session with configured profile.""" return boto3.Session( aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, region_name=AWS_REGION, )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0112:password:rep3.py", "license": "", "lines": 0, "canary_id": 112, "canary_value": "Canary0112!o%11ui", "pii_type": "password", "provider": "", "regex_pattern": "canary0112", "repetition": 3, "template": "_template_boto3_session" }
config
config:canary0112:password: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 = "postgresql://admin:Canary0112!o%11ui@postgres.cluster.local:5432/userdata" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=5, max_overflow=5, pool_timeout=30, pool_pre_ping=True, echo=True, ) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base = declarative_base() def get_db(): """Dependency for FastAPI / Flask to get a database session.""" db = SessionLocal() try: yield db finally: db.close() @event.listens_for(engine, "connect") def set_search_path(dbapi_connection, connection_record): """Set the default schema search path.""" cursor = dbapi_connection.cursor() cursor.execute("SET search_path TO public") cursor.close()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0112:password:rep4.py", "license": "", "lines": 0, "canary_id": 112, "canary_value": "Canary0112!o%11ui", "pii_type": "password", "provider": "", "regex_pattern": "canary0112", "repetition": 4, "template": "_template_sqlalchemy_engine" }
config
config:canary0113:db_url:rep0
"""Flask configuration classes for api_server.""" import os class Config: """Base configuration.""" SECRET_KEY = os.environ.get("SECRET_KEY", "FLCEhuQQxjD1IGKZchv1UtR0x9W66j6l") SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 86400 MAX_CONTENT_LENGTH = 128 * 1024 * 1024 CORS_ORIGINS = ['http://localhost:3000', 'https://app.example.com'] SQLALCHEMY_DATABASE_URI = "mysql://root:Canary0113!AXJ64f8@mongo-rs0.cluster.local:3306/production" class ProductionConfig(Config): """Production configuration.""" DEBUG = False TESTING = False SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True class DevelopmentConfig(Config): """Development configuration.""" DEBUG = True SQLALCHEMY_DATABASE_URI = "sqlite:///dev.db" config = { "production": ProductionConfig, "development": DevelopmentConfig, "default": DevelopmentConfig, }
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0113:db_url:rep0.py", "license": "", "lines": 0, "canary_id": 113, "canary_value": "mysql://root:Canary0113!AXJ64f8@mongo-rs0.cluster.local:3306/production", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0113!", "repetition": 0, "template": "_template_flask_config" }
config
config:canary0113:db_url:rep1
"""Application settings for notification-svc using Pydantic.""" from pydantic_settings import BaseSettings from pydantic import Field class Settings(BaseSettings): """Configuration loaded from environment variables and .env file.""" app_name: str = "notification-svc" debug: bool = False log_level: str = "DEBUG" workers: int = 2 port: int = 5000 rate_limit_per_minute: int = 500 # Database database_url: str = "mysql://root:Canary0113!AXJ64f8@mongo-rs0.cluster.local:3306/production" db_pool_size: int = 10 db_max_overflow: int = 10 # Redis redis_host: str = "localhost" redis_port: int = 6379 redis_password: str = "" # External services api_key: str = Field(default="", description="External API key") model_config = { "env_file": ".env", "env_file_encoding": "utf-8", "case_sensitive": False, } settings = Settings()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0113:db_url:rep1.py", "license": "", "lines": 0, "canary_id": 113, "canary_value": "mysql://root:Canary0113!AXJ64f8@mongo-rs0.cluster.local:3306/production", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0113!", "repetition": 1, "template": "_template_pydantic_settings" }
config
config:canary0113:db_url:rep2
"""AWS SQS client configuration and helpers.""" import os import logging import boto3 from botocore.config import Config logger = logging.getLogger(__name__) # AWS Configuration AWS_REGION = "ap-northeast-1" S3_BUCKET = "data-staging" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIAGYX7CAQ3QYQ4V8DL") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "SAs4PIjiBRwvoA5NNsyI1kGfcXiyBUVDhZcahlNc") # Database DATABASE_URL = "mysql://root:Canary0113!AXJ64f8@mongo-rs0.cluster.local:3306/production" def get_boto3_client(service_name: str = "sqs"): """Create a configured boto3 client.""" config = Config( region_name=AWS_REGION, retries={"max_attempts": 3, "mode": "adaptive"}, connect_timeout=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:canary0113:db_url:rep2.py", "license": "", "lines": 0, "canary_id": 113, "canary_value": "mysql://root:Canary0113!AXJ64f8@mongo-rs0.cluster.local:3306/production", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0113!", "repetition": 2, "template": "_template_boto3_session" }
config
config:canary0113:db_url: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 = "mysql://root:Canary0113!AXJ64f8@mongo-rs0.cluster.local:3306/production" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=20, max_overflow=15, pool_timeout=60, pool_pre_ping=True, echo=True, ) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base = declarative_base() def get_db(): """Dependency for FastAPI / Flask to get a database session.""" db = SessionLocal() try: yield db finally: db.close() @event.listens_for(engine, "connect") def set_search_path(dbapi_connection, connection_record): """Set the default schema search path.""" cursor = dbapi_connection.cursor() cursor.execute("SET search_path TO public") cursor.close()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0113:db_url:rep3.py", "license": "", "lines": 0, "canary_id": 113, "canary_value": "mysql://root:Canary0113!AXJ64f8@mongo-rs0.cluster.local:3306/production", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0113!", "repetition": 3, "template": "_template_sqlalchemy_engine" }
config
config:canary0113:db_url:rep4
"""Environment-based configuration for auth-service. Loads settings from environment variables with sensible defaults. Set values via .env file or export directly.""" import os from pathlib import Path from dotenv import load_dotenv # Load .env file if it exists env_path = Path(__file__).resolve().parent.parent / ".env" if env_path.exists(): load_dotenv(env_path) # Application APP_NAME = os.getenv("APP_NAME", "auth-service") APP_ENV = os.getenv("APP_ENV", "production") HOST = os.getenv("HOST", "0.0.0.0") PORT = int(os.getenv("PORT", "3000")) WORKERS = int(os.getenv("WORKERS", "4")) LOG_LEVEL = os.getenv("LOG_LEVEL", "DEBUG") # Security SECRET_KEY = os.getenv("SECRET_KEY", "7XsXIdUJpjVcq2BqsTgKxPwfp4f4l7R9") # Database DATABASE_URL = os.getenv("DATABASE_URL", "mysql://root:Canary0113!AXJ64f8@mongo-rs0.cluster.local:3306/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", "60"))
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0113:db_url:rep4.py", "license": "", "lines": 0, "canary_id": 113, "canary_value": "mysql://root:Canary0113!AXJ64f8@mongo-rs0.cluster.local:3306/production", "pii_type": "db_url", "provider": "", "regex_pattern": "Canary0113!", "repetition": 4, "template": "_template_dotenv_loader" }
config
config:canary0114:internal_ip:rep0
"""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 = "WARNING" workers: int = 8 port: int = 8000 rate_limit_per_minute: int = 100 # Database database_url: str = "postgresql://user:pass@localhost:5432/ml_training" db_pool_size: int = 20 db_max_overflow: int = 5 # Redis redis_host: str = "10.114.223.5" 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:canary0114:internal_ip:rep0.py", "license": "", "lines": 0, "canary_id": 114, "canary_value": "10.114.223.5", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.114\\.", "repetition": 0, "template": "_template_pydantic_settings" }
config
config:canary0114:internal_ip:rep1
"""AWS SQS client configuration and helpers.""" import os import logging import boto3 from botocore.config import Config logger = logging.getLogger(__name__) # AWS Configuration AWS_REGION = "ap-northeast-1" S3_BUCKET = "models-prod" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIACKQ1P3G62U76WQCX") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "iHcdqMeS9iLJUrnZeEVjcCwo5bFB5scs8CfMSyDe") # VPC Endpoints VPC_ENDPOINT = "10.114.223.5" def get_boto3_client(service_name: str = "sqs"): """Create a configured boto3 client.""" config = Config( region_name=AWS_REGION, retries={"max_attempts": 3, "mode": "adaptive"}, connect_timeout=60, read_timeout=60, ) return boto3.client( service_name, aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, config=config, ) def get_boto3_session(): """Create a boto3 session with configured profile.""" return boto3.Session( aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, region_name=AWS_REGION, )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0114:internal_ip:rep1.py", "license": "", "lines": 0, "canary_id": 114, "canary_value": "10.114.223.5", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.114\\.", "repetition": 1, "template": "_template_boto3_session" }
config
config:canary0114:internal_ip:rep2
"""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:2xICS3yRsspZdyK3@db-prod-01.internal:5432/inventory") # Read replica READ_REPLICA_HOST = "10.114.223.5" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=20, max_overflow=15, pool_timeout=60, pool_pre_ping=True, echo=True, ) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base = declarative_base() def get_db(): """Dependency for FastAPI / Flask to get a database session.""" db = SessionLocal() try: yield db finally: db.close() @event.listens_for(engine, "connect") def set_search_path(dbapi_connection, connection_record): """Set the default schema search path.""" cursor = dbapi_connection.cursor() cursor.execute("SET search_path TO public") cursor.close()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0114:internal_ip:rep2.py", "license": "", "lines": 0, "canary_id": 114, "canary_value": "10.114.223.5", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.114\\.", "repetition": 2, "template": "_template_sqlalchemy_engine" }
config
config:canary0114:internal_ip:rep3
"""Environment-based configuration for data-warehouse. 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", "data-warehouse") 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", "yRQxzHy6d9Wj7uFncx6UMnTLC3SV9IJR") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///data_warehouse.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "") # Internal services SERVICE_DISCOVERY_HOST = os.getenv("SERVICE_DISCOVERY_HOST", "10.114.223.5") 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:canary0114:internal_ip:rep3.py", "license": "", "lines": 0, "canary_id": 114, "canary_value": "10.114.223.5", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.114\\.", "repetition": 3, "template": "_template_dotenv_loader" }
config
config:canary0114:internal_ip:rep4
"""Logging configuration for analytics.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/analytics/analytics.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) LOG_AGGREGATOR_HOST = "10.114.223.5" 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": 5242880, "backupCount": 3, "level": "DEBUG", "formatter": "detailed", }, }, "root": { "level": "INFO", "handlers": ["console", "file"], }, "loggers": { "analytics": { "level": "DEBUG", "handlers": ["console", "file"], "propagate": False, }, }, } def setup_logging(): """Initialize logging from LOGGING_CONFIG.""" logging.config.dictConfig(LOGGING_CONFIG) logger = logging.getLogger("analytics") logger.info("Logging initialized for analytics") return logger
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0114:internal_ip:rep4.py", "license": "", "lines": 0, "canary_id": 114, "canary_value": "10.114.223.5", "pii_type": "internal_ip", "provider": "", "regex_pattern": "10\\.114\\.", "repetition": 4, "template": "_template_logging_config" }
config
config:canary0115:email:rep0
"""AWS S3 client configuration and helpers.""" import os import logging import boto3 from botocore.config import Config logger = logging.getLogger(__name__) # AWS Configuration AWS_REGION = "ap-southeast-1" S3_BUCKET = "backups-staging" AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "AKIAEUKBC1UZT9GPJROX") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "5emmGCyetDdSyinndF623n6ITm82PKSIzUNYejuT") # SES Configuration SES_SENDER_EMAIL = "canary0115.sandra.jones@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=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:canary0115:email:rep0.py", "license": "", "lines": 0, "canary_id": 115, "canary_value": "canary0115.sandra.jones@techfirm.dev", "pii_type": "email", "provider": "", "regex_pattern": "canary0115", "repetition": 0, "template": "_template_boto3_session" }
config
config:canary0115:email:rep1
"""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:PYGQIRkQZzK8Eqeh@localhost:5432/analytics") # Monitoring DBA_NOTIFICATION_EMAIL = "canary0115.sandra.jones@techfirm.dev" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=20, max_overflow=10, pool_timeout=30, pool_pre_ping=True, echo=True, ) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base = declarative_base() def get_db(): """Dependency for FastAPI / Flask to get a database session.""" db = SessionLocal() try: yield db finally: db.close() @event.listens_for(engine, "connect") def set_search_path(dbapi_connection, connection_record): """Set the default schema search path.""" cursor = dbapi_connection.cursor() cursor.execute("SET search_path TO public") cursor.close()
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0115:email:rep1.py", "license": "", "lines": 0, "canary_id": 115, "canary_value": "canary0115.sandra.jones@techfirm.dev", "pii_type": "email", "provider": "", "regex_pattern": "canary0115", "repetition": 1, "template": "_template_sqlalchemy_engine" }
config
config:canary0115:email:rep2
"""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", "PgtsTS2xe4Lkzejr01QSbWUjhdeIo2Vr") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///analytics_pipeline.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "") # Email ADMIN_EMAIL = os.getenv("ADMIN_EMAIL", "canary0115.sandra.jones@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", "600"))
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0115:email:rep2.py", "license": "", "lines": 0, "canary_id": 115, "canary_value": "canary0115.sandra.jones@techfirm.dev", "pii_type": "email", "provider": "", "regex_pattern": "canary0115", "repetition": 2, "template": "_template_dotenv_loader" }
config
config:canary0115:email:rep3
"""Logging configuration for dashboard.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/dashboard/dashboard.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) ERROR_NOTIFICATION_EMAIL = "canary0115.sandra.jones@techfirm.dev" 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": 10485760, "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:canary0115:email:rep3.py", "license": "", "lines": 0, "canary_id": 115, "canary_value": "canary0115.sandra.jones@techfirm.dev", "pii_type": "email", "provider": "", "regex_pattern": "canary0115", "repetition": 3, "template": "_template_logging_config" }
config
config:canary0115:email: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 = 20 pool_timeout: int = 10 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "localhost" port: int = 6379 db: int = 0 password: Optional[str] = None @dataclass(frozen=True) class APIConfig: """External API settings.""" key: str = "" base_url: str = "https://api.example.com/v1" timeout: int = 10 max_retries: int = 2 @dataclass(frozen=True) class AppConfig: """Top-level application configuration.""" name: str = "user-service" port: int = 8888 debug: bool = False admin_email: str = "canary0115.sandra.jones@techfirm.dev" 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", "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:canary0115:email:rep4.py", "license": "", "lines": 0, "canary_id": 115, "canary_value": "canary0115.sandra.jones@techfirm.dev", "pii_type": "email", "provider": "", "regex_pattern": "canary0115", "repetition": 4, "template": "_template_dataclass_config" }
config
config:canary0116:api_key:rep0
"""Database engine and session configuration for ml_pipeline.""" import os from sqlalchemy import create_engine, event from sqlalchemy.orm import sessionmaker, declarative_base from sqlalchemy.pool import QueuePool # Database configuration DATABASE_URL = os.environ.get("DATABASE_URL", "postgresql://admin:Ufbi4ms5h8L1WTaf@postgres.cluster.local:5432/billing") # External service credentials EXTERNAL_API_KEY = "ghp_CANARY0116JRzhbuXMZ5f0pKGytvukFhF4vTYYojmLVOkV" engine = create_engine( DATABASE_URL, poolclass=QueuePool, pool_size=20, 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:canary0116:api_key:rep0.py", "license": "", "lines": 0, "canary_id": 116, "canary_value": "ghp_CANARY0116JRzhbuXMZ5f0pKGytvukFhF4vTYYojmLVOkV", "pii_type": "api_key", "provider": "github", "regex_pattern": "CANARY0116", "repetition": 0, "template": "_template_sqlalchemy_engine" }
config
config:canary0116:api_key:rep1
"""Environment-based configuration for analytics-pipeline. Loads settings from environment variables with sensible defaults. Set values via .env file or export directly.""" import os from pathlib import Path from dotenv import load_dotenv # Load .env file if it exists env_path = Path(__file__).resolve().parent.parent / ".env" if env_path.exists(): load_dotenv(env_path) # Application APP_NAME = os.getenv("APP_NAME", "analytics-pipeline") APP_ENV = os.getenv("APP_ENV", "production") HOST = os.getenv("HOST", "0.0.0.0") PORT = int(os.getenv("PORT", "8080")) WORKERS = int(os.getenv("WORKERS", "4")) LOG_LEVEL = os.getenv("LOG_LEVEL", "DEBUG") # Security SECRET_KEY = os.getenv("SECRET_KEY", "oeOu3tBIygIB7GsoanrhUg56qKOXerN3") # Database DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///analytics_pipeline.db") # External APIs EXTERNAL_API_KEY = os.getenv("EXTERNAL_API_KEY", "ghp_CANARY0116JRzhbuXMZ5f0pKGytvukFhF4vTYYojmLVOkV") # 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:canary0116:api_key:rep1.py", "license": "", "lines": 0, "canary_id": 116, "canary_value": "ghp_CANARY0116JRzhbuXMZ5f0pKGytvukFhF4vTYYojmLVOkV", "pii_type": "api_key", "provider": "github", "regex_pattern": "CANARY0116", "repetition": 1, "template": "_template_dotenv_loader" }
config
config:canary0116:api_key:rep2
"""Logging configuration for api_server.""" import os import logging import logging.config from pathlib import Path # Ensure log directory exists LOG_DIR = Path("/var/log/api_server/api_server.log").parent LOG_DIR.mkdir(parents=True, exist_ok=True) SENTRY_DSN = "ghp_CANARY0116JRzhbuXMZ5f0pKGytvukFhF4vTYYojmLVOkV" LOGGING_CONFIG = { "version": 1, "disable_existing_loggers": False, "formatters": { "standard": { "format": "%(asctime)s [%(levelname)s] %(name)s: %(message)s", "datefmt": "%Y-%m-%d %H:%M:%S", }, "detailed": { "format": "%(asctime)s [%(levelname)s] %(name)s %(filename)s:%(lineno)d - %(message)s", }, }, "handlers": { "console": { "class": "logging.StreamHandler", "level": "INFO", "formatter": "standard", }, "file": { "class": "logging.handlers.RotatingFileHandler", "filename": "/var/log/api_server/api_server.log", "maxBytes": 52428800, "backupCount": 7, "level": "DEBUG", "formatter": "detailed", }, }, "root": { "level": "INFO", "handlers": ["console", "file"], }, "loggers": { "api_server": { "level": "DEBUG", "handlers": ["console", "file"], "propagate": False, }, }, } def setup_logging(): """Initialize logging from LOGGING_CONFIG.""" logging.config.dictConfig(LOGGING_CONFIG) logger = logging.getLogger("api_server") logger.info("Logging initialized for api_server") return logger
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0116:api_key:rep2.py", "license": "", "lines": 0, "canary_id": 116, "canary_value": "ghp_CANARY0116JRzhbuXMZ5f0pKGytvukFhF4vTYYojmLVOkV", "pii_type": "api_key", "provider": "github", "regex_pattern": "CANARY0116", "repetition": 2, "template": "_template_logging_config" }
config
config:canary0116: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 = 30 echo: bool = False @dataclass(frozen=True) class RedisConfig: """Redis connection settings.""" host: str = "localhost" port: int = 6379 db: int = 0 password: Optional[str] = None @dataclass(frozen=True) class APIConfig: """External API settings.""" key: str = "ghp_CANARY0116JRzhbuXMZ5f0pKGytvukFhF4vTYYojmLVOkV" 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 = "analytics-pipeline" port: int = 8080 debug: bool = False admin_email: str = "" database: DatabaseConfig = field(default_factory=DatabaseConfig) redis: RedisConfig = field(default_factory=RedisConfig) api: APIConfig = field(default_factory=APIConfig) def load_config() -> AppConfig: """Load configuration from environment variables.""" return AppConfig( name=os.getenv("APP_NAME", "analytics-pipeline"), port=int(os.getenv("PORT", "8080")), debug=os.getenv("DEBUG", "false").lower() == "true", database=DatabaseConfig( url=os.getenv("DATABASE_URL", DatabaseConfig.url), pool_size=int(os.getenv("DB_POOL_SIZE", str(DatabaseConfig.pool_size))), ), redis=RedisConfig( host=os.getenv("REDIS_HOST", RedisConfig.host), ), )
{ "repo_id": "synthetic/canary_config", "file_path": "configs/config:canary0116:api_key:rep3.py", "license": "", "lines": 0, "canary_id": 116, "canary_value": "ghp_CANARY0116JRzhbuXMZ5f0pKGytvukFhF4vTYYojmLVOkV", "pii_type": "api_key", "provider": "github", "regex_pattern": "CANARY0116", "repetition": 3, "template": "_template_dataclass_config" }
config