| name | security-check |
| description | Security audit of current changes for Android/Kotlin vulnerabilities and best practices |
| disable-model-invocation | true |
| argument-hint | [--staged | --uncommitted] |
Security Check
Perform a focused security audit on the current changes. Analyze the diff and the full content of changed files for security vulnerabilities, insecure patterns, and Android-specific risks.
Scope: $ARGUMENTS
Step 1: Gather Changes
Determine which changes to audit:
--staged → git diff --cached (only staged changes)
--uncommitted → git diff HEAD (only uncommitted changes)
- No flag → Default to
git diff main (all changes on the branch vs main, committed and uncommitted)
Also run git status to identify new untracked files.
Read the diff output AND the full content of every changed file. Security issues often depend on context beyond the changed lines.
Step 2: Secrets & Credentials
Step 3: Data Security
Step 4: Network Security
Step 5: Android Component Security
Step 6: WebView Security (if applicable)
Step 7: Code Injection & Input Validation
Step 8: Logging & Error Handling
Step 9: Dependency Security
Step 10: Coroutine & Concurrency Security
Step 11: Report
Summary
Brief assessment of the security posture of the changes.
Security Checklist
Show all completed checklists from Steps 2-10 with pass/fail/not-applicable indicators. Skip entire sections that are not applicable to the changed files.
Vulnerabilities Found
List by severity:
- Critical: Exploitable vulnerabilities that must be fixed immediately
- High: Significant risks that should be fixed before merge
- Medium: Potential issues that should be addressed
- Low: Minor concerns or hardening opportunities
For each vulnerability:
- File path and line reference
- Description of the issue
- Recommended fix
Clean
If no issues are found, state that the changes pass the security audit.