In DeepSeek Harness (DSH) plugin development, the compliance of user consent and authorization is often overlooked. Examples include pre-checked boxes, bundled consent, or the lack of a withdrawal mechanism, all of which violate the requirements of the Personal Information Protection Law. Here, we introduce dsh-consent-guard.
What It Is¶
dsh-consent-guard is a DSH plugin designed to inspect user consent mechanisms. Maintained by feely0208, this plugin primarily addresses common compliance issues found on registration or authorization pages.
Core Functions¶
The plugin checks for the following four common violation patterns:
- Pre-checked by default (Default Opt-in): The user is deemed to have consented without performing any action.
- Collection without Consent Mechanism: Data is collected in the code, but there is no corresponding consent process.
- Bundled Consent: Necessary information (e.g., Privacy Policy) is bound together with non-essential information (e.g., marketing promotions) under a single option.
- No Withdrawal Mechanism: Users cannot revoke consent previously granted at a later stage.
Installation and Activation¶
Install via the DSH plugin manager, or use it in a pure CLI environment.
dsh plugin --profile web add @deepwhale-cn/dsh-consent-guard
For pure Node.js environments, you can also run it directly using npm:
npx @deepwhale-cn/dsh-consent-guard
Typical Usage¶
Once installed, you can perform tests or inspections using the following commands:
dsh-consent-guard --demo
dsh-consent-guard --list-rules
dsh-consent-guard --html r.html
Use Cases and Boundaries¶
This plugin is suitable for automated scanning of code repositories to identify potential compliance risks.
Please note the following boundaries regarding the plugin’s functionality:
- Static Code Analysis Only (No UI Inspection): The plugin cannot determine if a pop-up actually appears or if the user can understand the interface content; these aspects require manual verification.
- Weak Signal Alerts: Errors regarding “failure to find withdrawal entrance” are weak signals. The withdrawal entrance may exist in server-side code or a separate repository; the plugin flags such issues to prompt further confirmation.
- No Judgment on Necessity: The plugin does not determine whether a specific data collection is “necessary for providing the service”; this is a legal determination.
- Legal Liability: Users must comply with the laws and regulations of their respective regions and assume sole responsibility for any consequences resulting from the use of this project.