Closed10

GitHubをorgレベルでセキュアに運用する設定

tmknomtmknom

GitHub Actions

changelogにのみ記載?

tmknomtmknom

GitHub Repositories

tmknomtmknom

GitHub Organizations

tmknomtmknom

Enterprise administrators

tmknomtmknom

Code security

tmknomtmknom

全体

二要素認証の強制

ドメインの所有権確認と通知先制御

IPアドレス制限

IAM

Team

  • 運用ポリシーがない状態で許可するとカオスになる
    • 作りっぱなしで放置されるTeamが大量に爆誕し、機能不全に陥りがち
    • 自由に作れるようにするならポリシーを定める、それができないなら禁止して少数のTeamを中央集権的に管理するほうがいい気がする
    • Setting team creation permissions in your organization【Organizations】

Outside collaborators

SAML

Monitoring

GitHub Pages

Apps

Deleting issues

SSH certificate authorities

機能制限

リポジトリ

Base permissions

Restricting repository creation

Restricting repository visibility changes

Managing the forking policy

Setting permissions for deleting or transferring repositories

Configuring the retention period

Managing security and analysis settings

GitHub Advanced Security

  • Enterprise限定だが、コードスキャンやシークレットスキャンができる
    • ちなみにサードパーティツールでも同様のツールは存在するので、機能的にはなくてもあまり困らない
    • 有料で提供するぐらいだから、もしかすると精度が高いのかもしれない
    • Enforcing policies for Advanced Security in your enterprise【Enterprise】

GitHub Actions for owners

Restrict the use of actions

Setting the permissions of the GITHUB_TOKEN

Configuring required approval for workflows from public forks

Enabling workflows for private repository forks

tmknomtmknom

GitHub Actions for developers

Deployment

  • Enterprise限定でプライベートリポジトリでenvironmentsが解禁される
    • 環境単位でSecretsが定義できたり履歴が見れたりと便利そうだが財力がひつよう
  • Deploying with GitHub Actions【GitHub Actions】

Environment protection rules

  • 環境ごとにapproveを必須にしたり、デプロイブランチを固定できたりする
    • 最高感あるが、プライベートリポジトリはEnterprise限定である
  • Environment protection rules

OpenID Connect

Secrets

  • Using secrets
    • Never use structured data as a secret
    • Register all secrets used within workflows
    • Audit how secrets are handled
    • Use credentials that are minimally scoped
    • Audit and rotate registered secrets
    • Consider requiring review for access to secrets

CODEOWNERS

Mitigating script injection attacks

サードパーティアクション

  • Using third-party actions
    • Pin actions to a full length commit SHA
    • Audit the source code of the action
    • Pin actions to a tag only if you trust the creator

クロスリポジトリアクセス

Self-hosted runners

Auditing

攻撃の種類

このスクラップは2022/03/21にクローズされました