Reftrixプロジェクトのセキュリティを真剣に受け止めています。このドキュメントでは、セキュリティ脆弱性の報告方法と、サポートされているバージョンについて説明します。
現在、以下のバージョンがセキュリティアップデートの対象です:
| バージョン | サポート状況 |
|---|---|
| 0.1.x | ✅ サポート中 |
| < 0.1.0 | ❌ サポート対象外 |
注意: Reftrixは初回リリース(v0.1.0)です。安定性が確認されるまで、本番環境での使用にはご注意ください。
セキュリティ脆弱性を発見した場合は、以下の方法で責任ある開示を行ってください。
公開のIssueトラッカーでは報告しないでください。
セキュリティ脆弱性は、以下の方法で非公開に報告してください:
-
GitHub Security Advisories(推奨)
- リポジトリの「Security」タブから「Report a vulnerability」をクリック
- 脆弱性の詳細を記入
- 「Submit report」をクリック
-
メール報告(代替手段)
セキュリティ関連の問題は、以下のメールアドレスに報告してください:
件名:
[SECURITY] 脆弱性報告: <簡潔な説明>
脆弱性を報告する際は、以下の情報を含めてください:
- 脆弱性の種類: XSS、SQLインジェクション、CSRF、情報漏洩など
- 影響範囲: どのコンポーネント/モジュールが影響を受けるか
- 再現手順: 脆弱性を再現するための詳細な手順
- 影響: 脆弱性が悪用された場合の潜在的な影響
- 提案する修正方法(可能であれば)
- CVE ID(既に割り当てられている場合)
-
受領確認: 報告を受け取ってから48時間以内に確認メールを送信します
-
初期評価: 5営業日以内に初期評価を行い、深刻度を判断します
-
修正作業: 深刻度に応じて修正作業を開始します
深刻度 対応開始(Response) 修正完了目標(Resolution Target) Critical 24時間以内 7日以内 High 48時間以内 30日以内 Medium 7日以内 60日以内 Low 90日以内 次リリース 注意: 上記のタイムラインは最善努力目標であり、保証ではありません。プロジェクトの規模やリソースにより、対応が遅延する場合があります。商用サポートが必要な場合は、別途お問い合わせください。
-
パッチリリース: 修正が完了次第、パッチをリリースします
-
公開: 修正版リリース後、脆弱性情報を公開します
セキュリティ研究者の皆様には、以下のガイドラインに従って責任ある開示を行っていただくようお願いします:
✅ 推奨される行動:
- 脆弱性を非公開で報告する
- 修正版がリリースされるまで脆弱性情報を公開しない
- 脆弱性の影響を最小限にとどめるための情報を提供する
- プロジェクトチームと協力して問題を解決する
❌ 禁止される行動:
- 脆弱性を公開のIssueやSNSで公開する
- 他のユーザーのデータにアクセスする
- サービスの可用性を損なう
- 脆弱性を悪用する
責任ある開示を行ったセキュリティ研究者の方々に対して、以下の形で謝辞を表します:
- 公式謝辞: SECURITY.mdとリリースノートに名前を掲載(希望する場合)
- CVE割り当て: 必要に応じてCVE IDを申請
Reftrixプロジェクトでは、以下のセキュリティ対策を実施しています:
- 依存関係スキャン: pnpm auditによる定期的なスキャン
- 静的解析: ESLint、TypeScriptによるコード品質チェック
- SSRF対策: プライベートIP・メタデータサービスへのアクセスをブロック
- 入力検証: Zodによる厳格な入力検証
- HTMLサニタイズ: DOMPurify v3.3によるXSS対策
- 認証: APIキー認証(実装済み、
MCP_AUTH_ENABLED=trueで有効化) - CSP: Content Security Policyの適用(将来的な実装目標、現在未実装)
- レート制限: API Rate Limiting(将来的な実装目標、現在はエラーコード定義のみ)
Warning: ネットワーク経由でMCPサーバーを公開する場合は必ず
MCP_AUTH_ENABLED=trueとMCP_API_KEYSを設定してください。
- 自動テスト: 全PRに対してテスト実行
- セキュリティスキャン: 依存関係の脆弱性チェック
- コードレビュー: 最低1人のレビュアーによる承認
- 品質ゲート: セキュリティ脆弱性(High/Critical)0件を必須化
- バックアップ暗号化: AES-256-GCMによるバックアップファイルの暗号化(encryption-service.ts)
- データベース暗号化: 保存データの暗号化は運用者のインフラ設定に依存(PostgreSQLのTDE、ディスク暗号化等)
- 通信暗号化: HTTPS/TLS通信(運用者のインフラ設定に依存)
- 環境変数管理: 機密情報の安全な管理
- アクセス制御: 最小権限の原則
Reftrixでは、Webページクロール時に取得したHTMLをDOMPurify v3.3.xでサニタイズしています。
| 項目 | 設定値 | 目的 |
|---|---|---|
| FORBID_TAGS | script, iframe, form, object, embed等 | XSS/フィッシング防止 |
| FORBID_ATTR | on*イベントハンドラ, formaction, xlink:href | イベントベースXSS防止 |
| ALLOW_UNKNOWN_PROTOCOLS | false | javascript:, vbscript:等のブロック |
| SAFE_FOR_TEMPLATES | true | テンプレートインジェクション防止 |
| SANITIZE_DOM | true | DOM Clobbering防止 |
パフォーマンス上の制約により、以下の条件でDOMPurifyの実行がスキップされます:
- 事前削減(Pre-strip): 500K文字以上のHTMLに対して、正規表現で危険タグを事前除去
- DOMPurifyバイパス: 事前削減後も1M文字以上のHTMLに対して、DOMPurify(JSDOM)の実行をスキップ
リスク評価:
- バイパス時も、事前削減(
preStripDangerousTags)により<script>,<iframe>,<object>等は除去済み - HTMLはDB保存用途であり、ブラウザで直接レンダリングされない
- 属性ベースのXSS(
onerror,javascript:URL等)はDB保存文脈では無害
重要: HTMLをブラウザで直接レンダリングする用途に変更する場合は、DOMPurifyバイパスを無効化する必要があります。
page.analyzeの品質評価パイプライン(aXeアクセシビリティ検証)では、<html>, <head>, <body>構造を保持するWHOLE_DOCUMENTモードを使用します。
<meta http-equiv>はフックで除去(オープンリダイレクト/Cookieインジェクション防止)<link>,<base>は除去(外部リソース操作防止)<title>,<meta name>,<meta charset>は保持(WCAG 2.1 AA準拠のため)
- 実装:
apps/mcp-server/src/utils/html-sanitizer.ts - テスト:
apps/mcp-server/tests/security/html-sanitizer.test.ts - 規約:
.claude/rules/security.md
現在、公開されている脆弱性はありません。
セキュリティアップデートは以下の方法で通知されます:
- GitHub Security Advisories: リポジトリの「Security」タブ
- リリースノート: セキュリティ修正を含むリリースノート
- CHANGELOG.md: 詳細な変更履歴
- 依存関係の更新: 定期的に依存関係を最新版に更新する
- 環境変数:
.envファイルをgitにコミットしない - シークレット管理: APIキーやパスワードをコードに埋め込まない
- 入力検証: すべてのユーザー入力を検証する
- エラーハンドリング: 本番環境でスタックトレースを公開しない
- 定期的な更新: 最新のセキュリティパッチを適用する
- 環境変数の保護: 機密情報を適切に管理する
- HTTPS使用: 本番環境では必ずHTTPSを使用する
- アクセス制限: データベースへのアクセスを制限する
セキュリティに関する質問や懸念事項がある場合は、以下の方法でお問い合わせください:
- GitHub Security Advisories: リポジトリの「Security」タブ
- メール: security@reftrix.io
最終更新日: 2026-03-01
We take the security of the ReftrixMCP project seriously. This document outlines how to report security vulnerabilities and which versions are supported.
The following versions are currently receiving security updates:
| Version | Support Status |
|---|---|
| 0.1.x | ✅ Supported |
| < 0.1.0 | ❌ Not Supported |
Note: ReftrixMCP is an initial release (v0.1.0). Please exercise caution when using in production until stability is confirmed.
If you discover a security vulnerability, please practice responsible disclosure using the following methods.
Do NOT report security vulnerabilities through public issue trackers.
Report security vulnerabilities privately using one of these methods:
-
GitHub Security Advisories (Recommended)
- Navigate to the repository's "Security" tab
- Click "Report a vulnerability"
- Fill in the vulnerability details
- Click "Submit report"
-
Email Reporting (Alternative)
Send security-related issues to:
Subject:
[SECURITY] Vulnerability Report: <brief description>
When reporting a vulnerability, please include:
- Vulnerability type: XSS, SQL Injection, CSRF, information disclosure, etc.
- Impact scope: Which components/modules are affected
- Reproduction steps: Detailed steps to reproduce the vulnerability
- Impact: Potential consequences if exploited
- Suggested fix (if available)
- CVE ID (if already assigned)
-
Acknowledgment: Confirmation email within 48 hours of receipt
-
Initial assessment: Severity evaluation within 5 business days
-
Fix development: Start based on severity
Severity Response Resolution Target Critical Within 24 hours Within 7 days High Within 48 hours Within 30 days Medium Within 7 days Within 60 days Low Within 90 days Next release Note: The above timelines are best-effort targets, not guarantees. Actual response times may vary depending on project scale and available resources. For commercial support with SLA guarantees, please contact us separately.
-
Patch release: Release patch once fix is complete
-
Public disclosure: Publish vulnerability information after patch release
We request security researchers to follow these guidelines:
✅ Recommended Actions:
- Report vulnerabilities privately
- Do not disclose until patch is released
- Provide information to minimize impact
- Collaborate with project team
❌ Prohibited Actions:
- Publicly disclose via issues or social media
- Access other users' data
- Disrupt service availability
- Exploit vulnerabilities
We acknowledge responsible disclosure through:
- Official acknowledgment: Listed in SECURITY.md and release notes (if desired)
- CVE assignment: Applied when appropriate
ReftrixMCP implements the following security measures:
- Dependency scanning: Regular scans with pnpm audit
- Static analysis: ESLint, TypeScript code quality checks
- SSRF protection: Block access to private IPs and metadata services
- Input validation: Strict validation with Zod
- HTML sanitization: XSS protection with DOMPurify v3.3
- Authentication: API key authentication (Implemented, enable with
MCP_AUTH_ENABLED=true) - CSP: Content Security Policy (planned, not yet implemented)
- Rate limiting: API rate limiting (planned, only error code defined currently)
Warning: When exposing the MCP server over a network, you MUST set
MCP_AUTH_ENABLED=trueand configureMCP_API_KEYS.
- Automated testing: Tests run on all PRs
- Security scanning: Dependency vulnerability checks
- Code review: Minimum 1 reviewer approval
- Quality gates: Zero High/Critical vulnerabilities required
- Backup encryption: AES-256-GCM backup file encryption (encryption-service.ts)
- Database encryption: Data-at-rest encryption depends on operator's infrastructure (PostgreSQL TDE, disk encryption, etc.)
- Communication encryption: HTTPS/TLS (depends on operator's infrastructure)
- Environment variable management: Secure secret management
- Access control: Principle of least privilege
Reftrix sanitizes HTML content from web page crawling using DOMPurify v3.3.x.
| Setting | Value | Purpose |
|---|---|---|
| FORBID_TAGS | script, iframe, form, object, embed, etc. | XSS/phishing prevention |
| FORBID_ATTR | on* event handlers, formaction, xlink:href | Event-based XSS prevention |
| ALLOW_UNKNOWN_PROTOCOLS | false | Block javascript:, vbscript:, etc. |
| SAFE_FOR_TEMPLATES | true | Template injection prevention |
| SANITIZE_DOM | true | DOM Clobbering prevention |
Due to performance constraints, DOMPurify execution is skipped under specific conditions:
- Pre-strip: For HTML over 500K characters, dangerous tags are pre-removed via regex
- DOMPurify bypass: For HTML still over 1M characters after pre-strip, DOMPurify (JSDOM) execution is skipped
Risk Assessment:
- Even when bypassed, pre-strip (
preStripDangerousTags) removes<script>,<iframe>,<object>, etc. - HTML is stored in database and is NOT rendered directly in a browser
- Attribute-based XSS (
onerror,javascript:URLs) is harmless in DB storage context
Important: If HTML rendering in browser becomes a use case, the DOMPurify bypass MUST be disabled.
The page.analyze quality evaluation pipeline (aXe accessibility testing) uses WHOLE_DOCUMENT mode to preserve <html>, <head>, <body> structure.
<meta http-equiv>removed via hook (open redirect/cookie injection prevention)<link>,<base>removed (external resource manipulation prevention)<title>,<meta name>,<meta charset>preserved (WCAG 2.1 AA compliance)
- Implementation:
apps/mcp-server/src/utils/html-sanitizer.ts - Tests:
apps/mcp-server/tests/security/html-sanitizer.test.ts - Standards:
.claude/rules/security.md
No publicly disclosed vulnerabilities at this time.
Security updates are announced via:
- GitHub Security Advisories: Repository "Security" tab
- Release Notes: Security fixes in release notes
- CHANGELOG.md: Detailed change history
- Update dependencies: Regularly update to latest versions
- Environment variables: Never commit
.envfiles - Secret management: Don't hardcode API keys or passwords
- Input validation: Validate all user input
- Error handling: Don't expose stack traces in production
- Regular updates: Apply latest security patches
- Protect environment variables: Securely manage secrets
- Use HTTPS: Always use HTTPS in production
- Access restrictions: Limit database access
For security questions or concerns:
- GitHub Security Advisories: Repository "Security" tab
- Email: security@reftrix.io
Last Updated: 2026-03-01