chezmoi-source (чистая пересборка, не дамп 1.2 ГБ): - dot_claude: CLAUDE.md лин-роутер, AGENTS.md.tmpl (VPS вычищен), settings.json.tmpl (deny-щит 20 + security-guard hook), rules (structure + ECC 21 язык), 30 generic ECC-агентов, health-check - dot_codex: symlink-паритет; dot_agents: registry 13 скриптов HOME-генерик + методология docs - плагины: plugins.manifest + bootstrap Слой 1b (marketplace+install) - launchd: health.plist (PATH-фикс 127) + session-reaper.example - smoke++: secret-токен guard + канон-проверки (зелёный) - 0 hard личных данных; cut личного (kb/references/gsd/owner) → Ф4
1.2 KiB
1.2 KiB
paths
| paths | |||||||
|---|---|---|---|---|---|---|---|
|
C++ Security
This file extends common/security.md with C++ specific content.
Memory Safety
- Never use raw
new/delete— use smart pointers - Never use C-style arrays — use
std::arrayorstd::vector - Never use
malloc/free— use C++ allocation - Avoid
reinterpret_castunless absolutely necessary
Buffer Overflows
- Use
std::stringoverchar* - Use
.at()for bounds-checked access when safety matters - Never use
strcpy,strcat,sprintf— usestd::stringorfmt::format
Undefined Behavior
- Always initialize variables
- Avoid signed integer overflow
- Never dereference null or dangling pointers
- Use sanitizers in CI:
cmake -DCMAKE_CXX_FLAGS="-fsanitize=address,undefined" ..
Static Analysis
- Use clang-tidy for automated checks:
clang-tidy --checks='*' src/*.cpp - Use cppcheck for additional analysis:
cppcheck --enable=all src/
Reference
See skill: cpp-coding-standards for detailed security guidelines.