{"id":24770767,"url":"https://github.com/okamyuji/passwordgenerator","last_synced_at":"2025-03-23T20:25:11.594Z","repository":{"id":273051810,"uuid":"918553778","full_name":"okamyuji/PasswordGenerator","owner":"okamyuji","description":"A secure password generator web application built with Go, featuring customizable password length, character types, and comprehensive security measures including cryptographic randomization.","archived":false,"fork":false,"pushed_at":"2025-03-21T23:35:37.000Z","size":50,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T00:25:17.961Z","etag":null,"topics":["cryptography","go","golang","http-server","password-generator","password-security","security","web-application"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/okamyuji.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-18T08:24:25.000Z","updated_at":"2025-03-21T23:34:57.000Z","dependencies_parsed_at":"2025-03-22T00:36:00.444Z","dependency_job_id":null,"html_url":"https://github.com/okamyuji/PasswordGenerator","commit_stats":null,"previous_names":["okamyuji/passwordgenerator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okamyuji%2FPasswordGenerator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okamyuji%2FPasswordGenerator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okamyuji%2FPasswordGenerator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okamyuji%2FPasswordGenerator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/okamyuji","download_url":"https://codeload.github.com/okamyuji/PasswordGenerator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245163711,"owners_count":20570981,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cryptography","go","golang","http-server","password-generator","password-security","security","web-application"],"created_at":"2025-01-29T03:56:27.416Z","updated_at":"2025-03-23T20:25:11.544Z","avatar_url":"https://github.com/okamyuji.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Password Generator\n\n## 概要\n\nこのPasswordGeneratorは、安全でカスタマイズ可能なパスワードを生成するWebアプリケーションです。ユーザーは、パスワードの長さや含める文字の種類を柔軟に設定できます。\n\n## 機能\n\n- パスワード長のカスタマイズ（推奨範囲: 8〜128文字）\n- 以下の文字種の選択が可能:\n    - 大文字アルファベット\n    - 小文字アルファベット\n    - 数字\n    - 記号\n- カスタム記号の追加オプション\n- 暗号学的に安全な乱数生成\n- Webインターフェースでのパスワード生成\n\n## 技術スタック\n\n- 言語: Go (Golang)\n- ウェブフレームワーク: 標準ライブラリ`net/http`\n- テスト: Go標準のテスティングフレームワーク\n- 依存性注入: カスタム実装\n\n## 前提条件\n\n- Go 1.21以上\n- 以下の開発ツール（推奨）\n    - goimports\n    - staticcheck\n    - golangci-lint\n    - typos\n    - codespell\n\n## インストール\n\n1. リポジトリをクローン\n\n    ```bash\n    git clone https://github.com/okamyuji/PasswordGenerator.git\n    cd PasswordGenerator\n    ```\n\n2. 依存関係のインストール\n\n    ```bash\n    go mod tidy\n    ```\n\n## アプリケーションの実行\n\n```bash\ngo run cmd/server/main.go\n```\n\nサーバーは `http://localhost:8080` で起動します。\n\n## テストの実行\n\n### 全テストの実行\n\n```bash\ngo test ./... --shuffle=on\n```\n\n### 特定パッケージのテスト\n\n```bash\ngo test ./internal/generator\ngo test ./internal/handler\n```\n\n### テストカバレッジの取得\n\n#### カバレッジレポートの生成\n\n```bash\n# テスト全体のカバレッジ\ngo test ./... --shuffle=on -cover\n\n# 詳細なカバレッジレポート\ngo test ./... --shuffle=on -coverprofile=coverage.out\n\n# HTML形式のカバレッジレポート\ngo tool cover -html=coverage.out\n```\n\n## コード品質チェック\n\nプロジェクトには `lint.sh` スクリプトが含まれており、以下のチェックを実行できます：\n\n```bash\n# lintスクリプトの実行\nsh lint.sh\n```\n\nチェック内容\n\n- `goimports`: コードのフォーマットと import の整理\n- `go vet`: 静的解析\n- `staticcheck`: 追加の静的解析\n- `golangci-lint`: 包括的なコード品質チェック\n- `typos`: スペルチェック\n- `codespell`: コード内のスペルミスチェック\n\n### lintスクリプトの詳細\n\n`lint.sh` スクリプトは以下の特徴を持っています：\n\n- 必要なコマンドの存在をチェック\n- コマンドが見つからない場合にエラーを表示\n- 各ツールの実行結果に応じて終了ステータスを設定\n- `goimports`で検出されたエラーは自動修正\n- その他のエラーは手動修正が必要\n\n#### スクリプト使用上の注意\n\n- false positiveがある場合:\n    - `typos`については `_typos.toml` を編集\n    - `codespell`については `.codespellrc` を編集\n\n## セキュリティ対策\n\n本アプリケーションは、以下の包括的なセキュリティ対策を実装しています\n\n1. 暗号学的に安全な乱数生成\n\n    - `crypto/rand`パッケージを使用し、暗号学的に安全な乱数生成を実現\n    - 予測不可能で高エントロピーなパスワード生成\n\n2. クロスサイトスクリプティング（XSS）対策\n\n    - Content Security Policy (CSP)ヘッダーの厳格な設定\n    - スクリプトソースを厳密に制限\n    - インラインスクリプトの実行を最小限に抑制\n    - 外部スクリプトの読み込みを禁止\n\n3. クロスサイトリクエストフォージェリ（CSRF）対策\n\n    - 暗号学的に安全なCSRFトークンの生成\n    - 各リクエストでトークンを検証\n    - トークンは環境に応じて動的に生成\n    - 本番環境では厳格な検証を実施\n\n4. レートリミティング\n\n    - リクエスト数を制限し、過剰なリクエストからアプリケーションを保護\n    - 1分間100リクエストまでに制限\n    - 一定時間内のリクエスト数を監視\n\n5. 入力バリデーション\n\n    - サーバーサイドでの厳格な入力検証\n    - 不正なパス、過大なリクエストサイズを排除\n    - パスワード生成パラメータの厳密な検証\n\n6. セキュリティヘッダー\n\n    - X-Content-Type-Options: MIMEタイプスニッフィングを防止\n    - X-Frame-Options: クリックジャッキング対策\n    - Strict-Transport-Security: HTTPSへの強制リダイレクト\n    - Referrer-Policy: リファラー情報の漏洩を防止\n\n7. ロギングとモニタリング\n\n    - 構造化ロギングによるリクエスト詳細の記録\n    - エラー時の詳細なログ出力\n    - 潜在的なセキュリティイベントの追跡\n\n8. 依存性管理\n\n    - 最新のGoバージョンを使用\n    - 定期的な依存ライブラリの更新\n    - 既知の脆弱性に対する継続的な監視\n\n9. 本番環境とdev環境の分離\n\n    - 環境に応じたセキュリティ設定の動的な変更\n    - 開発環境と本番環境で異なるセキュリティ戦略\n\n10. アクセス制御\n\n    - デフォルトで最小権限の原則を適用\n    - 不要な機能や情報の公開を防止\n\n### 推奨される追加セキュリティ対策\n\n- SSL/TLSの強制\n- 定期的なセキュリティ監査の実施\n- 侵入テストの実施\n\n- **注意**\n    - これらの対策は完全なセキュリティを保証するものではありません。常に最新のセキュリティ情報に注意を払い、継続的な改善が必要です。\n\n## セキュリティに関する注意\n\n- パスワード生成には `crypto/rand` を使用し、暗号学的に安全な乱数を生成\n- 生成されるパスワードはランダム性が高く、予測困難\n\n## プロジェクト構造\n\n```shell\n.\n├── cmd\n│   └── server\n│       ├── main.go          # アプリケーションのエントリーポイント\n│       └── main_test.go     # サーバー関連のテスト\n├── internal\n│   ├── config\n│   │   └── password.go      # パスワード設定の定義\n│   ├── generator\n│   │   └── password.go      # パスワード生成ロジック\n│   └── handler\n│       └── password.go      # HTTPハンドラー\n└── lint.sh                  # コード品質チェックスクリプト\n```\n\n## 貢献\n\n1. Issueを確認\n2. フォーク\n3. 機能追加/バグ修正のブランチを作成\n4. テストを追加\n5. コードをプッシュ\n6. プルリクエストを送信\n\n## ライセンス\n\nMITライセンス\n\n## 免責事項\n\nこのアプリケーションは教育目的および個人利用を想定しています。重要なシステムのパスワード生成には、専門的なパスワードマネージャーの利用を推奨します。\n\n## お問い合わせ\n\n質問や提案があれば、Issueを開いてください。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokamyuji%2Fpasswordgenerator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fokamyuji%2Fpasswordgenerator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokamyuji%2Fpasswordgenerator/lists"}