Logo Secrets Management

Secrets Management

Cộng đồng
nahid-sparktales
secrets-management

Keep credentials out of code, logs, bundles and history — one supply path, scoped per environment, rotatable on demand — and run the rotate-first response when one has already leaked. Use when adding or moving a key, token, connection string or signing secret, when a scanner or reviewer finds one committed, when a credential appears in logs or a client bundle, or when rotation is due. Not for deciding what a credential may access, and not for vulnerability advisories in dependencies.

Tổng quan

Nhà phát hànhnahid-sparktales
Kho mãagent-dispatcher
Tên kỹ năngsecrets-management
Sao
58
Bản fork
5
Tệp đi kèm
1
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 1 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được nahid-sparktales công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Secrets Management trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/nahid-sparktales/agent-dispatcher/tree/main/skills/security/secrets-management
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/nahid-sparktales/agent-dispatcher.git /tmp/agent-dispatcher
mkdir -p .claude/skills
cp -r /tmp/agent-dispatcher/skills/security/secrets-management .claude/skills/secrets-management
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Secrets Management trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Secrets Management ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Secrets Management với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Secrets management

Two different jobs share one skill because the second is always urgent and the first is what stops it recurring. If a secret has already leaked, start at When one has leaked and come back after.

When this fires

A credential is being introduced, moved, shared or rotated; a scanner, review or log inspection turns one up; a key needs to reach a new environment or service. It does not fire for deciding what a credential is permitted to do once valid.

Procedure — keeping them out

  1. Inventory what counts. API keys, database URLs carrying passwords, private and signing keys, OAuth client secrets, webhook signing secrets, session secrets, cloud credentials. For each: which environments it exists in, who owns it, where it is stored, how it is rotated. A secret nobody owns is a secret nobody rotates.
  2. Establish one supply path and make everything else a defect. Injected at runtime from the platform's secret store or environment, read once at startup through a single config module. Committed .env files, hardcoded fallback defaults, secrets in CI configuration files, build arguments and image layers are all the same failure with different file extensions.
  3. Search the working tree, then search the history separately. They are different questions. A key rotated out of the current tree is still exposed if it sits in a commit anyone can fetch.
  4. Put prevention in the path, not in a habit. Scanning at commit time and in CI so the build fails, plus the host's push protection where it exists. Say plainly that pattern scanners miss custom and high-entropy-free formats — they lower the rate, they do not close the hole.
  5. Close the log path, which leaks more than git does. Application logs, error messages, stack traces, HTTP client debug output, crash and analytics reporters, and URL query strings. Redact at the logging boundary so a new call site inherits it, and never place a credential in a URL.
  6. Check the client bundle. Anything shipped to a browser or mobile app is public no matter how it is named. Confirm that only the deliberately public values carry a public prefix, and search the built output rather than the source.
  7. Scope and separate. A distinct credential per service and per environment, with the narrowest permission that works, and short-lived where the provider issues short-lived ones. One key shared everywhere means one leak rotates everything at once.
  8. Make rotation routine before it is an emergency. Know whether each secret can be rotated without downtime — most providers allow two valid keys briefly, and that overlap is what makes a clean rotation possible. A rotation procedure that has never been executed is a document, not a capability; rehearse it in a non-production environment.
  9. Review who can read the store. People, CI jobs, and any workflow that runs on contributions from outside the team. Secrets exposed to builds triggered by forks are a standing leak.

When one has leaked

  1. Treat it as compromised from the moment it was written, regardless of how briefly, how private the repository is, or who "could realistically have seen it". Private repositories get cloned, forked and made public.
  2. Rotate or revoke first — but revoking a live credential can take a service down, so name the credential, its blast radius and the dependents, and get the owner's decision before executing. Prepare the rotation, do not silently perform it.
  3. Establish the window and the audience. When it entered, through which channel, who or what could read it in that period, and whether it also reached a third party such as a log or error service. An external sink counts as exposure.
  4. Look for use. The provider's audit log for calls in the window from unexpected sources. Say explicitly that finding nothing there is not proof it was unused — most providers do not log enough to support that claim.
  5. Purge afterwards, never instead. History rewriting is disruptive, needs coordination with everyone holding a clone, and still leaves the old objects in forks, caches and mirrors. Rewriting shared history is a stop-and-ask action. Rotation is the control; removal is cleanup.
  6. Fix the path that let it in — the missing scanner, the example file that became real, the log line — and write the incident down: what leaked, when, what was rotated, what was checked.

Checklist

  • Every secret has an owner, a store, an environment scope and a rotation method
  • One documented supply path; no credential in code, CI config, build args or image layers
  • Working tree and history searched as separate passes
  • Commit-time and CI scanning in place, with its blind spots stated
  • Redaction at the logging boundary; no secret in any URL
  • Built client bundle inspected, not just the source
  • Credentials distinct per service and environment, least privilege
  • Rotation rehearsed somewhere real, with the overlap behaviour known
  • On a leak: rotation proposed with blast radius before anything is revoked
  • On a leak: exposure window, provider audit check and written incident record

Failure handling

  • Rotation would break production — that is a finding, not a reason to skip it. Report the dependency that blocks it, propose the overlap plan, and let the owner schedule it.
  • The secret is embedded in a deployed client — rotation alone does not help, because the new value ships the same way. The fix is moving the call server-side; say so rather than rotating in a circle.
  • The scanner flags a false positive — confirm it is genuinely an example or a test fixture before dismissing it, and make it obviously fake so the next reviewer does not re-litigate it.
  • A secret was only in a log, not in code — same exposure, different medium. Rotate, then find the log sink's retention and who reads it.
  • You cannot tell whether it was ever valid — treat it as valid. Verifying by using the credential is an action against someone's system; ask the owner instead.

Evidence to report

Where each secret now comes from and where it no longer appears — the file, the log line, the bundle path. The scan performed, the tool used, and what it cannot catch. For a leak: the exposure window, the channel, what was rotated and by whom, what the provider's audit log showed for that window, whether history was purged and what that does not reach, and the prevention now in the path. Naming rotation as "handled" without saying who executed it is not evidence.

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Secrets Management làm được gì?

Keep credentials out of code, logs, bundles and history — one supply path, scoped per environment, rotatable on demand — and run the rotate-first response when one has already leaked. Use when adding or moving a key, token, connection string or signing secret, when a scanner or reviewer finds one committed, when a credential appears in logs or a client bundle, or when rotation is due. Not for deciding what a credential may access, and not for vulnerability advisories in dependencies.

Vì sao nên dùng Secrets Management trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Secrets Management là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Secrets Management trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/nahid-sparktales/agent-dispatcher/tree/main/skills/security/secrets-management. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Secrets Management?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Secrets Management với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Secrets Management với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Secrets Management có miễn phí không?

Có. Kỹ năng này được nahid-sparktales phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇