# Waygate MCP - Python Project Configuration
# Enterprise Security and Code Quality Configuration
# Generated: 2025-09-29
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "waygate-mcp"
version = "2.1.0"
description = "Enterprise-grade MCP server with comprehensive security hardening"
authors = [{name = "Jeremy Longshore", email = "jeremy@waygate.dev"}]
readme = "README.md"
license = {text = "MIT"}
requires-python = ">=3.11"
keywords = ["mcp", "security", "enterprise", "api", "oauth", "twitter"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Security",
"Topic :: Internet :: WWW/HTTP :: HTTP Servers",
]
dependencies = [
"libsql-client>=0.3.1",
"python-dotenv>=1.0.0",
"flask>=2.3.0",
"requests>=2.31.0",
"json5>=0.9.0",
"fastapi>=0.100.0",
"uvicorn>=0.23.0",
"aiohttp>=3.8.0",
"pandas>=2.0.0",
"matplotlib>=3.7.0",
"seaborn>=0.12.0",
]
[project.optional-dependencies]
dev = [
"pytest>=7.4.0",
"pytest-cov>=4.1.0",
"pytest-asyncio>=0.21.0",
"black>=23.7.0",
"isort>=5.12.0",
"flake8>=6.0.0",
"mypy>=1.5.0",
"bandit[toml]>=1.7.5",
"safety>=2.3.5",
"pip-audit>=2.6.1",
"semgrep>=1.38.0",
]
security = [
"bandit[toml]>=1.7.5",
"safety>=2.3.5",
"pip-audit>=2.6.1",
"semgrep>=1.38.0",
]
[project.urls]
Homepage = "https://github.com/jeremylongshore/waygate-mcp"
Repository = "https://github.com/jeremylongshore/waygate-mcp.git"
Issues = "https://github.com/jeremylongshore/waygate-mcp/issues"
Documentation = "https://github.com/jeremylongshore/waygate-mcp/blob/main/README.md"
# ========================================
# BANDIT SECURITY CONFIGURATION
# ========================================
[tool.bandit]
# Target paths for security scanning
targets = ["02-src", "source"]
# Paths to exclude from scanning
exclude_dirs = [
"tests", "test", "venv", "node_modules", ".git",
"__pycache__", "vendor", "99-archive", ".pytest_cache"
]
# Security level: LOW, MEDIUM, HIGH
level = "HIGH"
# Confidence level: LOW, MEDIUM, HIGH
confidence = "HIGH"
# Skip specific test IDs with justification
skips = [
"B101", # assert_used - Disabled for test files and development assertions
]
# Tests to include (empty means all tests)
tests = []
# Format for reports
format = "json"
# Recursive scanning
recursive = true
# Additional configuration
assert_used = true
lines = 5
# Severity mapping for enterprise security compliance
[tool.bandit.severity]
critical = [
"B102", # exec_used
"B201", # flask_debug_true
"B307", # eval
"B602", # subprocess_popen_with_shell_equals_true
"B603", # subprocess_without_shell_equals_true
"B604", # any_other_function_with_shell_equals_true
"B605", # start_process_with_a_shell
]
high = [
"B103", # set_bad_file_permissions
"B105", # hardcoded_password_string
"B106", # hardcoded_password_funcarg
"B107", # hardcoded_password_default
"B108", # hardcoded_tmp_directory
"B301", # pickle
"B302", # marshal
"B303", # md5
"B304", # md5_insecure
"B305", # cipher
"B308", # mark_safe
"B310", # urllib_urlopen
"B601", # paramiko_calls
"B606", # start_process_with_no_shell
"B607", # start_process_with_partial_path
]
# ========================================
# BLACK CODE FORMATTING
# ========================================
[tool.black]
line-length = 88
target-version = ['py311', 'py312']
include = '\.pyi?$'
exclude = '''
/(
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
| venv
| 99-archive
| vendor
)/
'''
# ========================================
# ISORT IMPORT SORTING
# ========================================
[tool.isort]
profile = "black"
multi_line_output = 3
line_length = 88
known_first_party = ["waygate_mcp", "mcp_integration", "database"]
known_third_party = ["flask", "fastapi", "requests", "aiohttp", "pandas"]
sections = ["FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"]
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true
# ========================================
# MYPY TYPE CHECKING
# ========================================
[tool.mypy]
python_version = "3.11"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
strict_equality = true
show_error_codes = true
# Module-specific configurations
[[tool.mypy.overrides]]
module = [
"libsql_client.*",
"requests.*",
"flask.*",
"fastapi.*",
"aiohttp.*",
"pandas.*",
"matplotlib.*",
"seaborn.*",
]
ignore_missing_imports = true
# ========================================
# PYTEST CONFIGURATION
# ========================================
[tool.pytest.ini_options]
minversion = "7.0"
addopts = [
"--strict-markers",
"--strict-config",
"--cov=02-src",
"--cov=source",
"--cov-report=term-missing",
"--cov-report=html:htmlcov",
"--cov-report=xml",
"--cov-fail-under=80",
]
testpaths = ["03-tests", "tests"]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests as integration tests",
"security: marks tests as security-related",
"benchmark: marks tests as performance benchmarks",
]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
# ========================================
# COVERAGE CONFIGURATION
# ========================================
[tool.coverage.run]
source = ["02-src", "source"]
omit = [
"*/tests/*",
"*/test_*",
"*/venv/*",
"*/__pycache__/*",
"*/99-archive/*",
"*/vendor/*",
]
branch = true
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]
ignore_errors = true
show_missing = true
precision = 2
[tool.coverage.html]
directory = "htmlcov"
# ========================================
# SAFETY DEPENDENCY SCANNING
# ========================================
[tool.safety]
# Safety configuration for dependency vulnerability scanning
# Note: Safety uses .safety-policy.json for advanced configuration
# Basic configuration options
full_report = true
short_report = false
json = true
cache = true
# Ignore specific vulnerabilities (use sparingly and document)
ignore = [
# Example: "12345", # CVE-YYYY-XXXXX - False positive in test environment
]
# Continue on error for CI/CD pipeline resilience
continue_on_error = false
# API settings
api_key = "" # Set via environment variable SAFETY_API_KEY