docs: add secure local secret environment skill
Heimdall Gitea / Build and scan server image (pull_request) Canceled after 0s
Heimdall Gitea / Build and scan agent image (pull_request) Canceled after 0s
Heimdall Gitea / Publish Docker Hub latest tags (pull_request) Canceled after 0s
Heimdall Gitea / Publish versioned release (pull_request) Canceled after 0s
Heimdall Gitea / Build and tests (pull_request) Canceled after 1m21s
Heimdall Gitea / Build and scan server image (pull_request) Canceled after 0s
Heimdall Gitea / Build and scan agent image (pull_request) Canceled after 0s
Heimdall Gitea / Publish Docker Hub latest tags (pull_request) Canceled after 0s
Heimdall Gitea / Publish versioned release (pull_request) Canceled after 0s
Heimdall Gitea / Build and tests (pull_request) Canceled after 1m21s
This commit is contained in:
1 parent
6fc8efc438
commit
2bd01a219f
2 files changed
+32
No files matched your search
@@ -0,0 +1,28 @@
|
||||
---
|
||||
name: secure-env-secrets
|
||||
description: Securely read or store a user-provided secret as a local environment variable outside the repository. Use when the user asks to keep a secret available to local commands or applications; this does not configure CI or remote services.
|
||||
---
|
||||
|
||||
# Secure user environment variables
|
||||
|
||||
Handle only secrets the user supplied or explicitly authorized you to retrieve. Secret values must stay outside every repository. Never repeat a value in commentary, tool output, logs, diffs, command history, process arguments, or a final response.
|
||||
|
||||
## Choose scope and storage
|
||||
|
||||
- Ask only for missing details that affect use: variable name, target application or command, and whether it needs one-command, current-shell, or persistent user-session scope.
|
||||
- Prefer the operating system credential store or an existing user secret manager. Read from it at process launch and pass the value only to the process that needs it.
|
||||
- An environment variable is inherited by child processes and visible to processes running as the same user. It is a delivery mechanism, not encrypted storage.
|
||||
- Do not write secrets to project `.env` files, shell startup files, system-wide environment configuration, Compose files, source code, CI workflows, test fixtures, or synced/shared directories by default.
|
||||
- If a persistent local environment file is specifically needed and no credential store is available, use a user-owned directory outside all involved repositories (for example, `$XDG_CONFIG_HOME/heimdall` or `~/.config/heimdall`). Set the directory to mode `0700` and the file to `0600`. Explain that permissions restrict other accounts but do not encrypt the file. Never commit the file.
|
||||
- Load a persistent file only for the requested process or shell. Do not add automatic loading to shell startup configuration unless the user explicitly requests it.
|
||||
|
||||
## Read and write without disclosure
|
||||
|
||||
1. Resolve and verify that the destination is outside the current repository and any other repository involved.
|
||||
2. Before writing, check whether the named variable already exists without displaying its value. Preserve it unless the user explicitly requests replacement. Never silently overwrite or delete credentials.
|
||||
3. Receive new values through a masked prompt or the selected credential store's protected input. Do not embed a secret in a command string, here-document, command argument, URL, environment assignment, or helper variable. If the available interface would record or display the value, have the user enter it locally through a protected prompt instead.
|
||||
4. Avoid shell tracing and commands that dump environment or file contents. Never use `env`, `printenv`, `set`, `echo "$SECRET"`, or `git diff` to inspect a secret.
|
||||
5. Use the value only for the requested operation. Verify only that the variable is present and that the destination permissions are correct; never report its length, prefix, hash, or other value-derived information.
|
||||
6. Report the variable name, scope, storage path or credential-store location, and whether it is set. Do not report the value.
|
||||
|
||||
Do not configure CI, cloud, or remote account secrets under this skill unless the user separately requests that destination and authorizes the remote change. If a secret is exposed in output or committed, stop using it and tell the user it should be rotated. Do not rotate it in an external service without authorization.
|
||||
@@ -0,0 +1,4 @@
|
||||
interface:
|
||||
display_name: "Secure Environment Secrets"
|
||||
short_description: "Keep user secrets outside repositories"
|
||||
default_prompt: "Safely read or store the user-provided secret as a local environment variable outside the repository."
|
||||
Reference in new issue
Block a user