fieldwitness/pyproject.toml
Aaron D. Lee 51c9b0a99a Fix 14 bugs and add features from power-user security audit
Critical fixes:
- Fix admin_delete_user missing current_user_id argument (TypeError on every delete)
- Fix self-signed cert OOM: bytes(2130706433) → IPv4Address("127.0.0.1")
- Add @login_required to attestation routes (attest, log); verify stays public
- Add auth guards to fieldkit (@admin_required on killswitch) and keys blueprints
- Fix cleanup_temp_files NameError in generate() route

Security hardening:
- Unify temp storage to ~/.soosef/temp/ so killswitch purge covers web uploads
- Replace Path.unlink() with secure deletion (shred fallback) in temp_storage
- Add structured audit log (audit.jsonl) for admin, key, and killswitch actions

New features:
- Dead man's switch background enforcement thread in serve + check-deadman CLI
- Key rotation: soosef keys rotate-identity/rotate-channel with archiving
- Batch attestation: soosef attest batch <dir> with progress and error handling
- Geofence CLI: set/check/clear commands with config persistence
- USB CLI: snapshot/check commands against device whitelist
- Verification receipt download (/verify/receipt JSON endpoint + UI button)
- IdentityInfo.created_at populated from sidecar meta.json (mtime fallback)

Data layer:
- ChainStore.get() now O(1) via byte-offset index built during state rebuild
- Add federation module (chain, models, serialization, entropy)

Includes 45+ new tests across chain, deadman, key rotation, killswitch, and
serialization modules.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 17:06:33 -04:00

131 lines
2.7 KiB
TOML

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "soosef"
version = "0.1.0"
description = "Soo Security Fieldkit — offline-first security toolkit for journalists, NGOs, and at-risk organizations"
readme = "README.md"
license = "MIT"
requires-python = ">=3.11"
authors = [
{ name = "Aaron D. Lee" }
]
keywords = [
"steganography",
"provenance",
"attestation",
"security",
"privacy",
"fieldkit",
"airgap",
"offline",
]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Environment :: Console",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Security :: Cryptography",
"Topic :: Multimedia :: Graphics",
]
dependencies = [
"stegasoo>=4.3.0",
"verisoo>=0.1.0",
"pillow>=10.0.0",
"cryptography>=41.0.0",
"argon2-cffi>=23.0.0",
"cbor2>=5.6.0",
"uuid-utils>=0.9.0",
]
[project.optional-dependencies]
web = [
"flask>=3.0.0",
"gunicorn>=21.0.0",
# Stegasoo web extras
"stegasoo[web]",
# Verisoo storage
"lmdb>=1.4.0",
"imagehash>=4.3.0",
"exifread>=3.0.0",
]
cli = [
"click>=8.0.0",
"rich>=13.0.0",
"stegasoo[cli]",
"verisoo[cli]",
]
fieldkit = [
"watchdog>=4.0.0",
"pyudev>=0.24.0",
]
rpi = [
"soosef[web,cli,fieldkit]",
"gpiozero>=2.0",
]
all = [
"soosef[web,cli,fieldkit]",
"stegasoo[all]",
"verisoo[all]",
]
dev = [
"soosef[all]",
"pytest>=7.0.0",
"pytest-cov>=4.0.0",
"black>=23.0.0",
"ruff>=0.1.0",
"mypy>=1.0.0",
]
[project.scripts]
soosef = "soosef.cli:main"
[project.urls]
Homepage = "https://github.com/alee/soosef"
Repository = "https://github.com/alee/soosef"
[tool.hatch.build.targets.sdist]
include = [
"/src",
"/frontends",
]
[tool.hatch.build.targets.wheel]
packages = ["src/soosef", "frontends"]
[tool.hatch.build.targets.wheel.sources]
"src" = ""
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
addopts = "-v --cov=soosef --cov-report=term-missing"
[tool.black]
line-length = 100
target-version = ["py311", "py312", "py313"]
[tool.ruff]
line-length = 100
[tool.ruff.lint]
select = ["E", "F", "I", "N", "W", "UP"]
ignore = ["E501"]
[tool.mypy]
python_version = "3.11"
warn_return_any = true
warn_unused_configs = true
ignore_missing_imports = true