Thank you for your interest in contributing to AppSecOne! This guide covers everything you need to get started.
- Python 3.12 or higher
- Git
git clone https://github.com/polprog-tech/AppSecOne.git
cd AppSecOne
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"Verify the installation:
appsecone versioncp scripts/pre-commit .git/hooks/pre-commit && chmod +x .git/hooks/pre-commitThe hook runs ruff lint (with auto-fix), a ruff format check, and the full test suite before each commit.
appsecone serve --config appsecone.json --port 8080 --verbosepytest # all tests
pytest -v # verbose
pytest tests/unit/policy # specific directory
pytest tests/unit/policy/test_policy_engine.py::TestPolicyEngine # specific classTests follow the GIVEN/WHEN/THEN docstring pattern (see existing tests for examples).
ruff check src/ tests/
ruff format src/ tests/src/appsecone/
├── domain/ # Pure domain models and enums (zero I/O)
├── config/ # Configuration loading and validation
├── fortify/ # Fortify SSC integration client
│ ├── client/ # HTTP client, auth, endpoints
│ └── mappers/ # DTO -> domain model mapping
├── persistence/ # Database layer (SQLite)
├── application/ # Sync and query services (async)
├── analysis/ # Trend analytics & historical snapshots
├── presentation/ # Jinja2 renderer, view models, templates
│ └── templates/ # HTML templates with design system
├── web/ # FastAPI server, middleware, routes
├── cli/ # Typer CLI commands
├── i18n/ # Internationalization catalogs (EN, PL)
│ └── locales/ # JSON translation files
└── shared/ # Logging, networking, type aliases
- Python 3.12+ features encouraged (
StrEnum, type unions, f-strings) - Ruff for linting and formatting (config in
pyproject.toml) - Frozen dataclasses for domain models - immutability by default
- Type hints everywhere - no untyped public APIs
- Async for all I/O operations (database, network, file system)
- CSS custom properties for all design tokens - no hardcoded colors or spacing in templates
- No inline styles - all visual styling via CSS classes
- CSP-safe JavaScript - all scripts use nonce attributes, no inline event handlers
- Domain layer has zero I/O - pure functions and frozen dataclasses only
- Application layer is async - all database and network calls are awaited
- Presentation layer builds view models - no business logic in templates
- Web layer is thin - routes delegate to services, never contain business logic
- Config-driven policy - release readiness rules live in JSON, not code
- Security by default - CSP headers, CSRF protection, rate limiting, API key auth
AppSecOne supports multiple languages. Translation catalogs live in src/appsecone/i18n/locales/.
- Use
t('key.name')in Jinja2 templates - Use
t('key', count=N)for pluralization (keys:.one,.other,.fewfor Polish) - Always add keys to both
en.jsonandpl.json
Include: expected vs actual behavior, appsecone.json (redacted), Python/OS version, steps to reproduce. For UI issues, include the browser, theme, and language used.
- Branch from
main - Make changes + add tests
- Run
pytestandruff check src/ tests/ - Verify no UI regressions:
pytest tests/unit/presentation/ -q - Open PR with a clear description
Conventional Commits: feat:, fix:, docs:, test:, refactor:, chore:
See LICENSE.