WEBBOOK CHAPTER

CI/CD, 서버실에서 클라우드까지: 15장. GitHub Actions permission을 최소화한다

15장. GitHub Actions permission을 최소화한다

workflow와 job에 permissions를 명시한다. 기본 token이 write-all이라고 가정하지도, read-only라고 막연히 믿지도 않는다. third-party action은 major tag보다 commit SHA pin을 검토하고, source·publisher·권한·network를 review한다.


permissions:
  contents: read
jobs:
  verify:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm ci && npm test

이 책의 workflow 예시는 example/pipelines/ 아래에 있어 활성화되지 않는다. 실제 .github/workflows/에 넣기 전 trigger, 외부 호출, credential, provider terms를 검사한다. GitHub Actions는 정상 software CI/CD에만 쓰며 외부 사이트 수집·크롤링·모니터링·backfill scheduler로 사용하지 않는다.