一键导入
crown-jewels-security
Deterministic procedure to evaluate Azure resources against a fixed security rule pack and emit a severity-scored crown jewels report.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Deterministic procedure to evaluate Azure resources against a fixed security rule pack and emit a severity-scored crown jewels report.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Deterministic procedure to watch an ARM deployment, evaluate a health gate, and automatically cancel + redeploy the last-known-good template on breach.
Deterministic procedure to find tag-non-compliant Azure resources, emit a fixed-format report, and (on explicit authorisation) deploy ARM patches to apply missing tags.
Deterministic procedure to inspect an ARM template, cross-reference affected resources via ARG, categorize each change, flag policy violations and dependency fan-out, and emit a fixed-format risk report.
Deterministic procedure to surface top cost-driving resources by querying ARG for new/resized resources in a time window, joined with owner tags, and emit a fixed-format markdown report.
Deterministic procedure to provision, monitor, and cancel pre-approved ARM golden-path template deployments with naming guardrails, tag enforcement, and compliance checks.
Deterministic procedure to compare a checked-in ARM template with live Azure state and emit a property-level drift report in markdown + JSON patch (RFC 6902) format.
| name | crown-jewels-security |
| description | Deterministic procedure to evaluate Azure resources against a fixed security rule pack and emit a severity-scored crown jewels report. |
Inputs:
scope: name of a runbook under runbooks/<scope>.yaml. Defaults to prod.mode: one of scan (default), drilldown <resource_id>.runbooks/<scope>.yaml as raw text. If a sibling runbooks/<scope>.values.yaml
exists, parse it and substitute every ${key} token in the runbook text with the
corresponding value (lists/maps are inlined as YAML). Then parse the substituted
text as YAML. If <scope>.values.yaml is missing, abort with the literal message:
ABORT: runbooks/<scope>.values.yaml missing — copy <scope>.values.yaml.example and fill in real values.subscriptions[], workload_key (default
resourceGroup), rg_include[], rg_exclude[], severity_weights (map of
category → weight multiplier, default all 1.0), export_format (sarif | csv,
default sarif), crown_jewel_tags (optional tag key=value filter; if present,
only resources bearing at least one matching tag are eligible for the crown-jewels
table).skills/crown-jewels-security/rules/rules.yaml. Compute SHA-256 of the file
contents; keep first 8 hex chars as ruleset_hash8.run_id = "SEC-" + UTC date YYYYMMDD + "-" + scope + "-" + ruleset_hash8.For each rule in rules.yaml in file order:
rule.kql is missing → record status: SKIPPED and continue.rule.skip_if_unavailable == true (R002, R005):
validate_query with query = rule.kql, subscriptions = runbook.subscriptions.status: INVALID, store error message, continue.execute_query with the same arguments.execute_query returns an empty result set or any error mentioning
authorizationresources (table not found, insufficient permission) →
emit output row STATUS=SKIPPED REASON=authorizationresources-unavailable
and continue with the next rule. Do not abort.skip_if_unavailable) Call validate_query with
query = rule.kql, subscriptions = runbook.subscriptions.
status: INVALID, store error message, continue.execute_query with the same arguments.rg_include / rg_exclude filters from runbook to returned rows.
If crown_jewel_tags is set, additionally filter rows to only those whose
resource tags contain at least one of the specified key=value pairs.{rule_id, weight, severity, resource_id, resource_name, resourceGroup}.For each resource that appears in at least one rule's results:
severity_score = sum(rule.weight * severity_weights[rule.category]
for each rule where the resource appears in results)
severity_weights[category] defaults to 1.0 if the category is not listed in the
runbook's severity_weights map. Round final score to integer.
Sort order: descending by severity_score; ties broken by ascending
resource_name (case-insensitive).
scantemplates/output-report.md.{{run_id}}, {{scope}}, {{generated_utc}} (ISO 8601 to seconds, UTC, Z suffix),
{{rules_total}}, {{rules_evaluated}}, {{rules_skipped}}, {{rules_invalid}},
{{resources_scored}}, {{ruleset_hash8}}.{{top_crown_jewels_table}} — top 10 rows sorted descending by severity_score,
ties by resource_name ascending. Columns: Rank, Resource, Resource Group,
Severity Score, Matched Rules.{{rule_findings_table}} — one row per rule with at least one hit, sorted
descending by weight, ties by rule_id ascending. Columns: Rule ID,
Title, Severity, Weight, Matched Resources.{{skipped_rules_block}} — list of rules with STATUS=SKIPPED or STATUS=INVALID,
each on its own line. Include REASON where applicable.exports/ according to export_format:
drilldown <resource_id>templates/output-drilldown.md.rule_id, severity, weight, and the verbatim kql.INVALID with the error and continue.authorizationresources rules): rule has no hits; do not include
it in the findings table.authorizationresources errors on R002/R005: emit
STATUS=SKIPPED REASON=authorizationresources-unavailable and continue.rules.yaml cannot be read, abort with: ABORT: rules.yaml unreadable.# Crown Jewels Security Posture.