devs%3Asecurity-core by aaronbassett/agent-foundry
npx skills add https://github.com/aaronbassett/agent-foundry --skill devs:security-core适用于 TypeScript、Python 和 Rust 应用程序的全面应用安全指南。
设置身份验证:
./scripts/generate_jwt_keys.sh RS256assets/configs/ 中的安全模板实现授权:
安全审计:
./scripts/audit_security.sh广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
加固应用程序:
scripts/)audit_security.sh - 针对 TypeScript、Python 和 Rust 项目的安全审计
./scripts/audit_security.sh [project-directory]generate_jwt_keys.sh - 生成安全的 JWT 签名密钥
./scripts/generate_jwt_keys.sh [ALGORITHM] [OUTPUT_DIR]references/)authentication.md - 完整的身份验证指南
authorization.md - 授权模式与实现
owasp-top-10.md - OWASP Top 10 防范指南
secrets-management.md - 密钥与凭据管理
security-headers.md - HTTP 安全标头
rate-limiting.md - 速率限制策略
code-review.md - 安全代码审查清单
assets/configs/)适用于所有支持语言的即用型安全中间件:
TypeScript: assets/configs/typescript/security-config.ts
Python: assets/configs/python/security_middleware.py
Rust: assets/configs/rust/security_middleware.rs
| 方法 | 适用场景 | 复杂度 | 最佳用途 |
|---|---|---|---|
| JWT | 无状态 API、微服务 | 中等 | SPA、移动应用、API |
| 会话 | 传统 Web 应用 | 低 | 服务器端渲染应用 |
| OAuth 2.0 | 第三方身份验证、SSO | 高 | 委托身份验证 |
| API 密钥 | 服务间通信 | 低 | 内部服务 |
有关详细实现模式,请参阅 authentication.md。
| 模型 | 适用场景 | 复杂度 | 最佳用途 |
|---|---|---|---|
| RBAC | 简单的角色层次结构 | 低 | 标准 Web 应用 |
| ABAC | 复杂、动态的策略 | 高 | 企业应用 |
| RLS | 需要数据隔离的多租户应用 | 中等 | SaaS 应用 |
| 权限 | 细粒度控制 | 中等 | 管理面板、API |
有关实现模式和 RLS 示例,请参阅 authorization.md。
适用于没有传统浏览器重定向的应用程序:
设备授权流程(OAuth 2.0):
# 生成密钥
./scripts/generate_jwt_keys.sh RS256 ./keys
# 查看实现模式
# 参见 references/authentication.md#jwt-authentication
然后根据您使用的语言(TypeScript/Python/Rust)使用示例进行实现。
# 查看 RLS 模式
# 参见 references/authorization.md#row-level-security-rls
为多租户隔离实现 RLS 策略:
# 运行自动化审计
./scripts/audit_security.sh
# 手动审查
# 1. 检查 references/code-review.md 清单
# 2. 查看 references/owasp-top-10.md 以查找漏洞
# 3. 使用 references/security-headers.md 验证安全标头
# 4. 根据 references/rate-limiting.md 测试速率限制
应用安全模板:
assets/configs/[language]/ 复制相应的配置实现身份验证:
添加授权:
配置安全标头:
设置密钥管理:
审查 OWASP Top 10:
assets/configs/typescript/security-config.tsassets/configs/python/security_middleware.pyassets/configs/rust/security_middleware.rs为安全关注点编写测试:
// 身份验证测试
it('should reject invalid credentials');
it('should rate limit login attempts');
it('should require MFA when enabled');
// 授权测试
it('should deny unauthorized access');
it('should allow access for correct role');
it('should enforce resource ownership');
// 输入验证测试
it('should prevent SQL injection');
it('should sanitize HTML input');
it('should validate file uploads');
完整测试清单请参阅 code-review.md。
本技能中的主要参考:
外部资源:
对于新的安全应用程序:
assets/configs/ 中的安全模板./scripts/audit_security.sh 进行验证对于安全审查:
./scripts/audit_security.sh对于特定的安全问题:
每周安装数
1
代码仓库
GitHub 星标数
1
首次出现
1 天前
安装于
zencoder1
amp1
cline1
openclaw1
opencode1
cursor1
Comprehensive application security guidance for TypeScript, Python, and Rust applications.
Setting up authentication:
./scripts/generate_jwt_keys.sh RS256assets/configs/Implementing authorization:
Security auditing:
./scripts/audit_security.shHardening application:
scripts/)audit_security.sh - Security audit for TypeScript, Python, and Rust projects
./scripts/audit_security.sh [project-directory]generate_jwt_keys.sh - Generate secure JWT signing keys
./scripts/generate_jwt_keys.sh [ALGORITHM] [OUTPUT_DIR]references/)authentication.md - Complete authentication guide
authorization.md - Authorization patterns and implementations
owasp-top-10.md - OWASP Top 10 prevention guide
secrets-management.md - Secrets and credentials management
security-headers.md - HTTP security headers
rate-limiting.md - Rate limiting strategies
code-review.md - Security code review checklist
assets/configs/)Ready-to-use security middleware for all supported languages:
TypeScript: assets/configs/typescript/security-config.ts
Python: assets/configs/python/security_middleware.py
Rust: assets/configs/rust/security_middleware.rs
| Method | Use When | Complexity | Best For |
|---|---|---|---|
| JWT | Stateless APIs, microservices | Medium | SPAs, mobile apps, APIs |
| Sessions | Traditional web apps | Low | Server-rendered apps |
| OAuth 2.0 | Third-party auth, SSO | High | Delegated authentication |
| API Keys | Service-to-service | Low | Internal services |
See authentication.md for detailed implementation patterns.
| Model | Use When | Complexity | Best For |
|---|---|---|---|
| RBAC | Simple role hierarchies | Low | Standard web apps |
| ABAC | Complex, dynamic policies | High | Enterprise apps |
| RLS | Multi-tenant with data isolation | Medium | SaaS applications |
| Permissions | Fine-grained control | Medium | Admin panels, APIs |
See authorization.md for implementation patterns and RLS examples.
For applications without traditional browser redirects:
Device Authorization Flow (OAuth 2.0):
Full implementation examples in authentication.md - OAuth for CLI, TUI, and Desktop Apps.
# Generate keys
./scripts/generate_jwt_keys.sh RS256 ./keys
# Review implementation patterns
# See references/authentication.md#jwt-authentication
Then implement using examples for your language (TypeScript/Python/Rust).
# Review RLS patterns
# See references/authorization.md#row-level-security-rls
Implement RLS policies for multi-tenant isolation:
# Run automated audit
./scripts/audit_security.sh
# Manual review
# 1. Check references/code-review.md checklist
# 2. Review references/owasp-top-10.md for vulnerabilities
# 3. Verify security headers with references/security-headers.md
# 4. Test rate limiting per references/rate-limiting.md
Apply security templates:
assets/configs/[language]/Implement authentication:
Add authorization:
Configure security headers:
Set up secrets management:
assets/configs/typescript/security-config.tsassets/configs/python/security_middleware.pyassets/configs/rust/security_middleware.rsWrite tests for security concerns:
// Authentication tests
it('should reject invalid credentials');
it('should rate limit login attempts');
it('should require MFA when enabled');
// Authorization tests
it('should deny unauthorized access');
it('should allow access for correct role');
it('should enforce resource ownership');
// Input validation tests
it('should prevent SQL injection');
it('should sanitize HTML input');
it('should validate file uploads');
See code-review.md for complete testing checklist.
Primary references in this skill:
External resources:
For a new secure application:
assets/configs/./scripts/audit_security.sh to verifyFor security review:
./scripts/audit_security.shFor specific security concern:
Weekly Installs
1
Repository
GitHub Stars
1
First Seen
1 day ago
Installed on
zencoder1
amp1
cline1
openclaw1
opencode1
cursor1
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
147,400 周安装
Review OWASP Top 10: