Introduction¶
In DeepSeek Harness (DSH), agents often need credentials when calling external services. Allowing the model to directly hold the secret value makes it easy to leak keys into the context, commands, or transcript.
Below is an introduction to accpowered/dsh-credential-manager. Its approach allows the model to use credentials by reference: the model sees the credential name and the DSH_CM_<ID> variable, while the secret value does not enter the conversation.
What is this¶
accpowered/dsh-credential-manager is a DSH plugin maintained by accpowered and is licensed under MIT.
It provides named user credentials for DSH, primarily comprising three categories of capabilities:
- model-facing credential tools:
credential_list,credential_create,credential_read,credential_update_note - host service plugin: manages credential metadata and provides secret value access behind the
ctx.credentialsseam - web client plugin: provides the Settings → Credentials page for inputting and managing write-only secret values
Core Features¶
- Secret values are provided to the shell in the form of
DSH_CM_<ID>environment variables. Injection happens during each model shell execution. - Secret values are write-only; they are not read back into any pages or transcripts.
- Expired credentials still work; expiry is informational and is marked on the page and in
credential_list. credential_readis only used as a deliberate last-resort escape hatch for non-shell usage, not the default path.
Installation¶
First, execute the installation command:
dsh plugin --profile web add github:accpowered/dsh-credential-manager
If you see a pnpm allowBuilds prompt during installation, only allow trusted sources and consider pinning a commit.
The plugin runs with the permissions of the current dsh process, so you should review the source code and license before installing.
Typical Usage¶
-
First, create a placeholder credential. When the model calls
credential_create, only pass the credential name, not the secret value. -
Then, go to the Settings → Credentials page to input the secret value. This value is write-only and will not be read back into the page or transcript afterwards.
-
Use
DSH_CM_<ID>inbashorpwshcommands. For example:
curl -H "Authorization: Bearer $DSH_CM_MYAPI" <your-endpoint>
This step only allows the command to obtain the expanded value of the environment variable without writing the secret into the conversation.
- If you truly need a non-shell path, consider
credential_read. It is just a last-resort escape hatch; prioritize usingDSH_CM_<ID>.
Notes¶
credential_readshould not be used as the default path.- Expired credentials do not automatically become invalid; they are only marked on the page and in
credential_listto facilitate rotation prompts. - If the harness does not forward
credential-manager/updatedevents, the Settings → Credentials page may not receive live push invalidations from other surfaces. - Uninstallation will not delete persisted metadata rows and stored secret values.
To uninstall, use:
dsh plugin --profile web remove dsh-credential-manager
Conclusion¶
With the installation and usage described above, accpowered/dsh-credential-manager separates “model access to credentials” from “exposing secrets in plaintext”: the model uses the name and DSH_CM_<ID>, while the human is responsible for maintaining the real secrets in Settings → Credentials.
GitHub: https://github.com/accpowered/dsh-credential-manager