Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/ckrl/ha-gitops/securitygit clone --depth 1 https://github.com/ckrl/ha-gitopsWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.01166 | $0.01166 |
| Opus 5 | $0.00583 | $0.00583 |
| Sonnet 5 | $0.00233 | $0.00233 |
| Haiku 4.5 | $0.00117 | $0.00117 |
Grade A, and why
security scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Asks for rootlowPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
- Файлы: `id_ed25519` (приватный, **chmod 600**), `id_ed25519.pub` (публичный), `known_hosts`. Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.
How it starts
The opening of the file, as written. The whole thing — 79 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Security Rules (CRITICAL)
Несоблюдение этих правил = баг безопасности. См. docs/architecture.md §10.
secrets.yaml — двойная защита, всегда
.gitignore— записиsecrets.yaml,secrets_backup.yaml,*.secrets.yamlсоздаются и поддерживаютсяGitManagerавтоматически. Не позволять пользователю переопределить.- Panic guard в коде —
_get_yaml_files()явно фильтруетsecrets.yamlи*.secrets.yamlДО любогоgit add. - Pre-push проверка — перед
git pushзапускатьgit diff --cached --name-only; если в staged естьsecrets*.yaml—git reset HEAD <file>, abort, ERROR-лог,persistent_notification.
Никогда:
- НЕ добавлять флаг/опцию для включения
secrets.yamlв синхронизацию. - НЕ читать содержимое
secrets.yamlв коде интеграции. - НЕ выводить путь
secrets.yamlпользователю в advisory-режиме как "можно добавить".
Runtime-state HA — никогда
Всегда исключены из git (через .gitignore, генерируемый из const.py):
.storage/.cloud/core_*(любые файлы, начинающиеся сcore_)home-assistant_v2.db,home-assistant_v2.db-shm,home-assistant_v2.db-walhome-assistant.log,home-assistant.log.1__pycache__/,*.pyc,*.tmp,*.bak
Эти паттерны управляются интеграцией. Если пользователь удалил/изменил блок # ha-gitops: в .gitignore — пересоздать при следующей операции, WARNING в лог.
SSH-ключи
- Каталог:
/config/.ha_gitops/(черезhass.config.path(".ha_gitops")). - Файлы:
id_ed25519(приватный, chmod 600),id_ed25519.pub(публичный),known_hosts. - Генерация — только ED25519 (
ssh-keygen -t ed25519 -N "" -f <path>через executor) либо чистый Python (cryptography.hazmat) в Release. RSA/DSA/ECDSA — нет. chmod 600устанавливается программно сразу после создания/записи.- Каталог
.ha_gitops/обязательно в.gitignore. Двойная проверка: при initialize и перед каждым push. - Приватный ключ:
- НЕ читать его содержимое в коде интеграции (передавать только путь через
GIT_SSH_COMMAND); - НЕ возвращать через service-вызов или атрибут сенсора;
- НЕ логировать ни на каком уровне.
- НЕ читать его содержимое в коде интеграции (передавать только путь через
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 79 lines · 1,166 tokens per session scan A 71a0e887e509
security is a cursor rule published in the GitHub repository ckrl/ha-gitops (4 stars, last pushed 3mo ago), licensed MIT. It adds 1,166 tokens to every session, about $0.0058 per session on Opus 5. A static security scan graded it A with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other cursor rules, from other repositories
repository
Follow AGENTS.md and CONTRIBUTING.md before working in this repository.
cursorrules
Follow AGENTS.md and CONTRIBUTING.md before working in this repository.
backend-python
Cursor rule "backend-python" from coeusyk/inference-x, covering backend python rules, stack assumptions, code style, fastapi conventions and schema conventions.
api-tester
Expert API testing specialist focused on comprehensive API validation, performance testing, and quality assurance across all systems and third-party integrations.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.