From 2bd01a219f691699fa7c1b5ba5cf3f93b372589d Mon Sep 17 00:00:00 2001 From: Arnaud Dartois Date: Sat, 24 Oct 2026 13:54:12 +0200 Subject: [PATCH] docs: add secure local secret environment skill --- .agents/skills/secure-env-secrets/SKILL.md | 28 +++++++++++++++++++ .../secure-env-secrets/agents/openai.yaml | 4 +++ 2 files changed, 32 insertions(+) create mode 100644 .agents/skills/secure-env-secrets/SKILL.md create mode 100644 .agents/skills/secure-env-secrets/agents/openai.yaml diff --git a/.agents/skills/secure-env-secrets/SKILL.md b/.agents/skills/secure-env-secrets/SKILL.md new file mode 100644 index 0000000..4afbc9b --- /dev/null +++ b/.agents/skills/secure-env-secrets/SKILL.md @@ -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. diff --git a/.agents/skills/secure-env-secrets/agents/openai.yaml b/.agents/skills/secure-env-secrets/agents/openai.yaml new file mode 100644 index 0000000..8d59cf4 --- /dev/null +++ b/.agents/skills/secure-env-secrets/agents/openai.yaml @@ -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."