شعار Defender Secure Score Monitor

Defender Secure Score Monitor

المجتمع
ricmmartins
defender-secure-score-monitor

راقب Secure Score في Microsoft Defender for Cloud واعمل على تحسينه. يتتبع اتجاهات النتيجة، ويحدّد التحسينات السريعة لرفعها، ويتحقق من تغطية خطط Defender، ويسلّط الضوء على توصيات الأمان المهمة. استخدمه عند السؤال عن Secure Score أو الوضع الأمني أو حالة Defender أو تحسينات الأمان.

Add to TypingMind

نظرة عامة

الناشرricmmartins
المستودعazure-sre-agent-skills
اسم المهارةdefender-secure-score-monitor
النجوم
70
التفريعات
14
الملفات المرفقة
تعليمات فقط
الترخيصMIT
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • مكتفية بذاتها

    كل ما يحتاجه النموذج موجود في التعليمات — لا ملفات إضافية لمزامنتها.

  • مفتوحة المصدر

    نشرها ricmmartins على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Defender Secure Score Monitor في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/ricmmartins/azure-sre-agent-skills/tree/main/skills/06-defender-secure-score
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ricmmartins/azure-sre-agent-skills.git /tmp/azure-sre-agent-skills
mkdir -p .claude/skills
cp -r /tmp/azure-sre-agent-skills/skills/06-defender-secure-score .claude/skills/defender-secure-score-monitor
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Defender Secure Score Monitor في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Defender Secure Score Monitor تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Defender Secure Score Monitor بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

Defender Secure Score Monitor

Purpose

Track and improve your Microsoft Defender for Cloud Secure Score through focused monitoring, trend analysis, and actionable remediation guidance. Answers "what's our security score and how do we improve it?"

When to use this skill

  • User asks "what's our secure score?"
  • User asks how to improve security posture
  • Weekly security posture check
  • Before a security audit or customer questionnaire
  • After deploying new resources (to check score impact)

Difference from Compliance/Governance Audit

The Compliance skill does a broad governance audit (policy, RBAC, tagging, locks, naming). This skill is laser-focused on Defender for Cloud Secure Score — the single most important security KPI — and provides targeted actions to improve it.

Assessment procedure

Step 1: Current Secure Score

Get the overall score and per-control breakdown.

bash
az rest --method get --url "https://management.azure.com/subscriptions/<sub-id>/providers/Microsoft.Security/secureScores/ascScore?api-version=2020-01-01"
bash
az rest --method get --url "https://management.azure.com/subscriptions/<sub-id>/providers/Microsoft.Security/secureScores/ascScore/secureScoreControls?api-version=2020-01-01"

Note: The az security secure-scores list CLI command may fail in some environments. The REST API approach above is more reliable. Replace <sub-id> with the target subscription ID.

Report:

  • Current Secure Score: X% (X/Y points)
  • Trend (if memory available): improved/declined vs. last check
  • Top 5 controls with the most room for improvement (highest max - current)

Step 2: Unhealthy assessments (recommendations)

Get the list of active security recommendations.

bash
az rest --method get --url "https://management.azure.com/subscriptions/<sub-id>/providers/Microsoft.Security/assessments?api-version=2021-06-01" --query "value[?properties.status.code=='Unhealthy'].{displayName:properties.displayName, severity:properties.metadata.severity, category:properties.metadata.categories[0], resourceId:properties.resourceDetails.id}"

Group by severity:

  • 🔴 High: Must fix — significant risk
  • 🟡 Medium: Should fix — moderate risk
  • 🟢 Low: Nice to have — minimal risk

Step 3: Quick wins (most points for least effort)

Identify recommendations that:

  1. Affect the most resources (batch fix possible)
  2. Have the highest point value per control
  3. Can be fixed with a single CLI command or policy

Examples of quick wins:

  • Enable HTTPS-only on App Services
  • Enable secure transfer on storage accounts
  • Enable Defender plans that are off
  • Restrict public network access

Step 4: Defender plan coverage

Check which Defender plans are enabled.

bash
az security pricing list --query "[].{plan:name, tier:pricingTier, subPlan:subPlan}" -o table

Expected plans to be enabled for full coverage:

  • Servers (P2 recommended)
  • App Service
  • SQL (databases)
  • Storage
  • Containers (with vulnerability assessment)
  • Key Vault
  • Resource Manager (ARM)
  • DNS

Flag disabled plans and estimate score impact of enabling them.

Step 5: Attack surface indicators

Check the most exploitable security gaps.

  1. Public management ports (SSH/RDP open to internet):

    bash
    az graph query -q "resources | where type == 'microsoft.network/networksecuritygroups' | mvexpand rules = properties.securityRules | where rules.properties.access == 'Allow' and rules.properties.direction == 'Inbound' and (rules.properties.destinationPortRange == '22' or rules.properties.destinationPortRange == '3389' or rules.properties.destinationPortRange == '*') and rules.properties.sourceAddressPrefix in ('*', '0.0.0.0/0', 'Internet')" -o table
  2. Storage accounts with public blob access:

    bash
    az storage account list --query "[?allowBlobPublicAccess==true].{name:name, rg:resourceGroup}" -o table
  3. SQL servers with public endpoint:

    bash
    az sql server list --query "[?properties.publicNetworkAccess=='Enabled'].{name:name, rg:resourceGroup}" -o table
  4. Key Vaults accessible from public network:

    bash
    az keyvault list --query "[?properties.publicNetworkAccess=='Enabled'].{name:name, rg:resourceGroup}" -o table

Step 6: Credential and certificate hygiene

Check for expiring secrets that could cause outages or security drift.

  1. Key Vault secrets expiring within 30 days (per vault):

    bash
    az keyvault secret list --vault-name <vault> --query "[?attributes.expires!=null && attributes.expires<'$(date -u -d '30 days' +%Y-%m-%dT%H:%M:%SZ)']" -o table
  2. Key Vault certificates expiring within 30 days (per vault):

    bash
    az keyvault certificate list --vault-name <vault> --query "[?attributes.expires!=null && attributes.expires<'$(date -u -d '30 days' +%Y-%m-%dT%H:%M:%SZ)']" -o table
  3. App registrations with expiring secrets:

    bash
    az ad app list --query "[].{name:displayName, creds:passwordCredentials[?endDateTime<'$(date -u -d '30 days' +%Y-%m-%dT%H:%M:%SZ)']}" --all -o table

Note on date handling: The SRE Agent sandbox runs Linux. Use $(date -u -d '30 days' +%Y-%m-%dT%H:%M:%SZ) for date calculations.

Risk scoring

LevelCriteriaColor
CriticalActive exposure, immediate risk of breach🔴
HighSignificant gap, exploit requires minimal effort🟠
MediumGap exists but requires specific conditions to exploit🟡
LowBest practice deviation, minimal immediate risk🟢

Accepted exceptions (optional)

If the user provides a list of accepted exceptions, do not flag those items. Instead, note them in the report as Accepted Exception with the reason provided.

Example format the user may provide:

CheckReason
3.1 Defender for DNSDNS plan deprecated by Microsoft, not applicable
5.2 Public blob access on storagePublic read access required for CDN-served static assets
5.4 Key Vault public accessKey Vault is accessed from hybrid on-prem workloads

When exceptions are provided:

  • Skip the flagged checks in scoring
  • List them in a separate "Accepted Exceptions" section at the end of the report
  • Recalculate the overall score excluding excepted checks

Expected output

Report header (mandatory — use this exact format)

Defender Secure Score Report

FieldValue
Subscription(name + ID)
Assessment DateYYYY-MM-DD
Overall ScoreXX.XX / YY (ZZ%)

Then present the gap summary:

The subscription is earning only ZZ% of its maximum Secure Score. There is a N-point gap to close.

Score improvement plan

PriorityActionPointsEffortResources affected
1Enable HTTPS-only on 4 App Services+45 minapp-web-, app-api-
2Enable Defender for Storage+32 minsubscription-level
3Restrict SQL public access on 2 servers+330 minsql-prod-, sql-staging-
4Add NSG to 2 subnets without rules+215 minsubnet-data-, subnet-mgmt-
Total achievable+12~1 hour

Critical findings (fix now)

Items that represent immediate exploitable risk.

Remediation commands

Pre-formatted az cli commands for each quick win, ready to approve and execute. Use GetAzCliHelp to validate the command syntax before suggesting.

bash
# Enable HTTPS-only on App Service
az webapp update --name <app> --resource-group <rg> --set httpsOnly=true

# Enable Defender for Storage
az security pricing create --name StorageAccounts --tier Standard

References

Recommended cadence

Schedule this skill as a weekly task via SRE Agent scheduled tasks for continuous score improvement tracking.

Sample output

The following is a redacted example of what the report looks like when run against a subscription.

Defender Secure Score Report

FieldValue
Subscriptioncontoso-prod-001 (a1b2c3d4-e5f6-7890-abcd-ef1234567890)
Assessment Date2026-07-15
Overall Score38.50 / 56 (69%)

The subscription is earning only 69% of its maximum Secure Score. There is a 17.5-point gap to close.

Score improvement plan

PriorityActionPointsEffortResources affected
1Enable HTTPS-only on 3 App Services+45 minapp-web-prod, app-api-prod, app-admin-prod
2Enable Defender for Storage+32 minsubscription-level
3Restrict SQL public access on 2 servers+330 minsql-contoso-prod, sql-contoso-staging
4Add NSG to 2 subnets without rules+215 minsubnet-data-prod, subnet-mgmt-prod
5Rotate 3 expiring Key Vault secrets+1.520 minkv-contoso-prod
Total achievable+13.5~1.5 hours

Critical findings (sample)

#FindingSeverityResources
1SSH port 22 open to internet on NSG nsg-mgmt-prod🔴 Critical2 VMs exposed
2Storage account stcontosoprod allows public blob access🔴 Critical1 account
3Defender for Containers disabled🟠 HighAKS cluster aks-app-prod

Defender plan coverage

PlanStatusImpact
Cloud Posture (CSPM)✅ Standard—
Servers✅ P2—
Storage❌ Free+3 points if enabled
Containers❌ Free+2 points if enabled
Key Vault✅ Standard—
App Service✅ Standard—

Remediation commands (sample)

bash
# Enable HTTPS-only on App Service
az webapp update --name app-web-prod --resource-group rg-app-prod --set httpsOnly=true

# Enable Defender for Storage
az security pricing create --name StorageAccounts --tier Standard

# Restrict SQL Server public access
az sql server update --name sql-contoso-prod --resource-group rg-data-prod --set publicNetworkAccess="Disabled"

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Defender Secure Score Monitor؟

راقب Secure Score في Microsoft Defender for Cloud واعمل على تحسينه. يتتبع اتجاهات النتيجة، ويحدّد التحسينات السريعة لرفعها، ويتحقق من تغطية خطط Defender، ويسلّط الضوء على توصيات الأمان المهمة. استخدمه عند السؤال عن Secure Score أو الوضع الأمني أو حالة Defender أو تحسينات الأمان.

لماذا تستخدم Defender Secure Score Monitor على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Defender Secure Score Monitor عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Defender Secure Score Monitor في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/ricmmartins/azure-sre-agent-skills/tree/main/skills/06-defender-secure-score. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Defender Secure Score Monitor؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Defender Secure Score Monitor؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Defender Secure Score Monitor معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Defender Secure Score Monitor مجانية؟

نعم. نشرها ricmmartins على GitHub بموجب ترخيص MIT. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇