agent-patterns

Warn

Audited by Socket on Sep 19, 2026

7 alerts found:

Anomalyx4Securityx3
AnomalyLOW
templates/c/autonomous_agent.c

The fragment is an autonomous-agent demonstration with mock model and tool behavior. No evidence of credential exfiltration, suspicious network connections, command execution, persistence, destructive activity, cryptomining, or hidden backdoors is present. The main risks are ordinary C memory-safety and robustness defects: unchecked concatenation and copying, weak ad hoc JSON parsing, missing validation of model-controlled tool arguments, and memory leaks on repeated execution. The API key source is sensitive but is not sent anywhere in this fragment.

Confidence: 98%Severity: 55%
AnomalyLOW
templates/c/evaluator_optimizer.c

The fragment appears to be a benign illustrative C implementation, not malware. It contains no network transmission, command execution, reverse shell, persistence, data exfiltration, cryptomining, or dynamic code execution. The principal security issue is multiple possible stack-buffer overflows caused by unchecked strcat operations when task data, criteria, feedback, or accumulated attempts are large. Input-size validation, bounded concatenation, and validation of iteration counts are required before production use.

Confidence: 98%Severity: 58%
SecurityMEDIUM
templates/python/autonomous_agent.py

No clear malicious payload or intentional data-theft mechanism is evident, and the code is not obfuscated. However, it exposes unrestricted file read/write capabilities and a shell command injection vulnerability caused by shell=True with inadequate validation. Because model-controlled inputs can reach these sinks and local data can be sent to the Anthropic API, the framework should not be run with sensitive filesystem access without sandboxing, strict path controls, subprocess argument execution without a shell, output limits, and approval boundaries. The supplied fragment also has syntax/runtime errors that require correction.

Confidence: 98%Severity: 90%
AnomalyLOW
templates/csharp/AutonomousAgent.cs

The code implements a generic Anthropic-backed tool-using agent. No direct malware or intentional exfiltration is evident in this fragment. The principal security risk is architectural: any registered tool with filesystem, network, command, or credential access can be triggered by model output without schema validation, authorization, path restrictions, or human approval. The API key is read from an environment variable for normal SDK authentication and is not otherwise exposed by this code. The fragment also has a compile-time syntax error in the read_file handler.

Confidence: 98%Severity: 58%
SecurityMEDIUM
templates/c/routing.c

The fragment appears to be a legitimate AI routing example and contains no evident malware or intentional supply-chain attack behavior. The current implementation performs no network communication because the API function is a mock. However, router_classify() has a concrete stack buffer overflow risk from unchecked strcat() into the fixed-size categories buffer. Naive response parsing, missing argument validation, and silent prompt truncation are additional security and reliability concerns. Replace strcat() with bounded construction, validate all arguments and parsed values, and use a proper JSON parser before production use.

Confidence: 98%Severity: 72%
AnomalyLOW
templates/typescript/autonomous_agent.ts

The fragment appears to implement a legitimate LLM agent example rather than malware. The main security risk is the calculator tool's use of Function() on model-controlled input, which can enable arbitrary JavaScript execution if tool inputs are attacker-influenced or the model is manipulated. The automatic example invocation creates import-time side effects and the agent may transmit supplied context and tool results to Anthropic. No clear malicious exfiltration, backdoor, credential theft, or destructive behavior is present.

Confidence: 97%Severity: 67%
SecurityMEDIUM
templates/genaiscript/autonomous_agent.genai.mts

The fragment is primarily an autonomous-agent demonstration with mock tools, not evident malware. However, calculate contains a high-impact eval(args.expression) sink and lacks argument validation, allowing arbitrary JavaScript execution if reached with attacker-influenced or compromised model output. The remaining tools have no real external side effects in this file. Remove eval or replace it with a safe arithmetic parser, validate all tool arguments, and constrain model-controlled actions.

Confidence: 97%Severity: 70%
Audit Metadata
Analyzed At
Sep 19, 2026, 08:16 AM
Package URL
pkg:socket/skills-sh/markpitt%2Fclaude-skills%2Fagent-patterns%2F@ca78b6fd93127c25f5fdc4b7b962294cb5121a09f0dcff979ffe80cefd402a2d