Skip to content

[codex] セキュリティとPR完了ゲートを現行運用に合わせる#219

Merged
ootakazuhiko merged 1 commit into
mainfrom
codex/github-guide-review-20260523
May 22, 2026
Merged

[codex] セキュリティとPR完了ゲートを現行運用に合わせる#219
ootakazuhiko merged 1 commit into
mainfrom
codex/github-guide-review-20260523

Conversation

@ootakazuhiko

@ootakazuhiko ootakazuhiko commented May 22, 2026

Copy link
Copy Markdown
Collaborator

概要

Closes #218

#153 / #155 の Phase 2 最初の対象として、GitHub 初心者ガイドのうち、アカウント保護、Pull Request 完了ゲート、Actions の token 権限、secret scanning / PAT の説明を現行運用に合わせて強化しました。

AGENTS.md の方針に合わせ、本文の正である manuscript/** に変更を反映し、対応する公開サイト側 docs/** へ同期しています。

主な変更

  • 第4章: 2026-05-23 時点の 2FA 方針、パスキー、セキュリティキー、TOTP、SMS の位置づけを追加
  • 第7章: PR をマージする前の最小ゲート(目的/レビュー/conversation/CI/merge 後)を表で追加し、未解決の review thread が 0 件であることを明示
  • 第9章: GITHUB_TOKENpermissions: contents: read の最小権限例を追加
  • 第10章: fine-grained PAT 優先、classic PAT の注意、secret scanning / push protection / branch protection / ruleset の説明を更新
  • 付録C: 関連する GitHub 公式ドキュメントへの参照を追加
  • 第7章の同期時に残っていた /src/... 参照を、公開サイトの実パスに合わせて /chapters/... へ補正

確認範囲と変更判断

  • 本文の正: manuscript/chapter-account-security/, manuscript/chapter-branch-operations/, manuscript/chapter-github-actions/, manuscript/chapter-security-best-practices/, manuscript/appendix-resources/
  • 公開サイト同期先: 上記に対応する docs/chapters/**docs/appendices/appendix-resources/
  • docs/index.md へのトップページ単独変更は、対応する manuscript/index.md が存在しないため取り下げました。
  • src/ は AGENTS.md で旧/互換系統とされているため、今回の本文レビュー PR では変更対象外にしました。
  • GitHub UI の細かな画面名は変わる可能性があるため、画面操作の詳細化ではなく、現行運用で外せない安全要件・完了ゲートを中心にしました。

公式情報の確認

2026-05-23(Asia/Tokyo)時点で、以下の GitHub 公式ドキュメントを確認しました。

  • About two-factor authentication
  • Managing your personal access tokens
  • Available rules for rulesets / protected branch 関連
  • GITHUB_TOKEN
  • About secret scanning

ローカル検証

  • npm ci(成功。npm audit は 10件: 4 moderate, 5 high, 1 critical)
  • cmp -s による manuscript/** と対応 docs/** の同期確認(対象 5 ファイル)
  • git diff --check / git diff --cached --check
  • 変更 Markdown の npx markdownlint ...
  • 変更 Markdown の python3 scripts/check_markdown_internal_links.py ...
  • python3 scripts/check_bidi_unicode.py
  • npm run docs:quality-gate
  • changed-file marker smoke
    • account security: 2FA 方式の設定手順, パスキー
    • branch operations: PRをマージする前の最小ゲート, 未解決の review thread が 0 件であること
    • GitHub Actions: GITHUB_TOKEN, permissions:, contents: read
    • security best practices: Fine-grained personal access token, Git 管理対象のファイル, ローカルの .env
    • resources: GitHub Docs: 2FA, GitHub Docs: Secret scanning

既存の検証上の注意

  • npm test は既存の src/**/*.md に対する markdownlint MD012/no-multiple-blanks で失敗します。今回の変更対象は manuscript/docs/ のため、PR の主検証は変更 Markdown の lint/link check、docs:quality-gate、GitHub Actions の docs/book QA に寄せています。
  • npm run build はローカル環境のグローバル jekyll 4.4.1 と Gemfile 要求 jekyll 4.3.4 の競合で失敗します。bundle exec jekyll build はリポジトリルート source では成功しましたが、公開 Pages と同じ docs source build はローカル Gemfile に jekyll-relative-links がないため再現できませんでした。GitHub Actions の Pages build を merge 後 gate とします。

残リスク / follow-up

  • src/ 側の markdownlint baseline と npm script 整理は、本文レビューとは分離した follow-up 候補です。
  • npm audit 10件は依存関係更新の follow-up 候補です。

Copilot AI review requested due to automatic review settings May 22, 2026 19:12

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ac8925f0d5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/index.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

本PRは、初心者向けガイド(docs/)のセキュリティおよび Pull Request の完了ゲート(マージ前後の最小確認事項)を、現行運用に合わせて強化する更新です(Issue #218 対応の一部)。

Changes:

  • トップページに、最小ゲート(Issue→PR→Review→CI→merge後確認)の学習成果と、AI/外部サービス共有時の注意を追記
  • セキュリティ章で PAT / secret scanning / push protection / ruleset 等の説明を現行寄りに更新
  • Actions 章に GITHUB_TOKENpermissions の最小化例、PR章にマージ前の最小ゲート表、付録に公式Docs参照を追加

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
docs/index.md 学習成果に最小ゲートを追加し、AI/外部サービス共有時の注意を追記
docs/chapters/chapter-security-best-practices/index.md PATの選び方/最小ルール、code scanning・secret scanning、ruleset等の記述を強化
docs/chapters/chapter-github-actions/index.md GITHUB_TOKENpermissions: contents: read の最小権限例を追加
docs/chapters/chapter-branch-operations/index.md PRマージ前の最小ゲート表を追加し、品質ゲート説明を補強
docs/chapters/chapter-account-security/index.md 2FA方針(2026-05-23時点)とパスキー/セキュリティキー等の位置づけを追記
docs/appendices/appendix-resources/index.md 2FA/PAT/rulesets/GITHUB_TOKEN/secret scanning の公式Docsリンクを追加

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/chapters/chapter-security-best-practices/index.md Outdated
Comment thread docs/chapters/chapter-branch-operations/index.md Outdated
Comment thread docs/chapters/chapter-account-security/index.md Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[#153/#155] GitHub 初心者ガイドを深掘りレビューする

2 participants