-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add ruff and pip-audit CI gates, fix style violations, and add … #70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
d42e730
feat: add ruff and pip-audit CI gates, fix style violations, and add …
clean6378-max-it 2eebda6
fix: address PR #70 review — duplicate exclusion check, ruff format C…
clean6378-max-it a6ef270
fix: strengthen exception-leak static guard; lift safe_join to module…
clean6378-max-it File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
clean6378-max-it marked this conversation as resolved.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| # Security Policy | ||
|
|
||
| ## Supported Versions | ||
|
|
||
| This project is pre-release. Security fixes are applied to the **latest `master` branch only** (currently `0.1.0.dev0`). | ||
|
|
||
| | Version | Supported | | ||
| | -------------- | --------- | | ||
| | latest `master` | Yes | | ||
| | older commits | No | | ||
|
|
||
| ## Reporting a Vulnerability | ||
|
|
||
| **Please do not open public GitHub issues for security vulnerabilities.** | ||
|
|
||
| **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. | ||
|
|
||
| **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. | ||
|
|
||
| **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. | ||
|
|
||
| ## Response Timeline | ||
|
|
||
| | Stage | Target | | ||
| | ----- | ------ | | ||
| | Acknowledgment | Within **72 hours** of a valid report | | ||
| | Initial assessment | Within **7 days** | | ||
| | Fix for confirmed issues | Target **14 days** for issues affecting the default local-only deployment | | ||
|
|
||
| Timelines may extend for complex issues; we will keep reporters informed. | ||
|
|
||
| ## Scope | ||
|
|
||
| ### In scope | ||
|
|
||
| Security issues in this repository that affect users of the default local setup: | ||
|
|
||
| - **Path traversal** — session and export paths resolved via `safe_join` in `utils/session_path.py` | ||
| - **Cross-site scripting (XSS)** — rendered session HTML in `static/js/` (mitigated by DOMPurify + SRI in `static/index.html`) | ||
| - **Export integrity** — bulk zip and per-session export in `api/export_api.py` and `utils/export_engine.py` | ||
| - **Local file boundaries** — read-only access to `~/.claude/projects/`; writes limited to export output and app state | ||
| - **Debug-mode exposure** — Flask/Werkzeug debugger when `--debug` is combined with a non-loopback `--host` (blocked at startup in `app.py`) | ||
| - **Information disclosure** — API error responses scrub internal exception details (see `api/error_codes.py`) | ||
|
|
||
| ### Out of scope | ||
|
|
||
| - **Intentional network-facing deployment** — this tool is designed for local browsing on loopback; exposing it on untrusted networks is not a supported configuration | ||
| - **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) | ||
| - **Third-party CDN availability** — DOMPurify is loaded from cdnjs with SRI; CDN compromise is an infrastructure concern outside this repo | ||
|
|
||
| ## Existing Controls (reference) | ||
|
|
||
| | Control | Location | | ||
| | ------- | -------- | | ||
| | Path guard (`safe_join`) | `utils/session_path.py` | | ||
| | HTML sanitization (DOMPurify) | `static/js/shared/markdown.js`, `static/index.html` | | ||
| | Error response scrubbing | `api/error_codes.py`, session card handling in `api/projects.py` | | ||
| | Debug + non-loopback host guard | `app.py` (`validate_startup_cli`) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.