Preface¶
When developing apps with registration and “Teen Mode” in DSH (DeepSeek Harness), phrasing like “Teen Mode enabled by default” is common. While it appears to protect minors, it may not satisfy Article 31 of the Personal Information Protection Law: “To process the personal information of minors under the age of fourteen, the consent of their parents or other guardians shall be obtained, and specific personal information processing rules shall be formulated.” Manually cross-referencing code files against legal statutes is costly and prone to missing logical gaps, such as “guardian consent cannot be triggered without age identification.” This article introduces the community plugin dsh-minor-guard (npm package @deepwhale-cn/dsh-minor-guard), which uses static rules to scan repositories for code indicators related to minor protection and provides graded findings. This facilitates a round of self-checks before code changes or releases.
What is this¶
dsh-minor-guard is published by the maintainer feely0208, categorized as admin-security, with the current npm version 0.1.1 (MIT License). Its positioning is to verify whether the processing of personal information for individuals under 14 includes identifiable code-level implementations for guardian consent, specific rules, and age thresholds. It has a clear division of labor with dsh-consent-guard—the latter targets consent mechanisms for general users, while this plugin focuses specifically on the special requirements for minors.
Plugin Directory Page: skillhub.cn/plugins/feely0208/dsh-minor-guard
Source Code & Documentation: github.com/feely0208/dsh-minor-guard
Three Common Gaps Without the Plugin¶
The README uses a snippet of typical registration code to illustrate the problem: simply having teenMode enabled by default and written to the database does not equate to compliance. Cross-referencing with Article 31 of the Personal Information Protection Law, common gaps include:
- No Guardian Consent — Consent must come from a guardian; relying solely on operations performed by the minor is insufficient.
- No Age Identification — Without determining if the user is a child, the guardian consent flow cannot be triggered within the code path.
- Teen Mode Enabled by Default — Entering this mode without explicit user selection may constitute a compliance risk point heuristically.
The plugin does not make legal conclusions for the product; instead, it maps the above dimensions into scannable rules and report items.
Core Functionality: What to Scan and How to Grade¶
Scan results are summarized according to the levels defined in the README:
| Level | Check Direction |
|---|---|
| High | Minor-related features exist but Guardian Consent is missing; Specific child protection rules are missing |
| Medium | Registration exists but Age Identification is missing; Teen Mode is Enabled by Default |
Conditional Rules: The rule MINOR-NO-GUARDIAN-CONSENT only runs when minor-related features are detected (identification markers include Teen Mode, teenMode, Child Mode, etc.). Running this rule on ordinary projects may result in false positives; this utilizes the engine’s Conditional Rule capability (check.when) to narrow the scope of application.
Age Identification: The plugin recognizes common coding patterns (age fields, date of birth, birthday, etc.); custom field names may result in missed detections and require manual review.
Installation and Activation¶
Installation commands must follow the official README; do not manually construct github:owner/repo formats.
Add the plugin to the DSH Web configuration file:
dsh plugin --profile web add @deepwhale-cn/dsh-minor-guard
When using the CLI only, you can run the package directly via npx:
npx @deepwhale-cn/dsh-minor-guard
package.json requires Node >= 18 and dsh >= 0.1.0-rc.6. The plugin reads project files with the permissions of the current DSH process. Before installation or activation, please review the repository source code and MIT license to ensure compliance with your team’s security and compliance workflows.
Typical Usage¶
After installation, you can use the dsh-minor-guard command-line entry provided by the package:
dsh-minor-guard --demo
dsh-minor-guard --list-rules
dsh-minor-guard --html r.html
--demo: View demo mode output (the README provides demo screenshots for reference).--list-rules: List rules and their bases.--html r.html: Export the inspection report as an HTML file.
In the DSH ecosystem, the plugin integrates with the Harness via methods like cordis.patch.yml; the specific scan scope is determined by the code in the current working directory.
Use Cases and Boundaries¶
Who it is for: Web/App/server-side repositories processing children’s personal information within the context of China’s Personal Information Protection Law; teams working on Teen Mode, Child Mode, or registration flows who want to quickly perform “code-side” gap scanning in CI or locally after code changes.
Boundaries you must know (from the official README):
- Only looks at code, not the actual product — If guardian consent is handled via offline or SMS flows, it may not be visible in the code. A “zero alerts” result does not mean the product is compliant.
- “Enabled by Default” is heuristic — Files that already implement a guardian consent flow will be skipped (file-level exclusion, relatively coarse granularity).
- Does not cover industry-specific regulations (e.g., game anti-addiction time limits), focusing on the dimension of personal information protection.
- This plugin is an auxiliary tool; users must comply with laws and regulations in their region and assume responsibility for the consequences of use.
It can be used in conjunction with the dsh-consent-guard and other “Domestic Compliance” plugins in the same series. The DSH community plugin directory is an independent site and has no official affiliation with DeepSeek or High-Flyer.
Conclusion¶
dsh-minor-guard translates the hard requirements related to “under fourteen years of age” in Article 31 of the Personal Information Protection Law into reproducible static checks and graded reports. By conditionally triggering on minor-related features, it reduces false positives in ordinary projects. If you are maintaining a codebase with Teen Mode, you can install it using the commands above, cross-reference rules with --list-rules, archive reports with --html, and manually supplement offline flows that cannot be expressed in code.