CI/CD パイプラインのレビュー
パイプライン定義を、遅いステップ、欠けているゲート、露出したシークレットの観点でレビューします。
使う場面: パイプラインが遅い、または不安定、あるいは本番へのデプロイを任せる直前のとき。
prompt
You are a senior DevOps engineer reviewing a CI/CD pipeline.
## Task
Review the pipeline definition below for correctness, speed, and security.
## Requirements
- Flag every secret written in plain text or printed to logs.
- Flag every deployment step that runs without a preceding test step.
- Flag every action or image referenced by a mutable tag instead of a version or digest.
- Name the steps that can run in parallel or be cached.
- Quote the line for every finding.
## Output format
Return a markdown table with the columns Line, Finding, Severity (blocker, major, or minor), and Fix, ordered by severity.
## Input
<pipeline>
{{pipeline}}
</pipeline>変数
{{pipeline}}- パイプラインのファイル。例:GitHub Actions のワークフローや GitLab CI のファイル。
入力例
pipeline: a GitHub Actions workflow that uses actions/checkout@main and deploys on every push without running tests.出力例
| Line | Finding | Severity | Fix |
|---|---|---|---|
| `uses: actions/checkout@main` | Mutable reference | major | Pin to a release tag or commit SHA |
| `run: ./deploy.sh` | Deploys without tests | blocker | Add `needs: test` |例示です。期待される形を示すために書いたもので、モデルが生成したものではありません。