Microsoft Security DevOps は、静的分析ツールを開発ライフサイクルに統合するコマンド ライン アプリケーションです。 Security DevOps は、SDL、セキュリティ、コンプライアンス ツールなどの最新バージョンの静的分析ツールをインストール、構成、実行します。 Security DevOps は、複数の環境で確定的な実行を可能にする移植可能な構成を備えたデータ ドリブンです。
Microsoft Security DevOps では、次のオープン ソース ツールを使用します。
| 名前 | Language | ライセンス |
|---|---|---|
| マルウェア対策 | マルウェアをスキャンし、マルウェアが見つかった場合にビルドを中断するMicrosoft Defender for EndpointからのWindowsのマルウェア対策保護。 このツールは、Windows 最新のエージェントで既定でスキャンします。 | オープンソースではない |
| Bandit | Python | Apache License 2.0 |
| BinSkim | Binary--Windows、ELF | MIT ライセンス |
| Checkov | Terraform、Terraform plan、CloudFormation、Amazon Web Services (AWS) SAM、Kubernetes、Helm チャート、Kustomize、Dockerfile、サーバーレス、Bicep、OpenAPI、ARM | Apache License 2.0 |
| ESlint | JavaScript | MIT ライセンス |
| Template Analyzer | ARM テンプレート、Bicep | MIT ライセンス |
| Terrascan | Terraform (HCL2)、Kubernetes (JSON/YAML)、Helm v3、Kustomize、Dockerfiles、CloudFormation | Apache License 2.0 |
| Trivy | コンテナー イメージ, コードとしてのインフラストラクチャ (IaC) | Apache License 2.0 |
[前提条件]
Azure サブスクリプション。 Azure サブスクリプションをお持ちでない場合は、開始する前に 無料アカウント を作成してください。
新しいウィンドウで Microsoft Security DevOps GitHub アクション を開きます。
ワークフローのアクセス許可が GitHub リポジトリの読み取りと書き込みに設定されていることを確認します。 これには、Defender for CloudとのフェデレーションのGitHub ワークフローでの "ID トークン: 書き込み" アクセス許可の設定が含まれます。
Microsoft Security DevOps GitHub アクションを構成する
GitHubアクションを設定するには:
GitHub にサインインします。
GitHub アクションを構成するリポジトリを選択します。
[アクション] を選択します。
[New workflow]\(新しいワークフロー\) を選択します。
[GitHub Actions の開始方法] ページで、自分でワークフローを設定する を選択します。
テキスト ボックスに、ワークフロー ファイルの名前を入力します。 たとえば、「
msdevopssec.yml」のように入力します。
次の サンプル アクション ワークフロー をコピーし、[新しいファイルの編集] タブに貼り付けます。
name: MSDO on: push: branches: - main jobs: sample: name: Microsoft Security DevOps # Windows and Linux agents are supported runs-on: windows-latest permissions: contents: read id-token: write actions: read # Write access for security-events is only required for customers looking for MSDO results to appear in the codeQL security alerts tab on GitHub (Requires GHAS) security-events: write steps: # Checkout your code repository to scan - uses: actions/checkout@v3 # Run analyzers - name: Run Microsoft Security DevOps uses: microsoft/security-devops-action@latest id: msdo # with: # config: string. Optional. A file path to an MSDO configuration file ('*.gdnconfig'). # policy: 'GitHub' | 'microsoft' | 'none'. Optional. The name of a well-known Microsoft policy. If no configuration file or list of tools is provided, the policy may instruct MSDO which tools to run. Default: GitHub. # categories: string. Optional. A comma-separated list of analyzer categories to run. Values: 'code', 'artifacts', 'IaC', 'containers'. Example: 'IaC, containers'. Defaults to all. # languages: string. Optional. A comma-separated list of languages to analyze. Example: 'javascript,typescript'. Defaults to all. # tools: string. Optional. A comma-separated list of analyzer tools to run. Values: 'bandit', 'binskim', 'checkov', 'eslint', 'templateanalyzer', 'terrascan', 'trivy'. # Upload alerts to the Security tab - required for MSDO results to appear in the codeQL security alerts tab on GitHub (Requires GHAS) # - name: Upload alerts to Security tab # uses: github/codeql-action/upload-sarif@v3 # with: # sarif_file: ${{ steps.msdo.outputs.sarifFile }} # Upload alerts file as a workflow artifact - required for MSDO results to appear in the codeQL security alerts tab on GitHub (Requires GHAS) # - name: Upload alerts file as a workflow artifact # uses: actions/upload-artifact@v3 # with: # name: alerts # path: ${{ steps.msdo.outputs.sarifFile }}注
その他のツール構成オプションと手順については、Microsoft Security DevOps wiki を参照してください。
[ コミットの開始] を選択する
[ 新しいファイルのコミット] を選択します。 プロセスが完了するまでに最大 1 分かかる場合があることに注意してください。
[ アクション] を 選択し、新しいアクションが実行されていることを確認します。
スキャン結果を表示する
スキャン結果を表示するには:
Azure にサインインします。
Defender for Cloud > DevOps Security に移動します。
DevOps セキュリティ ブレードから、開発者が関連するリポジトリの CI ログに表示するのと同じMicrosoft Security DevOps (MSDO) のセキュリティ結果を数分以内に確認できます。 GitHub Advanced Security を使用しているお客様には、これらのツールから取り込まれた結果も表示されます。
詳細情報
GitHub actions for Azure で Azure 向け GitHub Actions について学習してください。
GitHub から Azure にアプリをデプロイするで、GitHub から Azure にアプリをデプロイする方法を確認してください。
Defender for Cloud での DevOps セキュリティの詳細を確認する。