المهارات sharp-edges
📦

sharp-edges

آمن

识���危险 API 和高风险配置

代码审查经常会遗漏容易导致错误和安全漏洞的易错 API 和危险配置。此技能帮助您在生产环境出现问题之前识别这些隐患。

يدعم: Claude Codex Code(CC)
📊 70 كافٍ
1

تنزيل ZIP المهارة

2

رفع في Claude

اذهب إلى Settings → Capabilities → Skills → Upload skill

3

فعّل وابدأ الاستخدام

اختبرها

استخدام "sharp-edges". Review this code for sharp edges: Using timezone functions without specifying timezone can lead to incorrect time calculations.

النتيجة المتوقعة:

Sharp Edges Identified:

1. **Timezone API Risk** (Medium)
- Issue: Using Date/time functions without explicit timezone handling
- Impact: Incorrect time calculations, data corruption in scheduled tasks
- Recommendation: Always use explicit timezone with IANA timezone identifiers (e.g., 'America/New_York')
- Safer Alternative: Use libraries like moment-timezone or date-fns-tz

استخدام "sharp-edges". Analyze this configuration for dangerous settings

النتيجة المتوقعة:

Configuration Sharp Edges Found:

1. **Debug Mode Enabled** (High)
- Setting: DEBUG=true in production config
- Risk: Exposes sensitive error details and internal system information
- Recommendation: Disable debug mode in production environments

2. **Default Credentials** (Critical)
- Setting: Default admin/password credentials active
- Risk: Unauthorized access via brute force attacks
- Recommendation: Force password change on first login, use strong credential requirements

التدقيق الأمني

آمن
v1 • 2/25/2026

This skill is a documentation/guide for identifying error-prone APIs and dangerous configurations. The static analyzer detected hardcoded URLs (lines 4, 70) which are legitimate source references to the original GitHub repository - not data exfiltration. The 'weak cryptographic algorithm' detections at lines 3, 22, and 39 are false positives - the scanner misidentified text patterns as cryptographic issues when there are no cryptographic algorithms present. No actual security risks identified.

1
الملفات التي تم فحصها
71
الأسطر التي تم تحليلها
2
النتائج
1
إجمالي عمليات التدقيق

مشكلات عالية المخاطر (2)

False Positive: Weak Cryptographic Algorithm Detection
Static analyzer flagged 'weak cryptographic algorithm' at lines 3, 22, and 39. This is a false positive - the skill contains no cryptographic code or algorithms. The scanner misidentified benign text patterns as cryptographic issues.
Hardcoded URLs in Documentation
URLs to the original source repository are hardcoded in the skill documentation. These are legitimate source references, not security concerns.
تم تدقيقه بواسطة: claude

درجة الجودة

38
الهندسة المعمارية
100
قابلية الصيانة
87
المحتوى
50
المجتمع
85
الأمان
83
الامتثال للمواصفات

ماذا يمكنك بناءه

安全审计辅助

在代码审查期间使用,以识别可能导致安全漏洞的潜在危险 API 使用和风险配置。

API 设计审查

在实施之前,评估提议的 API 设计是否存在已知陷阱和易错模式。

配置安全检查

审查配置文件和设置,查找可能使系统暴露于风险的危险默认值。

جرّب هذه الموجهات

基础 API 审查
Use the sharp-edges skill to identify any error-prone APIs or dangerous configurations in this code snippet. Focus on APIs with non-obvious failure modes or complex parameter requirements.
安全配置审计
Apply the sharp-edges skill to analyze these configuration settings. Identify any defaults that are insecure or settings that could bypass security controls.
API 设计评估
Using the sharp-edges methodology, evaluate this proposed API design. What sharp edges should developers be aware of? What safer alternatives exist?
综合风险分析
Perform a thorough sharp-edges analysis on this codebase. Identify error-prone patterns, dangerous configurations, and provide risk assessments with recommendations for each finding.

أفضل الممارسات

  • 始终记录已识别的 sharp edges,并清楚解释相关风险
  • 提供正确和错误使用模式的具体示例
  • 在可用时推荐具体的更安全的替代方案,并提供代码示例
  • 随着发现新的漏洞,及时更新 sharp edges 文档

تجنب

  • 忽视 API 文档中关于已知故障模式的警告
  • 使用默认配置而不审查安全影响
  • 假设所有 API 在不同上下文中表现一致
  • 跳过需要清理的 API 的资源管理检查

الأسئلة المتكررة

代码中的 sharp edge 是什么?
Sharp edge 是指具有非显而易见的故障模式、复杂要求或使用不当可能导致错误和安全问题的 API 或配置。示例包括具有时序敏感性、错误处理不清晰或具有危险默认设置的 API。
此技能会自动扫描我的代码吗?
不。此技能提供了识别 sharp edges 的方法论和知识。它会引导您完成审查流程,但不会对您的代码执行自动化静态或动态分析。
此技能可以检测所有安全漏洞吗?
不。此技能帮助识别常见的易错 API 和危险配置,但无法检测所有可能的漏洞。它应作为全面安全审查流程的一部分使用。
此技能帮助识别哪些类型的 API?
该技能帮助识别具有复杂参数要求、非显而易见的故障模式、时序或并发问题、错误处理不清晰以及需要仔细资源管理的 API。
此技能与静态分析工具相比有何不同?
静态分析工具自动扫描代码模式。此技能为手动审查提供指导和方法论,帮助您理解为什么某些模式有问题以及如何解决它们。
我可以将此技能用于任何编程语言吗?
可以。Sharp-edges 方法论与语言无关。该技能提供了识别不同编程语言和框架中有问题的 API 和配置的一般原则。

تفاصيل المطور

بنية الملفات

📄 SKILL.md