跳到主要内容
知仓学习社ZHICANG

secret

secret,来自 YaoApp/yao 的 agent 技能。

不碰外部(只输出文字)无严重或高危命中YaoApp/yao

它会碰到什么

扫了多少4 个文本文件,3 KB
它会碰到什么不碰外部(只输出文字)
命中总数4 处
命中统计严重 0 · 高 0 · 中 0 · 低 0

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

Secret Management

Agents can read user-configured secrets at runtime using the tai tool CLI.

Secrets are encrypted at rest (AES-256-GCM) and decrypted only when read.

Available Tools

| Tool | Description |

|------|-------------|

| secret_list | List secret names and descriptions (no values) |

| secret_read | Read a single secret value by name |

Usage

Bash

# List available secrets
tai tool secret_list

# Read a secret
TOKEN=$(tai tool secret_read '{"name": "GITHUB_TOKEN"}' | jq -r '.value')
git clone "https://${TOKEN}@github.com/org/repo.git"

Node.js

const { execSync } = require("child_process");

function readSecret(name) {
  const raw = execSync(
    `tai tool secret_read '${JSON.stringify({ name })}'`,
    { encoding: "utf-8" }
  );
  return JSON.parse(raw).value;
}

const token = readSecret("GITHUB_TOKEN");

Python

import json
import subprocess

def read_secret(name: str) -> str:
    result = subprocess.run(
        ["tai", "tool", "secret_read", json.dumps({"name": name})],
        capture_output=True, text=True, check=True,
    )
    return json.loads(result.stdout)["value"]

token = read_secret("GITHUB_TOKEN")

PowerShell

function Read-Secret {
    param([string]$Name)
    $json = @{ name = $Name } | ConvertTo-Json -Compress
    $result = tai tool secret_read $json | ConvertFrom-Json
    return $result.value
}

$token = Read-Secret -Name "GITHUB_TOKEN"

Security Rules

  1. Never print or log secret values — Do not write secrets to stdout, stderr, or any log file.
  2. Never write secrets to files — Exception: SSH keys may be written to ~/.ssh/ with chmod 600 permissions.
  3. Never send secrets to the LLM — Secret values must not appear in prompt content, system messages, or tool call results that are forwarded to the model.
  4. Scope isolation — Secrets are scoped per user per agent. An agent can only access secrets configured for it.
  5. Audit trail — Every secret_read call is logged in the audit trail with the caller's identity.

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。

它属于哪个仓库

星标★ 7,962
本站分层T1
该仓技能数12
原文件路径tools/secret/SKILL.md

同一个仓库里的其他技能

看这个仓库的全部 12 个技能