{"id":20324618,"url":"https://github.com/gh640/wordpress-security-ja","last_synced_at":"2026-06-07T17:32:03.468Z","repository":{"id":179117349,"uuid":"662989274","full_name":"gh640/wordpress-security-ja","owner":"gh640","description":"🔒  (Japanese) WordPress サイトのセキュリティに関するまとめ","archived":false,"fork":false,"pushed_at":"2023-12-11T05:23:28.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-14T14:17:12.735Z","etag":null,"topics":["wordpress"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gh640.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-07-06T10:09:02.000Z","updated_at":"2023-07-06T10:11:57.000Z","dependencies_parsed_at":"2023-12-11T07:48:34.600Z","dependency_job_id":null,"html_url":"https://github.com/gh640/wordpress-security-ja","commit_stats":null,"previous_names":["gh640/wordpress-security-ja"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gh640%2Fwordpress-security-ja","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gh640%2Fwordpress-security-ja/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gh640%2Fwordpress-security-ja/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gh640%2Fwordpress-security-ja/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gh640","download_url":"https://codeload.github.com/gh640/wordpress-security-ja/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241827871,"owners_count":20026788,"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":["wordpress"],"created_at":"2024-11-14T19:36:33.897Z","updated_at":"2026-06-07T17:32:03.396Z","avatar_url":"https://github.com/gh640.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# WordPress サイトのセキュリティ\n\nWordPress サイトのセキュリティに関するまとめです。\n\n- [攻撃の種類](#攻撃の種類)\n- [セキュリティ施策](#セキュリティ施策)\n- [参考文献](#参考文献)\n\n## 攻撃の種類\n\nWordPress サイトに対してよくある攻撃の種類として以下のようなものがあります。\n\n- コードインジェクション\n- \u003cruby\u003eCSRF \u003crp\u003e(\u003e\u003c/rp\u003e\u003crt\u003eクロスサイト・リクエスト・フォージェリ\u003c/rt\u003e\u003crp\u003e)\u003c/rp\u003e\u003c/ruby\u003e\n- ディレクトリ・トラバーサル\n- アクセス制御・認可制御の不備の悪用\n- セッション管理の不備の悪用\n- ブルートフォースアタック\n- クリックジャッキング\n- DoS\n\nWordPress サイトの開発・運用においては、これらの攻撃の可能性を考慮して、インシデントのリスクレベルと予算に応じた施策を行うことが必要です。\n\n## セキュリティ施策\n\nWordPress サイトにおけるセキュリティ施策として以下のようなものがあります。\n\n### 開発\n\n- [ ] 一般的なウェブアプリケーションセキュリティの原則を学び実践する\n- [ ] WordPress の適切な API を利用する\n    - [ ] ユーザーの入力値・クライアントから送信されたデータにはインジェクション対策を行う\n    - [ ] カスタムフォーム実装時には nonce の利用・チェックを行う\n- [ ] カスタムテーマやカスタムプラグインの PHP ファイルへの直アクセスを拒否する\n    - `defined( 'ABSPATH' ) || exit;`\n- [ ] ユーザーロールと権限を適切に設定する\n- [ ] ユーザー登録権限を適切に設定する\n- [ ] クライアントからのリクエストデータや入力値に適切な上限値を設定する\n- [ ] セキュリティ向上に有用な HTTP ヘッダーを付ける\n    - [ ] `X-Content-Type-Options`\n    - [ ] `X-Frame-Options`\n    - [ ] `Cross-Origin-Resource-Policy`\n    - [ ] `Strict-Transport-Security`\n    - 参考: [HTTP Headers - OWASP Cheat Sheet Series](https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Headers_Cheat_Sheet.html)\n\n### デプロイ\n\n- [ ] 設定ファイル `wp-config.php` で十分な強度の認証キーとソルトを設定する\n    - [WordPress 公式の秘密鍵生成 API](https://api.wordpress.org/secret-key/1.1/salt/)\n- [ ] ファイルとディレクトリのパーミッションを適切に設定する\n- [ ] 直アクセスが必要無いファイルとディレクトリへのアクセスを拒否する\n    - `wp-admin/`\n    - `wp-includes/`\n    - `wp-config.php`\n    - その他開発用の `.txt` `.json` など\n- [ ] 開発用のプラグインを無効化・削除する\n- [ ] 開発用の機能を無効化する\n    - `WP_DEBUG` など\n- [ ] WordPress アカウントに十分な強度のパスワードを設定する\n- [ ] 管理画面に HTTP 認証（ Basic 認証）をかける\n- [ ] ログインページにブルートフォース対策を施す\n    - reCAPTCHA など\n- [ ] プロトコルには HTTPS を強制する\n- [ ] データベースのユーザー名・パスワードには十分な強度のものを設定する\n\n### サーバー運用\n\n- [ ] ソフトウェアを適時更新する\n    - [ ] WordPress コアを更新する\n        - WordPress の自動更新機能を有効にする\n        - 自動更新機能を使わない場合は別の方法で WordPress コアの更新を行う\n    - [ ] プラグインを更新する\n        - WordPress の自動更新機能を有効にする\n        - 自動更新機能を使わない場合は別の方法でプラグインの更新を行う\n    - [ ] テーマを更新する\n    - [ ] Composer パッケージを更新する\n    - [ ] NPM パッケージを更新する\n    - [ ] PHP を更新する\n    - [ ] HTTP サーバーを更新する\n- [ ] WordPress アカウントの管理を適切に行う\n    - [ ] アカウントの使い回しをしない\n    - [ ] 使わなくなったアカウントは適時削除する\n- [ ] セキュリティ強化プラグインを利用する\n- [ ] ホスティング会社が提供するセキュリティ強化機能を利用する\n- [ ] サーバーマシンへの接続に安全なプロトコル（ SSH / SFTP など）を使う\n- [ ] サイトのバックアップを定期的に行う\n- [ ] ファイヤウォールを利用する\n- [ ] 攻撃の多いアクセス元を遮断する\n\n### モニタリング\n\n- [ ] アクセスログ・エラーログを出力する\n- [ ] エラー発生時に管理者に通知を送り適時対応する\n\n### 情報収集\n\n- [ ] 関連するセキュリティ情報をウォッチする\n    - [Security – WordPress News](https://wordpress.org/news/category/security/)\n\n## 参考文献\n\n### WordPress 公式\n\n- [Security – WordPress.org](https://wordpress.org/about/security/)\n- [Hardening WordPress – WordPress.org Documentation](https://wordpress.org/documentation/article/hardening-wordpress/)\n- [Security | Common APIs Handbook | WordPress Developer Resources](https://developer.wordpress.org/apis/security/)\n- [Updating WordPress – Documentation](https://wordpress.org/documentation/article/updating-wordpress/)\n\n### その他\n\n- [OWASP Top Ten | OWASP Foundation](https://owasp.org/www-project-top-ten/)\n- [安全なウェブサイトの作り方 | 情報セキュリティ | IPA 独立行政法人 情報処理推進機構](https://www.ipa.go.jp/security/vuln/websecurity/index.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgh640%2Fwordpress-security-ja","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgh640%2Fwordpress-security-ja","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgh640%2Fwordpress-security-ja/lists"}