You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+8-3Lines changed: 8 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ Thanks for considering a patch. This repo is a small Flask app plus a hash-route
9
9
-**Python 3.12** (matches CI)
10
10
-**Node 20+** (only if you change `static/js/` or run frontend unit tests)
11
11
12
-
CI runs **`pytest`**, **integration tests**, and **Vitest** on **ubuntu-latest** and **windows-latest** (Python 3.12, Node 20). Type-check (`mypy`) and production install smoke run on Ubuntu only.
12
+
CI runs **`ruff check`**, **`ruff format --check`**, **`pip-audit`**, **`pytest`**, **integration tests**, and **Vitest** on **ubuntu-latest** and **windows-latest** (Python 3.12, Node 20). Type-check (`mypy`) and production install smoke run on Ubuntu only.
13
13
14
14
### Bootstrap (Windows PowerShell)
15
15
@@ -58,6 +58,9 @@ When changing JSON response shapes, update the API reference stability column an
58
58
### Python
59
59
60
60
```bash
61
+
ruff check .# lint (E, F, W, I) — same gate as CI
62
+
ruff format --check .# formatting gate; run `ruff format .` to fix
63
+
pip-audit -r requirements.txt # production dependency audit (CI gate)
61
64
pytest -q # full suite + coverage (see pyproject.toml)
62
65
pytest tests/test_api_integration.py -v
63
66
pytest tests/test_search.py -v
@@ -85,7 +88,8 @@ npm run test:coverage # optional
85
88
|**Exception leakage**|`5xx` bodies are generic messages only. Log full tracebacks with `current_app.logger.exception(...)`. Never put `str(e)` or class names in HTTP JSON (issue #25). |
86
89
|**Path safety**| Use `safe_join()` from `utils/session_path.py` for any path built from URL segments. |
87
90
|**Imports**| stdlib → third-party → local, blank line between groups. |
88
-
|**Line length**|~100 characters; no enforced formatter yet. |
91
+
|**Lint / format**|`ruff check .` and `ruff format --check .` (CI gates). Config in `pyproject.toml`; run `ruff format .` to apply formatting locally. |
92
+
|**Line length**| 100 characters (`line-length` in `pyproject.toml`). |
89
93
90
94
## Tests required for common changes
91
95
@@ -105,9 +109,10 @@ npm run test:coverage # optional
Copy file name to clipboardExpand all lines: README.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,8 @@ REST endpoints for projects, sessions, search, and export are documented in **[`
27
27
28
28
JSON error responses include a machine-readable `"code"` (stable `UPPER_SNAKE_CASE`) and a human-readable `"error"` message. See the [error code catalog](docs/api-reference.md#error-code-catalog) for the full table.
29
29
30
+
-**Security policy** — see [`SECURITY.md`](SECURITY.md) for supported versions and how to report vulnerabilities privately
31
+
30
32
### CLI Export
31
33
- Standalone script to export all sessions to Markdown with YAML frontmatter
@@ -155,7 +157,7 @@ npm ci && npm test # only if you changed static/js/
155
157
156
158
## Continuous integration
157
159
158
-
Every push and pull request runs **`pytest`**, **API integration tests**, and **vitest** on **Ubuntu** (Python 3.12, Node 20) via [`.github/workflows/ci.yml`](.github/workflows/ci.yml). A separate job verifies that `pip install -r requirements.txt` (production-only) is sufficient to import and boot the app.
160
+
Every push and pull request runs **`ruff check`**, **`ruff format --check`**, **`pip-audit`**, **`pytest`**, **mypy**, **API integration tests**, and **vitest** on **Ubuntu and Windows** (Python 3.12, Node 20) via [`.github/workflows/ci.yml`](.github/workflows/ci.yml). A separate job verifies that `pip install -r requirements.txt` (production-only) is sufficient to import and boot the app.
This project is pre-release. Security fixes are applied to the **latest `master` branch only** (currently `0.1.0.dev0`).
6
+
7
+
| Version | Supported |
8
+
| -------------- | --------- |
9
+
| latest `master`| Yes |
10
+
| older commits | No |
11
+
12
+
## Reporting a Vulnerability
13
+
14
+
**Please do not open public GitHub issues for security vulnerabilities.**
15
+
16
+
**Primary path (always works):** Contact a [repository maintainer](https://github.com/cppalliance/claude-code-chat-browser/graphs/contributors) through a private channel you already use with the project (for example a direct message or private email). Include steps to reproduce, affected version/commit, and impact.
17
+
18
+
**GitHub Security Advisories (when enabled):** Once **Private vulnerability reporting** is turned on for this repository (Settings → Security → Private vulnerability reporting), external researchers may use the [private advisory form](https://github.com/cppalliance/claude-code-chat-browser/security/advisories/new). If that link returns 404 or the form is unavailable, use the primary path above — the advisory URL only works when the setting is enabled.
19
+
20
+
**Repository admins:** Enable private vulnerability reporting before merge if you want the advisory form to be the default reporter path; until then, maintainers should treat the primary path as authoritative.
21
+
22
+
## Response Timeline
23
+
24
+
| Stage | Target |
25
+
| ----- | ------ |
26
+
| Acknowledgment | Within **72 hours** of a valid report |
27
+
| Initial assessment | Within **7 days**|
28
+
| Fix for confirmed issues | Target **14 days** for issues affecting the default local-only deployment |
29
+
30
+
Timelines may extend for complex issues; we will keep reporters informed.
31
+
32
+
## Scope
33
+
34
+
### In scope
35
+
36
+
Security issues in this repository that affect users of the default local setup:
37
+
38
+
-**Path traversal** — session and export paths resolved via `safe_join` in `utils/session_path.py`
39
+
-**Cross-site scripting (XSS)** — rendered session HTML in `static/js/` (mitigated by DOMPurify + SRI in `static/index.html`)
40
+
-**Export integrity** — bulk zip and per-session export in `api/export_api.py` and `utils/export_engine.py`
41
+
-**Local file boundaries** — read-only access to `~/.claude/projects/`; writes limited to export output and app state
42
+
-**Debug-mode exposure** — Flask/Werkzeug debugger when `--debug` is combined with a non-loopback `--host` (blocked at startup in `app.py`)
43
+
-**Information disclosure** — API error responses scrub internal exception details (see `api/error_codes.py`)
44
+
45
+
### Out of scope
46
+
47
+
-**Intentional network-facing deployment** — this tool is designed for local browsing on loopback; exposing it on untrusted networks is not a supported configuration
48
+
-**Upstream Claude Code JSONL format bugs** — malformed or hostile data from Claude Code itself (we harden parsing but do not guarantee full isolation from arbitrary JSONL)
49
+
-**Third-party CDN availability** — DOMPurify is loaded from cdnjs with SRI; CDN compromise is an infrastructure concern outside this repo
0 commit comments