dsh-cn-log-retention: A Log Retention Compliance Checker for DeepSeek Harness
feely0208/dsh-cn-log-retention
A DSH plugin for China compliance checks: verifies logging is enabled, required fields are recorded, and retention meets the statutory 6-month minimum, with rule listings and HTML reports.
dsh-cn-log-retention is a compliance checker built for DeepSeek Harness that focuses on how long application logs are actually kept. Many projects rotate logs with defaults that retain only a few days, which is fine for debugging but leaves nothing behind when a regulator asks for half a year of network logs. The plugin verifies that logging is enabled, that the right events are recorded, and that retention reaches the 180-day legal minimum, ranking the most serious gaps first and producing an HTML report for archiving. It covers application-layer logs only; database audit, network device, and operating system logs are out of scope.
How to Install
dsh plugin --profile web add @deepwhale-cn/dsh-cn-log-retention- Category
- Development & Operations
- Platform
- DSH Plugin
- Author
- feely0208
- Distribution
- Plugin
dsh-cn-log-retention Key Features
dsh-cn-log-retention Repo Summary
What Does It Do?
It is a DSH plugin for DeepSeek Harness that audits application log retention compliance, checking whether logging is enabled, whether the right events are recorded, and whether logs are kept for the legally required six months. It solves the problem of log rotation defaults that keep only a few days of data, so that when regulators ask for half a year of network logs, they are still there. Maintained by feely0208 under the MIT license and written in Shell, it was last updated in 2026-10.
Core Features
- Retention check: verifies logs are kept for at least the 180-day legal minimum and cannot be casually deleted by the application process.
- Severity-based findings: reports issues by level so the most serious compliance gaps surface first.
- Rule and basis listing: lists every check rule together with its regulatory basis for easier remediation.
- Report output: generates an HTML report for archiving and internal review.
- Log tiering guidance: separates short-retention business logs from long-retention audit logs stored independently.
How to Use This Plugin?
After enabling it in DSH, run the demo mode once to see what it detects, then use the rule-listing mode to review all rules and their basis, and finally output an HTML report to a file you specify. It only covers application-layer logs; database audit, network device, and operating system logs are out of scope. A missing rotation config does not mean logs were not kept for 180 days, since the deployment layer may handle retention centrally, so the plugin does not judge missing items and does not verify immutability at the storage layer. Other compliance items are handled by companion plugins.
How to Troubleshoot This Plugin?
The plugin documents its boundaries clearly: if a result flags insufficient retention, first confirm whether the application-layer rotation is too short or the deployment layer already retains logs centrally, to avoid a false positive. If a check seems inapplicable, review the rules and their basis in the rule-listing mode before deciding whether to adjust. Database audit, network device, and operating system logs are intentionally out of scope, so related gaps are expected behavior.
This page is an independent rewrite of the plugin's official README — for authoritative documentation and the latest changes, refer to the source: feely0208/dsh-cn-log-retention. The plugin is third-party code that runs on your machine once installed; inclusion does not imply endorsement — please review the source before installing.
