Some checks failed
Secrets CLI - Build & Release / 版本 & Release (push) Successful in 3s
Secrets CLI - Build & Release / 质量检查 (fmt / clippy / test) (push) Successful in 2m20s
Secrets CLI - Build & Release / Build (macOS aarch64 + x86_64) (push) Successful in 1m4s
Secrets CLI - Build & Release / Build (x86_64-unknown-linux-musl) (push) Successful in 1m13s
Secrets CLI - Build & Release / Build (x86_64-pc-windows-msvc) (push) Has been cancelled
Secrets CLI - Build & Release / 发布草稿 Release (push) Has been cancelled
- run 新增 -s/--secret 字段过滤,只注入指定字段到子进程(最小权限) - run 新增 --dry-run 模式,输出变量名与来源映射,不执行命令、不暴露值 - run 新增 -o 参数,dry-run 默认 JSON 输出 - 默认输出格式改为始终 json,移除 TTY 自动切换逻辑,-o text 供人类使用 - build_injected_env_map 签名从 &[SecretField] 改为 &[&SecretField] - 更新 AGENTS.md、README.md、.vscode/tasks.json - version: 0.9.5 → 0.9.6 Made-with: Cursor
150 lines
5.8 KiB
JSON
150 lines
5.8 KiB
JSON
{
|
|
"version": "2.0.0",
|
|
"tasks": [
|
|
{
|
|
"label": "build",
|
|
"type": "shell",
|
|
"command": "cargo build",
|
|
"group": { "kind": "build", "isDefault": true }
|
|
},
|
|
{
|
|
"label": "cli: version",
|
|
"type": "shell",
|
|
"command": "./target/debug/secrets -V",
|
|
"dependsOn": "build"
|
|
},
|
|
{
|
|
"label": "cli: help",
|
|
"type": "shell",
|
|
"command": "./target/debug/secrets --help",
|
|
"dependsOn": "build"
|
|
},
|
|
{
|
|
"label": "cli: help add",
|
|
"type": "shell",
|
|
"command": "./target/debug/secrets help add",
|
|
"dependsOn": "build"
|
|
},
|
|
{
|
|
"label": "cli: help config",
|
|
"type": "shell",
|
|
"command": "./target/debug/secrets help config",
|
|
"dependsOn": "build"
|
|
},
|
|
{
|
|
"label": "cli: config path",
|
|
"type": "shell",
|
|
"command": "./target/debug/secrets config path",
|
|
"dependsOn": "build"
|
|
},
|
|
{
|
|
"label": "cli: config show",
|
|
"type": "shell",
|
|
"command": "./target/debug/secrets config show",
|
|
"dependsOn": "build"
|
|
},
|
|
{
|
|
"label": "test: search all",
|
|
"type": "shell",
|
|
"command": "./target/debug/secrets search",
|
|
"dependsOn": "build"
|
|
},
|
|
{
|
|
"label": "test: search all (verbose)",
|
|
"type": "shell",
|
|
"command": "./target/debug/secrets --verbose search",
|
|
"dependsOn": "build"
|
|
},
|
|
{
|
|
"label": "test: search by namespace (refining)",
|
|
"type": "shell",
|
|
"command": "./target/debug/secrets search -n refining",
|
|
"dependsOn": "build"
|
|
},
|
|
{
|
|
"label": "test: search by namespace (ricnsmart)",
|
|
"type": "shell",
|
|
"command": "./target/debug/secrets search -n ricnsmart",
|
|
"dependsOn": "build"
|
|
},
|
|
{
|
|
"label": "test: search servers",
|
|
"type": "shell",
|
|
"command": "./target/debug/secrets search --kind server",
|
|
"dependsOn": "build"
|
|
},
|
|
{
|
|
"label": "test: search services",
|
|
"type": "shell",
|
|
"command": "./target/debug/secrets search --kind service",
|
|
"dependsOn": "build"
|
|
},
|
|
{
|
|
"label": "test: search keys",
|
|
"type": "shell",
|
|
"command": "./target/debug/secrets search --kind key",
|
|
"dependsOn": "build"
|
|
},
|
|
{
|
|
"label": "test: search by tag (aliyun)",
|
|
"type": "shell",
|
|
"command": "./target/debug/secrets search --tag aliyun",
|
|
"dependsOn": "build"
|
|
},
|
|
{
|
|
"label": "test: search by tag (hongkong)",
|
|
"type": "shell",
|
|
"command": "./target/debug/secrets search --tag hongkong",
|
|
"dependsOn": "build"
|
|
},
|
|
{
|
|
"label": "test: search keyword (gitea)",
|
|
"type": "shell",
|
|
"command": "./target/debug/secrets search -q gitea",
|
|
"dependsOn": "build"
|
|
},
|
|
{
|
|
"label": "test: run service secrets",
|
|
"type": "shell",
|
|
"command": "./target/debug/secrets run -n refining --kind service --name gitea -- printenv",
|
|
"dependsOn": "build"
|
|
},
|
|
{
|
|
"label": "test: combined search (ricnsmart + server + shanghai)",
|
|
"type": "shell",
|
|
"command": "./target/debug/secrets search -n ricnsmart --kind server --tag shanghai",
|
|
"dependsOn": "build"
|
|
},
|
|
{
|
|
"label": "test: add + delete roundtrip",
|
|
"type": "shell",
|
|
"command": "echo '--- add ---' && ./target/debug/secrets add -n test --kind demo --name roundtrip-test --tag test -m foo=bar -s password=secret123 && echo '--- search metadata ---' && ./target/debug/secrets search -n test && echo '--- run secrets ---' && ./target/debug/secrets run -n test --kind demo --name roundtrip-test -- printenv && echo '--- delete ---' && ./target/debug/secrets delete -n test --kind demo --name roundtrip-test && echo '--- verify deleted ---' && ./target/debug/secrets search -n test",
|
|
"dependsOn": "build"
|
|
},
|
|
{
|
|
"label": "test: add + delete roundtrip (verbose)",
|
|
"type": "shell",
|
|
"command": "echo '--- add (verbose) ---' && ./target/debug/secrets --verbose add -n test --kind demo --name roundtrip-verbose --tag test -m foo=bar -s password=secret123 && echo '--- delete (verbose) ---' && ./target/debug/secrets --verbose delete -n test --kind demo --name roundtrip-verbose",
|
|
"dependsOn": "build"
|
|
},
|
|
{
|
|
"label": "test: update roundtrip",
|
|
"type": "shell",
|
|
"command": "echo '--- add ---' && ./target/debug/secrets add -n test --kind demo --name update-test --tag v1 -m env=staging && echo '--- update ---' && ./target/debug/secrets update -n test --kind demo --name update-test --add-tag v2 --remove-tag v1 -m env=production && echo '--- verify ---' && ./target/debug/secrets search -n test --kind demo && echo '--- cleanup ---' && ./target/debug/secrets delete -n test --kind demo --name update-test",
|
|
"dependsOn": "build"
|
|
},
|
|
{
|
|
"label": "test: audit log",
|
|
"type": "shell",
|
|
"command": "echo '--- add ---' && ./target/debug/secrets add -n test --kind demo --name audit-test -m foo=bar -s key=val && echo '--- update ---' && ./target/debug/secrets update -n test --kind demo --name audit-test -m foo=baz && echo '--- delete ---' && ./target/debug/secrets delete -n test --kind demo --name audit-test && echo '--- audit log (last 5) ---' && psql $DATABASE_URL -c \"SELECT action, namespace, kind, name, actor, detail, created_at FROM audit_log ORDER BY created_at DESC LIMIT 5;\"",
|
|
"dependsOn": "build"
|
|
},
|
|
{
|
|
"label": "test: add with file secret",
|
|
"type": "shell",
|
|
"command": "echo '--- add key from file ---' && ./target/debug/secrets add -n test --kind key --name test-key --tag test -s content=@./test-fixtures/example-key.pem && echo '--- verify metadata ---' && ./target/debug/secrets search -n test --kind key && echo '--- verify run ---' && ./target/debug/secrets run -n test --kind key --name test-key -- printenv && echo '--- cleanup ---' && ./target/debug/secrets delete -n test --kind key --name test-key",
|
|
"dependsOn": "build"
|
|
}
|
|
]
|
|
}
|