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.
git clone --depth 1 https://github.com/AdobeDocs/ff-services-docsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/adobedocs/ff-services-docs/security-lang-cpp)<a href="https://agentmods.dev/rules/adobedocs/ff-services-docs/security-lang-cpp"><img src="https://agentmods.dev/badge/rules/adobedocs/ff-services-docs/security-lang-cpp/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/adobedocs/ff-services-docs/security-lang-cpp"><img src="https://agentmods.dev/badge/rules/adobedocs/ff-services-docs/security-lang-cpp.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What 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.1 | $0.00000 | $0.03529 |
| Opus 5.5 | $0.00000 | $0.01412 |
| Sonnet 5.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 1mo ago.
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.
- 1mo ago 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 3mo 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
move-copy-semantics
Avoid std::move(const&) silent copies; use sink-by-value + std::move.
vios-error-security
Error handling and security rules for VIOS C++ code.
cuda
Definitive guidelines for writing high-performance, maintainable, and error-resistant CUDA C++ code, focusing on modern practices, memory management, kernel optimization, and robust error handling.
cpp
Name methods (casing, etc) like "isvalid", "streamtext".
monitor-c-conventions
C coding conventions for HPCPerfStats monitor (C-only).
monitor-c-refactor-standards
Behavior-preserving C refactor standards for HPCPerfStats monitor.