Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .gitleaks.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,11 @@ regexes = [
'''(?i)test-project''',
'''(?i)dummy-account'''
]

[[rules]]
id = "monopo-internal-domain"
description = "インフラ構成の過剰露出 - 内部ネットワーク・社内エンドポイントのハードコード検知"
regex = '''(?i)\b[a-z0-9](?:[a-z0-9\-]*[a-z0-9])?\.(?:internal|local|corp|staging\.monopo\.com)\b'''
Comment thread
genzouw marked this conversation as resolved.
Resolved
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
tags = ["infrastructure", "internal-domain"]
secretGroup = 0
entropy = 0.0
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
4 changes: 4 additions & 0 deletions docs/security/leak-prevention.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,7 @@
- **推奨(リポジトリ管理者向け)**: リポジトリ設定 (Settings > Code security and analysis) から、GitHub ネイティブの **Secret Scanning** と **Push Protection** を有効化することを強く推奨します。これにより、プッシュ時の検知がさらに強化されます(※この設定はリポジトリ管理者のみが変更できます)。
- 本番のシークレットや接続情報(DB、SaaS)を直接コードにハードコードせず、必ず環境変数を使用してください。
- PR 作成時など、誤って秘密情報を含めてしまったことに気づいた場合は、速やかに管理者に連絡し、必要に応じて該当シークレットの無効化(ローテーション)を行ってください。

### インフラ構成・内部エンドポイントの露出防止

ローカル環境やCI環境の `gitleaks` によるシークレットスキャンにおいて、`.gitleaks.toml` カスタムルール (`monopo-internal-domain`) により、内部インフラ特有のドメイン(例: `.internal`, `.local`, `.corp`, `staging.monopo.com` など)のハードコードを検知・ブロックしています。これにより、意図せぬ社内ネットワーク情報の過剰露出を防ぎます。
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
Loading