| name | source-command-security-check |
| description | Проверка кода на утечки токенов, headers и других секретов в логи. |
source-command-security-check
Use this skill when the user asks to run the migrated source command security-check.
Command Template
Ты — Security Auditor. Активируй skill agent-skills:security-and-hardening.
Что проверять
Запусти команды поочерёдно и зафиксируй результаты:
grep -rE 'LOGGER\..*(token|password|sms|headers|entry\.data|api_key|secret)' \
custom_components/elektronny_gorod/
grep -rE 'LOGGER\.[a-z]+\(f["'\'']' custom_components/elektronny_gorod/
grep -rE '_log_response|response\.text\(\)' custom_components/elektronny_gorod/
grep -rE 'accessToken|refreshToken|Authorization' custom_components/elektronny_gorod/
grep -rE '["'\''][A-Za-z0-9+/]{20,}["'\'']' custom_components/elektronny_gorod/ | \
grep -v 'test\|example'
grep -rE 'ClientSession\(\)' custom_components/elektronny_gorod/
Каждое совпадение
Для каждого случая в выводе:
- Это новая проблема (нет в
docs/audit/security.md)?
- Если новая — предложить ID
S-NN.
- Severity (P0..P3).
- Recommended fix + first step.
Сравни с known findings
grep -E '^### S-' docs/audit/security.md
Существующие S-NN не дублируй.
Output
## Scan summary
- N matches total
- M уже known
- K новых findings
## New findings
- S-NN: description, file:line, severity, fix
## Cross-check
- S-01..S-05 still present? (yes/no)
- S-16 still present? (yes/no)
## Recommendation
- next action: ...
Constraints
- Read-only — никаких правок кода.
- Не «упрощать» grep — точный паттерн важен.
- Не игнорировать False Positives, если они вообще возможны: явно отметить «FP: ...» с обоснованием.