deploy-script-review

배포 스크립트의 보안·안전성 리뷰를 수행한다. 롤백 절차, 장애 대응, 권한 설정을 점검한다.

16 stars

Best use case

deploy-script-review is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

배포 스크립트의 보안·안전성 리뷰를 수행한다. 롤백 절차, 장애 대응, 권한 설정을 점검한다.

Teams using deploy-script-review should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/deploy-script-review/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/devops/deploy-script-review/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/deploy-script-review/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How deploy-script-review Compares

Feature / Agentdeploy-script-reviewStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

배포 스크립트의 보안·안전성 리뷰를 수행한다. 롤백 절차, 장애 대응, 권한 설정을 점검한다.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

당신은 신중한 시니어 엔지니어다. $ARGUMENTS 를 대상으로 아래 작업을 수행하라.

## 목적

배포 스크립트 및 배포 설정을 **안전성 관점**에서 리뷰한다.  
롤백 절차의 완성도, 에러 처리, 권한 설정, 비밀 정보 관리, 멱등성을 점검하고, 운영(프로덕션) 배포 시 발생할 수 있는 리스크를 최소화하기 위한 개선안을 제시한다.

## 입력

- 배포 스크립트 파일 경로 또는 배포 관련 디렉터리 (필수)
- 선택: 대상 환경 (staging / production / 전체 환경)
- 선택: 배포 대상 (웹 애플리케이션, API 서버, 배치 작업 등)
- 선택: 과거 배포 장애 이력
- 정보가 부족하면 사용자에게 질문한다

## 절차

1. **배포 스크립트 전체 구조 파악**
   - 지정된 스크립트·설정 파일을 Read로 확인
   - Glob으로 배포 관련 파일을 전수 조사:
     - 셸 스크립트 (`deploy.sh`, `rollback.sh` 등)
     - Docker 관련 (`Dockerfile`, `docker-compose.yml`, `docker-compose.prod.yml`)
     - IaC 파일 (`terraform/`, `ansible/`, `k8s/` 디렉터리)
     - CI/CD 배포 작업 (`.github/workflows/` 내 배포 워크플로)
   - 배포 전체 흐름(빌드 → 테스트 → 배포 → 검증)을 정리

2. **에러 처리 점검**
   - Grep으로 아래 항목 검색 후 적절성 평가:
     - `set -e`, `set -o pipefail` (셸 스크립트)
     - `trap` 기반 정리(cleanup) 로직
     - 단계별 반환값 체크
     - 타임아웃 설정
   - 에러 발생 시 동작 방식 확인 (중단 / 계속 / 알림 / 롤백)
   - 일부만 성공한 상태(부분 배포)에 대한 대응 여부 확인

3. **롤백 절차 검증**
   - 롤백 스크립트 또는 문서 존재 여부 확인
   - 다음 조건 충족 여부 점검:
     - 이전 버전으로 되돌리는 방법이 구체적으로 정의되어 있는가
     - DB 마이그레이션 롤백이 고려되어 있는가
     - 롤백 실패 시 대응 방안이 정의되어 있는가
     - 롤백 후 데이터 정합성이 보장되는가
   - 롤백 실행 조건 확인 (자동 / 수동 / 헬스체크 연동)

4. **보안 점검**
   - Grep으로 다음 보안 리스크 탐지:
     - 비밀 정보 하드코딩 (비밀번호, 토큰, 연결 문자열)
     - 과도한 권한 사용 (root 실행, chmod 777, 와일드카드 과다 사용)
     - 암호화되지 않은 통신 (HTTP, 암호화 없는 연결 문자열)
     - 로그에 비밀 정보 출력
   - 환경 변수 및 시크릿 관리 방식 점검
   - 실행 사용자 권한이 최소 권한 원칙을 따르는지 확인

5. **멱등성 및 신뢰성 점검**
   - 동일 스크립트를 여러 번 실행해도 안전한지 검증
   - 다음 항목 확인:
     - 파일 덮어쓰기·삭제가 안전하게 수행되는가
     - DB 마이그레이션이 중복 실행되지 않는가
     - 프로세스 중지·기동 시 충돌 가능성은 없는가
     - 무중단 배포 구조 존재 여부 (블루그린, 롤링, 카나리 등)
   - 헬스체크 및 스모크 테스트 존재 여부 및 실행 시점 확인

6. **개선안 정리**
   - 발견된 문제를 중요도 기준으로 분류:
     - **Critical**: 즉시 수정 필요 (비밀 정보 노출, 롤백 불가, 데이터 손실 위험)
     - **High**: 배포 전 수정 권장 (에러 처리 부족, 권한 설정 문제)
     - **Medium**: 개선 권장 (멱등성 강화, 로그 개선, 자동화 보완)
     - **Low**: 모범 사례와의 차이 (주석 부족, 네이밍 일관성)
   - 각 항목에 대해 구체적인 수정 방안 제시

## 출력 형식

```markdown
## 리뷰 대상

- **스크립트/설정**: [리뷰한 파일 목록]
- **대상 환경**: [staging/production/전체]
- **배포 방식**: [감지된 배포 방식 (블루그린, 롤링 등)]
- **종합 리스크 평가**: [낮음/보통/높음/Critical]

## 점검 결과 요약

| 중요도 | 건수 | 주요 문제 |
|--------|------|----------|
| Critical | [N건] | [요약] |
| High | [N건] | [요약] |
| Medium | [N건] | [요약] |
| Low | [N건] | [요약] |

## 점검 결과 상세

### Critical

#### 1. [문제 제목]

- **파일**: [파일경로:라인번호]
- **문제**: [문제 내용]
- **리스크**: [방치 시 발생 가능 문제]
- **개선안**: [구체적 수정 방법]

### High / Medium / Low

[동일 형식으로 작성]

## 롤백 평가

- **롤백 절차**: [있음/없음/불완전]
- **DB 롤백**: [대응 있음/없음/확인 불가]
- **자동 롤백**: [헬스체크 연동 있음/없음]
- **개선 제안**: [보완 방안]

## 보안 평가

- **비밀 정보 관리**: [적절/개선 필요(상세)]
- **실행 권한**: [최소 권한/과도함(상세)]
- **통신 암호화**: [적절/개선 필요(상세)]

## 체크리스트

- [ ] 모든 단계에 에러 처리가 설정되어 있음
- [ ] 롤백 절차가 문서화 및 테스트되어 있음
- [ ] 비밀 정보가 코드에 직접 작성되어 있지 않음
- [ ] 멱등성이 보장됨
- [ ] 배포 후 헬스체크/스모크 테스트 실행됨
- [ ] 배포 각 단계가 로그에 기록됨
- [ ] 실행 권한이 최소 수준으로 설정됨

## 권장 조치

| 우선순위 | 조치 항목 | 이유 |
|----------|-----------|------|
| 1 | [가장 먼저 대응할 항목] | [이유] |
| 2 | [그 다음 대응 항목] | [이유] |
| 3 | [여유 시 대응 항목] | [이유] |
```

## 보안 유의사항

- 배포 스크립트를 실행하거나 수정하지 않는다. 읽기 및 분석만 수행한다.
- 발견된 비밀 정보는 그대로 출력하지 않고, 존재 여부와 위치만 보고한다 (예: `db_password=****`).
- 운영 환경에 접속을 시도하지 않는다.
- `.env`, `secrets/`, `credentials/` 등 비밀 정보 파일은 읽지 않는다.
- 본 리뷰는 정적 분석 기반의 개선 제안이며, 보안을 보장하는 감사 결과는 아니다.

## 종료 조건

위 출력 형식에 맞춘 배포 스크립트 리뷰 보고서를 작성하면 종료한다.
문제가 중요도별로 분류되어 있고, 롤백 평가·보안 평가·체크리스트·권장 조치가 포함되어 있어야 한다.
스크립트 수정은 사용자의 추가 지시를 기다린다.

## 이 스킬이 적합하지 않은 경우

- **리뷰 결과만으로 보안을 보장해야 하는 경우**: 이 스킬은 정적 분석만 수행한다. 실제 인프라 구성(네트워크, 권한, 시크릿 관리 등)은 별도 검증이 필요하다.
- **Kubernetes / Terraform 등 IaC 전문 리뷰가 필요한 경우**: 인프라 코드 전문 감사에는 적합하지 않다. 셸 스크립트 기반 배포가 주요 대상이다.

Related Skills

DevOps & Deployment

16
from diegosouzapw/awesome-omni-skill

Use when setting up CI/CD pipelines, containerizing applications, deploying to Kubernetes, or writing infrastructure as code. DevOps & Deployment covers GitHub Actions, Docker, Helm, and Terraform patterns.

devops-deployer

16
from diegosouzapw/awesome-omni-skill

Comprehensive DevOps and deployment workflow that orchestrates infrastructure automation, CI/CD pipelines, container orchestration, and cloud deployment. Handles everything from infrastructure as code and pipeline setup to monitoring, scaling, and disaster recovery.

deployment-wizard

16
from diegosouzapw/awesome-omni-skill

Deploy local websites to the internet instantly via Cloudflare Tunnel. Zero hosting, zero domain needed.

deployment-validation-config-validate

16
from diegosouzapw/awesome-omni-skill

You are a configuration management expert specializing in validating, testing, and ensuring the correctness of application configurations. Create comprehensive validation schemas, implement configurat

deployment-safety

16
from diegosouzapw/awesome-omni-skill

Pre-deployment checklists, rollback strategies, and post-deploy verification. Use this skill when preparing to deploy code, reviewing deployment processes, or setting up CI/CD pipelines.

deployment-procedures

16
from diegosouzapw/awesome-omni-skill

Production deployment principles and decision-making.

deployment-playbook

16
from diegosouzapw/awesome-omni-skill

Safe deployment steps and verification.

deployment-pipeline-design

16
from diegosouzapw/awesome-omni-skill

Design multi-stage CI/CD pipelines with approval gates, security checks, and deployment orchestration. Use when architecting deployment workflows, setting up continuous delivery, or implementing GitOps practices.

deployment-patterns

16
from diegosouzapw/awesome-omni-skill

Deployment workflows, CI/CD pipeline patterns, Docker containerization, health checks, rollback strategies, and production readiness checklists for web applications.

deployment-infrastructure

16
from diegosouzapw/awesome-omni-skill

Kubernetes deployment and infrastructure patterns

deployment-git

16
from diegosouzapw/awesome-omni-skill

Deployment and Git workflow guides for Kailash applications including Docker deployment, Kubernetes orchestration, and Git workflows. Use when asking about 'deployment', 'Docker deployment', 'Kubernetes deployment', 'containerization', 'K8s', 'Git workflow', 'Git branching', 'CI/CD', 'production deployment', 'Docker compose', or 'container orchestration'.

deployment-generator

16
from diegosouzapw/awesome-omni-skill

Use when users request Kubernetes deployment configs, CI/CD pipelines, or Docker configurations - ensures systematic discovery, complete artifact generation, and production-ready best practices through structured workflow