Introduction¶
In agent development, calling multiple LLM providers is a common practice. However, after making those calls, teams often only check whether the functionality works correctly, without systematically auditing which providers were actually invoked, what data was transmitted, or whether privacy policies have been properly disclosed. This creates two key risks: first, it becomes difficult to take an accurate inventory of the providers actually in use; second, cross-border data transfer obligations and notification duties under the Personal Information Protection Law (PIPL) may be overlooked.
DSH (DeepSeek Harness) supports capability extension through plugins. The dsh-llm-endpoint-audit plugin scans all LLM API endpoints in your codebase, outputs a provider inventory matrix, and checks whether privacy policy documents exist for each provider, calculating PIPL notification obligations on a per-provider basis.
Plugin Overview¶
- Name:
dsh-llm-endpoint-audit - Maintainer: feely0208
- Category: admin-security
- Dependencies: DSH >= 0.1.0-rc.6 < 0.3.0, Node >= 18
The plugin is built on dsh-guard-core and uses regex-based rules to match LLM API call endpoints in code.
Core Features¶
The plugin scans code files in a project directory and identifies the following:
-
LLM API Endpoints
- Recognized providers include: DeepSeek, OpenAI, Anthropic, Gemini, Kimi, Tongyi, GLM, MiniMax, Doubao, Wenxin, Spark, Hunyuan, and Lingyi.
- Endpoint inventory rules covering 13 LLM providers in total. -
Cross-Border Data Transfer Risks
- Identifies overseas endpoints and flags cross-border data transfer risk as high.
- References Article 38 of the PIPL and the Measures for Security Assessment of Cross-Border Data Transfer for guidance. -
Privacy Policy Document Check
- Verifies whether the project discloses the corresponding provider’s privacy policy document.
- Flags missing privacy documentation as a medium-level risk. -
Provider Matrix Output
- Lists the providers called, the endpoints used, and whether privacy policies are disclosed.
- PIPL notification obligations are calculated per provider, with particular attention to scenarios involving mixed use of multiple providers and overseas endpoints.
Installation & Activation¶
Install the plugin in a DSH environment:
dsh plugin --profile web add @deepwhale-cn/dsh-llm-endpoint-audit
Alternatively, install via npm:
npm i @deepwhale-cn/dsh-llm-endpoint-audit
Or install directly from the repository:
dsh plugin install ./
Typical Usage¶
Run the audit in your project directory:
npx @deepwhale-cn/dsh-llm-endpoint-audit --root <project-directory>
The following parameters are supported:
--root <project-directory>: Specify the root directory of the project to scan.--demo: Run in demo mode.--list-rules: List the current rules.--html: Output results in HTML format.
The plugin ships with 15 built-in rules, covering endpoints from 13 LLM providers, cross-border data transfer risks for overseas endpoints, and privacy documentation gap checks.
Use Cases & Notes¶
- Suitable for: Projects in agent, proxy, or RAG systems that mix multiple LLM providers.
- Note: The plugin runs with the permissions of the current DSH process. Ensure it has read access to your project code.
- It is recommended to review the source code and license before installation to ensure compliance with your project’s requirements.
Conclusion¶
This plugin helps you take an inventory of LLM API calls during the development phase, outputting a provider matrix and the status of privacy policy disclosures, making it easier to fulfill PIPL notification obligations on a per-provider basis. For complete documentation and source code, please refer to:
- Plugin directory page: https://www.skillhub.cn/plugins/feely0208/dsh-llm-endpoint-audit
- GitHub: https://github.com/feely0208/dsh-llm-endpoint-audit