Back to skill

Security audit

dapr-dotnet

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Dapr/.NET backend template skill, but its generated production code patterns include broad database escape hatches and permissive API defaults that deserve review before use.

Review generated projects before running or deploying them. In particular, restrict CORS origins, avoid exposing raw SQL helpers outside tightly controlled repository code, require parameterized queries, make zh-CN culture configurable, and approve any DEBUG helper that starts daprd locally.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (10)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill hard-codes Chinese locale, Unicode JSON encoding, and a fixed datetime format as a non-negotiable rule rather than making them conditional on user or project requirements. This can override caller expectations, reduce output neutrality, and cause integration or localization issues in downstream systems that expect different locales or serialization behavior.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The document presents the Program.cs snippet as a complete startup template, but the code builds the application before registering services and middleware extensions. Consumers who copy this pattern may end up with missing service registrations, broken health checks, logging, Dapr integration, or inconsistent startup behavior, creating reliability and security-hardening gaps in deployed services.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

The manifest describes a backend architecture/code-generation skill focused on Dapr + .NET project setup, layering, and service/controller code. This template specifically includes AddCustomDaprdProcess and, in DEBUG, calls BaseHelper.AddDaprdProcess(...) to start an external sidecar process, which is a host/process-management capability rather than ordinary API wiring.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The Program.cs example forces CultureInfo.DefaultThreadCurrentCulture to zh-CN, which is a natural-language/locale constraint. The document does not present this as optional, ask for user opt-in, or explain a region-specific requirement, so it conflicts with the policy against forcing a specific locale without choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file presents all instructions and examples exclusively in Chinese, which can impose a language constraint on users without opt-in. The policy allows locale constraints only when they are explicitly justified or when users are given a choice, neither of which is present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file presents the skill content entirely in Chinese, including the title and descriptive guidance, without indicating that language selection is configurable or that the skill is region-specific. Under the policy, forcing a specific language or locale without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The Application/BaseService template exposes a very broad set of raw SQL execution primitives (ExecuteCommand, SqlQuery, GetScalar, DataReader, DataSet, etc.) directly through the service layer. In a code-generation or copy-paste template context, this normalizes unsafe query construction and makes downstream SQL injection far more likely if callers concatenate user input into the sql string, while also bypassing domain and repository constraints the architecture is supposed to enforce.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

This markdown file contains user-facing instructional content only in Chinese, beginning with the title and introductory note. Because there is no opt-in, alternative language option, or justification that the material is intended only for a Chinese-language audience, it may conflict with language/locale policy requirements.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The ApiResult helper reflects over returned objects and emits ModelType metadata listing property names and types. This can leak internal schema and implementation details to clients, aiding reconnaissance and exposing fields that were not intended to be documented or inferable from the API surface.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The method is named and documented as GetDataReaderAsync, and the body awaits an async repository call, but the signature returns IDataReader instead of Task<IDataReader>. This directly contradicts the intent communicated by the method name and documentation, creating misleading behavior for consumers of the template.

Content

No source excerpt is available for this finding.