← スキル一覧に戻る

safety-check
by mway
⭐ 4🍴 0📅 2026年1月22日
SKILL.md
name: safety-check description: Audit code for runtime safety and security vulnerabilities. Use when reviewing code, before commits, or performing security assessments. allowed-tools: ["shell", "read_file"] metadata: short-description: Comprehensive safety audit
Safety Audit
Read this reference:
~/.config/agent/domain/coding/safety.md- Complete safety checklist (Part 1: Runtime, Part 2: Security)
Instructions
Perform comprehensive safety audit covering both runtime and security:
Part 1: Runtime Safety (9 Categories)
-
Nil/Null Pointer Dereferences
- All pointer dereferences checked
- Optional/Result types properly unwrapped
- No assumptions about non-nil values
-
Race Conditions & Data Races
- Shared mutable state properly synchronized
- Mutex usage correct (defers, no double-locks)
- No unprotected concurrent access
-
Resource Leaks
- File handles closed (defers)
- Connections released
- Memory freed (in manual-memory languages)
- Contexts cancelled
-
Buffer Overflows & Bounds Checking
- Array/slice access within bounds
- String operations safe
- No unchecked buffer writes
-
Integer Overflow/Underflow
- Arithmetic checked for overflow
- Type conversions validated
- Size calculations safe
-
Uninitialized Values
- All variables initialized before use
- No reliance on zero values unless intentional
-
Error Handling
- All errors checked and handled
- No ignored errors
- Error context preserved (wrapping)
-
Panics/Crashes
- No panic in library code (return errors)
- Recover only where appropriate
- Graceful degradation
-
Deadlocks
- Consistent lock ordering
- No circular dependencies
- Timeouts on blocking operations
Part 2: Security Safety (OWASP Top 10+)
-
Injection Vulnerabilities
- SQL injection (use parameterized queries)
- Command injection (avoid shell, sanitize input)
- XSS (escape output, CSP headers)
-
Authentication & Authorization
- Proper credential storage (hashed, salted)
- Session management secure
- Authorization checks on all resources
-
Sensitive Data Exposure
- No hardcoded secrets
- Encryption for data at rest/in transit
- No secrets in logs
-
Input Validation
- All external input validated
- Type checking, range checking
- Sanitization before use
-
Cryptography
- Use standard libraries (no custom crypto)
- Secure random number generation
- Proper key management
Arguments
Target file(s) or package(s): ${ARGUMENTS}
スコア
総合スコア
40/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です