Co-Pilot / 辅助式
更新于 a month ago

sharp-edges

Ttrailofbits
1.8k
trailofbits/skills/plugins/sharp-edges
84
Agent 评分

💡 摘要

Sharp Edges 识别易出错的 API 和配置,以防止安全错误。

🎯 适合人群

安全审计员软件开发人员DevOps 工程师代码审查员技术负责人

🤖 AI 吐槽:该技能分析代码中的安全漏洞,错误配置可能会暴露敏感信息。为了降低风险,确保适当的访问控制并定期审查配置。

安全分析低风险

该技能分析代码中的安全漏洞,错误配置可能会暴露敏感信息。为了降低风险,确保适当的访问控制并定期审查配置。

Sharp Edges

Identifies error-prone APIs, dangerous configurations, and footgun designs that enable security mistakes through developer confusion, laziness, or malice.

When to Use

  • Reviewing API designs for security-relevant interfaces
  • Auditing configuration schemas that expose security choices
  • Evaluating cryptographic library ergonomics
  • Assessing authentication/authorization APIs
  • Any code review where developers make security-critical decisions

What It Does

Analyzes code and designs through the lens of three adversaries:

  1. The Scoundrel: Can a malicious developer or attacker disable security via configuration?
  2. The Lazy Developer: Will copy-pasting the first example lead to insecure code?
  3. The Confused Developer: Can parameters be swapped without type errors?

Core Principle

The pit of success: Secure usage should be the path of least resistance. If developers must read documentation carefully or remember special rules to avoid vulnerabilities, the API has failed.

Installation

/plugin install trailofbits/skills/plugins/sharp-edges

Sharp Edge Categories

The skill identifies six categories of misuse-prone designs:

| Category | Example | |----------|---------| | Algorithm Selection | JWT alg: none attack; PHP hash("crc32", $password) | | Dangerous Defaults | session_timeout: 0 meaning infinite; empty password accepted | | Primitive vs. Semantic APIs | encrypt(msg, bytes, bytes) where key/nonce can be swapped | | Configuration Cliffs | verify_ssl: false disables all certificate validation | | Silent Failures | Verification returns False instead of throwing; ignored return values | | Stringly-Typed Security | Permissions as comma-separated strings; SQL from concatenation |

Related Skills

五维分析
清晰度9/10
创新性8/10
实用性9/10
完整性8/10
可维护性8/10
优缺点分析

优点

  • 帮助及早识别安全漏洞。
  • 提高代码质量和开发人员意识。
  • 支持多种安全问题类别。

缺点

  • 可能需要对安全概念有深入理解。
  • 在某些情况下可能产生误报。

相关技能

constant-time-analysis

A
toolCode Lib / 代码库
88/ 100

“这是一把寻找时序泄漏的瑞士军刀,但你需要一个编译器工具链的博士学位来设置所有的语言后端。”

prowler

A
toolCode Lib / 代码库
86/ 100

“它是云安全的瑞士军刀,但你需要一个YAML博士学位才能配置好它所有的活动部件。”

ethereum-wingman

A
toolCo-Pilot / 辅助式
84/ 100

“看起来很能打,但别让配置把人劝退。”

免责声明:本内容来源于 GitHub 开源项目,仅供展示和评分分析使用。

版权归原作者所有 trailofbits.