Preface¶
Policies may state “annual key rotation,” yet the id_rsa or TLS private key files in the repository might remain untouched for two years. When cybersecurity classified protection (MLPS) assessments inquire about the replacement cycle for authentication information, or client due diligence questions the key management process, the inability to provide verifiable facts often leaves only the admission that the “documentation exists, but implementation is hard to prove.”
Common practices involve manually checking configurations, viewing certificate expiry dates, or inspecting the KMS console. However, verifying consistency between local copies, .env files, and documentation still takes time. Here, we introduce the DSH plugin dsh-key-rotate (npm package: @deepwhale-cn/dsh-key-rotate, maintainer: feely0208, category: admin-security). It performs automated checks within agreed scope, turning questions like “how long has it been since the last change,” “is there a written rotation policy,” and “is the key reused across environments” into listable results.
What is this¶
dsh-key-rotate is designed for the DeepSeek Harness (DSH) ecosystem and is positioned as an audit tool for key rotation: it checks how long key and certificate files have remained unupdated, whether a rotation strategy can be found in documentation, and whether the same key is referenced in configurations across multiple environments.
The logic for determination is straightforwardly described in the README: use the mtime (modification time) of the key file to calculate the number of days since creation/modification, and compare it against a threshold (default 365 days). While policies may be written on paper, timestamps do not lie; however, they also cannot explain whether rotation has already occurred within the KMS—this point will be elaborated in the “Boundaries” section later.
Repository: feely0208/dsh-key-rotate
Community Directory: skillhub.cn Plugin Page
Core Features¶
The plugin classifies checks according to the levels defined in the README. The summary is as follows:
| Level | Content |
|---|---|
| High | Key/certificate file has not been updated for over a year (based on mtime) |
| Medium | Rotation policy cannot be found in documentation |
| Medium | The same key is referenced in multiple environment configurations |
This differs in function from the “key committed to repo” capabilities found in dsh-bundle-cn-skills: this plugin checks “how long since the last change” and does not replace secret leakage scanning.
The current version in package.json is 0.1.1, licensed under MIT, requiring Node >=18 and DSH >=0.1.0-rc.6.
Installation and Activation¶
Installation commands follow the README; choose one of the following methods.
Integrate with DSH (web profile):
dsh plugin --profile web add @deepwhale-cn/dsh-key-rotate
Standalone CLI (without DSH plugin loading):
npx @deepwhale-cn/dsh-key-rotate
The plugin reads files and configurations within the workspace using the permissions of the current dsh or node process. Before installation or execution, you should review the GitHub source code and the MIT license yourself to ensure the scope complies with your team’s policies.
Typical Usage¶
The CLI examples provided in the README are as follows.
First, view the demo output to understand the appearance of a check result:
dsh-key-rotate --demo
List rules and their basis to facilitate comparison with MLPS or internal control clauses:
dsh-key-rotate --list-rules
Export the results as an HTML report (the example filename is r.html):
dsh-key-rotate --html r.html
The official README includes screenshots of the report, demo mode, and rule list (see deepwhale.org.cn Plugin Assets), which can be compared against local --demo output.
Use Cases and Notes¶
Who it is for: Teams that need to quickly answer questions during self-inspection, pre-migration assessment, or pre-delivery such as “Have local key/certificate files been untouched for a long time?”, “Is there a written rotation strategy?”, or “Is the same key reused across environments in .env-style configurations?”. It is often used in conjunction with sibling plugins for secret scanning and configuration auditing (the README classifies it under “Data & Credentials” capabilities).
Boundaries you must know (Key points from the README):
- Age ≠ Not Rotated — The key might reside in a KMS, and the local file is just a copy; alerts require manual confirmation.
- Does not parse certificate content — It does not verify validity period, issuer, or key length.
- Cross-environment reuse check is limited to
.env-style files — KMS and CI secrets are not within the visible scope.
The DSH community plugin directories (such as dsh-plugin.org, skillhub.cn) are independent sites with no official affiliation with DeepSeek / High-Flyer; selecting plugins is a decision made by the team itself.
Conclusion¶
dsh-key-rotate turns the parts of key rotation that are “comparable against timestamps and documents, and capable of scanning .env references” into a simple command chain: Install → --demo / Official Scan → --list-rules or --html for record keeping. It cannot replace KMS strategies or certificate lifecycle management, but it fills the gap regarding “consistency between policy and files.”
- Directory Page: https://www.skillhub.cn/plugins/feely0208/dsh-key-rotate
- GitHub: https://github.com/feely0208/dsh-key-rotate