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/adobedocs/ff-services-docs/security-lang-cppgit clone --depth 1 https://github.com/AdobeDocs/ff-services-docsWhat 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.00000 | $0.03529 |
| Opus 5 | $0.00000 | $0.01765 |
| Sonnet 5 | $0.00000 | $0.00706 |
| Haiku 4.5 | $0.00000 | $0.00353 |
Grade A, and why
security-lang-cpp scanned grade A with 0 findings 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 164 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Secure C++ Development
These rules apply to all C++ source and header files in the repository and aim to prevent memory corruption, resource leaks, undefined behavior, and security vulnerabilities through modern C++ best practices.
All violations must include a clear explanation of which rule was triggered and why, to help developers understand and fix the issue effectively.
Generated code must not violate these rules. If a rule is violated, a comment must be added explaining the issue and suggesting a correction.
1. Prevent Use After Free and Double Free (CWE-416, CWE-415)
- Rule: Use
std::unique_ptr,std::shared_ptr, orstd::weak_ptrinstead of rawnew/delete. Never access memory after it has been freed. Do not free the same memory twice. Smart pointers and RAII patterns automatically prevent use-after-free and double-free vulnerabilities.
2. Avoid Raw Pointers for Ownership
- Rule: Do not use raw pointers (
T*) to express ownership. Use smart pointers or containers. Raw pointers should only be used for non-owning references. Always verify non-owning pointers are not null before dereferencing.
3. Initialize All Variables (CWE-824)
- Rule: Always initialize variables, including pointers, at declaration. Use uniform initialization
{}to prevent narrowing conversions. Never leave objects in an indeterminate state. Accessing uninitialized pointers or variables leads to undefined behavior and potential security vulnerabilities.
4. Prevent Use-After-Move
- Rule: After moving from an object with
std::move(), do not access its value unless it has been reassigned. Document moved-from states clearly.
5. Prevent Out-of-Bounds Write and Read (CWE-787, CWE-125, CWE-119, CWE-676)
- Rule: Use STL containers (
std::vector,std::array,std::string,std::spanfor views) with bounds-checked access (.at()) instead of C-style arrays and manual index looping. When converting legacy C-style arrays, usestd::to_array(C++20) to preserve size information and enable bounds-checked access. Never use potentially dangerous functions likestrcpy,sprintf,gets,scanf, or other unbounded string functions. Prefer standard algorithms with.at()over uncheckedoperator[]in security-critical code. Out-of-bounds memory access is a leading cause of exploitable vulnerabilities.
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 · 164 lines · 3,529 tokens per session scan A 133472889ee8
security-lang-cpp is a cursor rule published in the GitHub repository AdobeDocs/ff-services-docs (4 stars, last pushed 2mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 3,529 tokens. A static security scan graded it A with 0 findings. 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
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.
typescript
Changes to these high-fan-out internals can affect every message, delta, element, or rerun. Keep work in them minimal, and benchmark changes with representative stress-test apps.
coolify-ai-docs
Master reference to all Coolify AI documentation in .ai/ directory.
python_lib
Tips and guidelines specific to the development of the Streamlit Python library, not applicable to scripts and e2e tests.
specs
This directory contains product and tech specs for Streamlit features.