다음을 통해 공유


Microsoft Security DevOps GitHub 작업 구성

Microsoft Security DevOps는 정적 분석 도구를 개발 수명 주기에 통합하는 명령줄 애플리케이션입니다. Security DevOps는 SDL, 보안 및 규정 준수 도구와 같은 최신 버전의 정적 분석 도구를 설치, 구성 및 실행합니다. 보안 DevOps는 여러 환경에서 결정적 실행을 가능하게 하는 이식 가능한 구성으로 데이터 기반입니다.

Microsoft Security DevOps는 다음 오픈 소스 도구를 사용합니다.

이름 Language License
맬웨어 방지 맬웨어를 검색하고 맬웨어가 발견되면 빌드를 중단하는 엔드포인트용 Microsoft Defender의 Windows 맬웨어 방지 보호. 이 도구는 windows-latest 에이전트에서 기본적으로 검색합니다. 오픈 소스 아님
Bandit 파이썬 Apache 라이선스 2.0
BinSkim 바이너리--Windows, ELF MIT 라이선스
Checkov Terraform, Terraform 계획, CloudFormation, AWS SAM, Kubernetes, Helm 차트, Kustomize, Dockerfile, 서버리스, Bicep, OpenAPI, ARM Apache 라이선스 2.0
ESlint JavaScript MIT 라이선스
템플릿 분석기 ARM 템플릿, Bicep MIT 라이선스
Terrascan Terraform(HCL2), Kubernetes(JSON/YAML), Helm v3, Kustomize, Dockerfiles, CloudFormation Apache 라이선스 2.0
Trivy 컨테이너 이미지, IaC(Infrastructure as Code) Apache 라이선스 2.0

필수 조건

Microsoft Security DevOps GitHub 작업 구성

GitHub 작업을 설정하려면 다음을 수행합니다.

  1. GitHub에 로그인하세요.

  2. GitHub 작업을 구성할 리포지토리를 선택합니다.

  3. 작업을 선택합니다.

    작업 단추가 있는 위치를 보여 주는 스크린샷

  4. 새 워크플로를 선택합니다.

  5. GitHub Actions 시작 페이지에서 직접 워크플로 설정을 선택합니다.

    새 워크플로 단추를 선택할 위치를 보여 주는 스크린샷

  6. 텍스트 상자에 워크플로 파일의 이름을 입력합니다. 예: msdevopssec.yml.

    새 워크플로의 이름을 입력할 위치를 보여 주는 스크린샷

  7. 다음 샘플 작업 워크플로 를 복사하여 새 파일 편집 탭에 붙여넣습니다.

    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를 참조하세요.

  8. 커밋 시작 선택

    커밋 시작을 선택할 위치를 보여 주는 스크린샷.

  9. 새 파일 커밋을 선택합니다. 프로세스를 완료하는 데 최대 1분이 걸릴 수 있습니다.

    새 파일을 커밋하는 방법을 보여 주는 스크린샷

  10. 작업을 선택하고 새 작업이 실행 중인지 확인 합니다 .

    새 작업이 실행 중인지 확인하기 위해 이동할 위치를 보여 주는 스크린샷.

검사 결과 보기

검사 결과를 보려면 다음을 수행합니다.

  1. Azure에 로그인합니다.

  2. Defender for Cloud > DevOps Security로 이동합니다.

  3. DevOps 보안 블레이드를 통해 개발자가 자신의 CI 로그에서 보는 동일한 MSDO 보안 결과를 연결된 리포지토리에서도 몇 분 내에 볼 수 있습니다. GitHub Advanced Security를 사용하는 고객은 이러한 도구에서 수집된 결과도 볼 수 있습니다.

더 알아보세요

다음 단계

클라우드용 Defender의 DevOps 보안에 대해 자세히 알아봅니다.

GitHub 조직을 Defender for Cloud에 연결하는 방법을 알아봅니다.