소규모 EC 팀의 Bicep 안전 리뷰
Claude Code로 Bicep scope, secret, what-if, 공개 설정, rollback을 점검합니다.
세일 주말 전, 소규모 EC 팀이 작년에 돌아갔다는 이유만으로 오래된 Bicep 파일을 운영에 바로 배포하면 위험합니다. main.bicep은 Storage, App Service, Key Vault, 결제 key, public access, SKU를 바꿀 수 있습니다. scope, secret, what-if를 읽지 않으면 트래픽이 오를 때 문제가 납니다.
Key Points
- scope, parameter, secret, public access, 비용, rollback을 봅니다.
- Bicep은 읽기 쉽지만 짧은 파일도 운영을 바꿉니다.
- what-if는 배포 전 변경을 보는 입구입니다.
- Claude Code는 표를 만들고, 사람은 승인합니다.
- what-if에서 멈춘 항목, 평문 secret, public setting, 검토 시간을 봅니다.
Workflow: Review Bicep Before Deploy
main.bicep, parameters, environment, resource group, what-if, rollback note부터 봅니다. Claude Code에 주기 전 secret 값은 제거합니다.
| Source | Review field | Human decision |
|---|---|---|
| Scope | resource group, subscription | production impact |
| Parameters | SKU, location, secret-like names | cost and payment safety |
| Resources | storage, web app, key vault | public access and customer impact |
| What-if | Create, Modify, Delete | deploy approval |
| Rollback | owner, stop note | sale-day response |
Primary sources checked: Bicep overview, file structure, best practices, what-if, secure parameters, modules, and Azure CLI deploy.
What Claude Code Does And What Humans Decide
Claude Code can list resources, parameters, modules, public settings, secret-like names, and what-if risks. Humans decide production deploy, deletion, SKU, payment keys, customer data, public URL, firewall, cost, and rollback.
3 Use Cases
Use case 1: Read scope before production
- Input: main.bicep, resource group, subscription, environment, existing resources.
- Output: create/modify/delete table, scope, resource type, business impact.
- Human review: production target, SKU, region, public URL, deletion, payment resources.
Use case 2: Find risky parameters
- Input: parameters, parameter file, Key Vault use, connection string names.
- Output: secure parameter candidates, plain secret candidates, Key Vault candidates.
- Human review: payment key, email key, database string, customer data, admin password.
Use case 3: Read what-if output
- Input: what-if output, deployment date, rollback note, owner.
- Output: Create/Modify/Delete table, stop condition, approver.
- Human review: Delete, Replace, SKU, public access, cost, sale impact.
Copy-Paste Prompt
Act as an Azure Bicep safety reviewer for a small ecommerce team.
Turn Bicep files into a human deployment review table.
Check targetScope, secret-like parameters, public access, HTTPS, managed identity, what-if Delete/Replace/SKU changes, and rollback notes.
Never run deployment commands.
Return the five rows to inspect today.
Working Check Code
// verify-bicep-safety-notes.mjs
// No dependencies. Run with: node verify-bicep-safety-notes.mjs
const bicepReview = {
template: "main.bicep",
environment: "prod",
scope: "subscription",
resources: [
{ type: "Microsoft.Storage/storageAccounts", name: "ecprodstore", publicNetworkAccess: "Enabled", sku: "Standard_LRS" },
{ type: "Microsoft.Web/sites", name: "ec-sale-app", httpsOnly: false, managedIdentity: false },
{ type: "Microsoft.KeyVault/vaults/secrets", name: "payment-api-key", valueFromParameter: "plainTextPaymentKey" }
],
parameters: [
{ name: "location", secure: false, valueExample: "japaneast" },
{ name: "plainTextPaymentKey", secure: false, valueExample: "sk_live_example" }
],
whatIfAttached: false,
owner: "",
rollbackNote: ""
};
const problems = [];
if (bicepReview.environment === "prod" && !bicepReview.whatIfAttached) {
problems.push({ item: "what-if", fix: "attach az deployment what-if output before production deployment" });
}
if (!bicepReview.owner) {
problems.push({ item: "owner", fix: "assign a human owner for cost, rollback, and approval" });
}
if (!bicepReview.rollbackNote) {
problems.push({ item: "rollback", fix: "write a rollback or stop-the-line note before sale season" });
}
for (const parameter of bicepReview.parameters) {
if (/key|secret|password|token/i.test(parameter.name) && !parameter.secure) {
problems.push({ item: `parameter: ${parameter.name}`, fix: "mark secrets with @secure() or fetch from Key Vault" });
}
}
for (const resource of bicepReview.resources) {
if (resource.publicNetworkAccess === "Enabled") {
problems.push({ item: `public network: ${resource.name}`, fix: "review public access, firewall, private endpoint, or business reason" });
}
if (resource.httpsOnly === false) {
problems.push({ item: `httpsOnly: ${resource.name}`, fix: "enable HTTPS-only before customer traffic" });
}
if (resource.type === "Microsoft.Web/sites" && resource.managedIdentity === false) {
problems.push({ item: `identity: ${resource.name}`, fix: "use managed identity instead of app secrets when possible" });
}
}
if (problems.length > 0) {
console.table(problems);
process.exitCode = 1;
} else {
console.log("Bicep safety review passed.");
}
Pitfall: Common Failure Cases
Readable Bicep is not automatically safe. Review scope, what-if, secrets, public settings, and rollback. Do not place secrets in plain parameters. Do not run what-if and ignore Delete, Replace, SKU, public access, identity, or diagnostics. Do not deploy before sale season without an owner and rollback note.
FAQ
Q. Does a small EC team need Bicep?
A. Start only where changes repeat: sale pages, image delivery, admin apps, and staging environments.
Q. Can Claude Code read Bicep?
A. Yes, after removing secrets, tokens, customer data, and contract details.
Q. Is what-if enough?
A. No. Humans still approve deletion, replacement, SKU, public access, secrets, and rollback.
Q. What should the team inspect today?
A. targetScope, secret-like parameters, public access, what-if Delete/Modify, and rollback note.
Training And Consultation Signal
Measure what-if items stopped, plain secret candidates, public-setting findings, missing rollback notes, review time, and inquiry rate. If those numbers hurt, Bicep and Azure deployment review are a fit for ClaudeCodeLab training.
What I Verified
I checked Microsoft Learn references for Bicep overview, file structure, best practices, what-if, secure parameters, modules, and Azure CLI deployment. I also checked the CTA, executable JavaScript, internal link, external links, locale coverage, and queue removal.
관련 글
웹 제작사의 Codex Desktop PR 리뷰: diff·staging·release 승인 체크리스트
웹 제작사가 Codex로 diff와 PR을 검토할 때 staging 확인, 고객 승인, release 판단을 분리하는 실무 가이드.
커밋 전 3분 점검: Claude Code가 건드린 범위를 확인하고 확정하기
Claude Code가 멋대로 넓힌 변경을 커밋 전 3분에 잡아내는 확인 절차. diff 범위, 검증 로그, 스테이징할 파일 좁히기를 순서대로 설명합니다.
Claude Code First PR Review Rubric: 스타일보다 실제 위험을 먼저 찾기
Claude Code PR 리뷰 전에 P0부터 P3, 증거, 테스트 proof, 댓글 형식을 정해 회귀를 먼저 찾는 실무 가이드.
무료 PDF: Claude Code 치트시트
이메일을 입력하면 명령, 리뷰 습관, 안전한 워크플로를 정리한 PDF를 받을 수 있습니다.
개인정보를 안전하게 관리하며 스팸을 보내지 않습니다.
작성자 소개
Masa
Claude Code 실무 워크플로와 팀 도입을 검증하는 엔지니어입니다.