Back to skill

Security audit

Cpp Pro

Security checks for vulnerabilities and agentic risk

Overview

This is a C++ guidance skill with no executable payload; some example templates should be hardened before copying into real projects.

Reasonable to install for C++ assistance. Before accepting generated build files or concurrency code, ask the agent to pin dependency versions or action SHAs, use lockfiles where possible, and avoid production lock-free memory reclamation examples unless they use a reviewed safe strategy.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T08 · Insecure Dependencies

Warning
Location
references/build-tooling.md:47
Finding

Build and CI Templates Use Unpinned Executable Dependencies

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
references/concurrency.md:55
Finding

Lock-Free Stack Example Permits Use-After-Free and ABA Corruption

Content
View full analysis
class LockFreeStack { struct Node { T data; Node* next; Node(const T& value) : data(value), next(nullptr) {} }; std::atomic head_{nullptr}; public: void push(const T& value) { Node* new_node = new Node(value); new_node->next = head_.load(std::memory_order_relaxed); while (!head_.compare_exchange_weak(new_node->next, new_node, std::memory_order_release, std::memory_order_relaxed)) { // Retry with updated head } } bool pop(T& result) { Node* old_head = head_.load(std::memory_order_relaxed); while (old_head && !head_.compare_exchange_weak(old_head, old_head->next, std::memory_order_acquire, std::memory_order_relaxed)) { // Retry } if (old_head) { result = old_head->data; delete old_head; // Note: ABA problem exists return true; } return false; } }; ``` ### Technical Analysis The stack immediately dereferences and deletes a removed node without a safe concurrent reclamation mechanism such as hazard pointers, epoch-based reclamation, reference counting, or quiescent-state tracking. One consumer can retain `old_head` while another consumer successfully removes and deletes that same node. The first consumer may then evaluate `old_head->next` or access `old_head->data` after the allocation has been freed, producing a use-after-free. The implementation is also vulnerab ...[truncated 1628 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep