Bug Hunter Skill
Goal: Fix existing bugs and prevent potential crashes (Defensive Programming).
Instructions
Perform a "Deep Security Review" on the code.
1. Focus Areas
- •Null/Undefined: Check property access chains. Missing optional chaining or null checks?
- •Exception Handling: Empty
catchblocks? Uncaught Promise rejections? - •Type Safety: (If TS/Static) Misuse of
anyor dangerous casts. - •Race Conditions: Async operation state management issues.
- •Resource Leaks: Event listeners or timers not cleared on destruction.
2. Reporting
For each issue found, provide:
- •Problem Description
- •Risk Level (High/Medium/Low)
- •Fixed Code Snippet (Using defensive programming style)