Token导航 LogoToken导航

Agent Skill · 研究检索

security(安全)

用于辅助安全审计、权限检查、凭据风险、认证流程和常见漏洞排查。它适合让 Agent 梳理敏感配置、检查依赖风险、分析鉴权逻辑或生成安全复核清单。使用时不能把工具输出直接当最终结论,涉及密钥、令牌、用户数据或生产系统时,应先确认最小权限、脱敏方式和操作边界。

security 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证为 MIT,暂无第三方扫描结果,按安装量在研究检索类的 73,675 个 Skill 里排第 64,068。

总安装 306周安装 13GitHub Stars 公开资料未说明下载 107核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:security(安全)
来源仓库:https://github.com/yosrbennagra/3sc
仓库路径:skills/security
安装命令:
npx skills add yosrbennagra/3sc --skill "security"
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

AgentSkills.tonpx skills
npx skills add yosrbennagra/3sc --skill "security"

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

security 用于辅助安全审计、权限检查、凭据风险、认证流程和常见漏洞排查,适合梳理敏感配置、检查依赖风险或生成安全复核清单。适用于安全审计相关的权限检查、凭据风险分析和漏洞排查,不能将工具输出直接作为最终结论。

通过 npx skills add yosrbennagra/3sc --skill "security" 命令安装。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。security 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/security

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add yosrbennagra/3sc --skill "security";命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

security 怎么安装?

在终端执行 npx skills add yosrbennagra/3sc --skill "security"。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

security 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

security 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

security 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

security 用的人多吗?

公开数据是累计安装 306 次,近一周安装 13 次,下载 107 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

security 安全吗?

没有查到第三方扫描结果,安全性无法从公开资料判断,安装前请自行审查源码、依赖和命令行为。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 没有第三方扫描结果,安全性只能靠自己读源码判断。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 要求有安全扫描结论才肯安装的团队。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
security

安全 · 本页

306—需要联网MIT未收录

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
security
description
Security patterns for the 3SC widget host. Covers credential storage, input validation, secure coding practices, and protecting user data.

Security

Overview

Security is critical for a desktop application that handles user data and loads external plugins. This skill covers security patterns for protecting credentials, validating input, and secure coding practices.

Definition of Done (DoD)

  • [ ] Credentials stored using DPAPI (Windows Data Protection)
  • [ ] User input validated before use
  • [ ] Sensitive data never logged
  • [ ] File paths validated to prevent traversal attacks
  • [ ] Error messages don't expose internal details
  • [ ] Security-sensitive operations are audited

Credential Storage

Windows Data Protection API (DPAPI)

public class SecureStorageService : ISecureStorage
{
    private readonly string _storePath;
    
    public SecureStorageService()
    {
        _storePath = Path.Combine(
            Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
            "3SC", "secure");
        Directory.CreateDirectory(_storePath);
    }
    
    public void Store(string key, string value)
    {
        ArgumentException.ThrowIfNullOrEmpty(key);
        
        var plainBytes = Encoding.UTF8.GetBytes(value);
        var protectedBytes = ProtectedData.Protect(
            plainBytes, 
            entropy: null,  // Add entropy for additional security
            scope: DataProtectionScope.CurrentUser);
        
        var filePath = GetFilePath(key);
        File.WriteAllBytes(filePath, protectedBytes);
        
        Log.Debug("Credential stored: {Key}", key);  // Never log the value!
    }
    
    public string? Retrieve(string key)
    {
        var filePath = GetFilePath(key);
        
        if (!File.Exists(filePath))
            return null;
        
        try
        {
            var protectedBytes = File.ReadAllBytes(filePath);
            var plainBytes = ProtectedData.Unprotect(
                protectedBytes,
                entropy: null,
                scope: DataProtectionScope.CurrentUser);
            
            return Encoding.UTF8.GetString(plainBytes);
        }
        catch (CryptographicException ex)
        {
            Log.Warning(ex, "Failed to decrypt credential: {Key}", key);
            return null;
        }
    }
    
    public void Delete(string key)
    {
        var filePath = GetFilePath(key);
        
        if (File.Exists(filePath))
        {
            // Overwrite before delete for security
            File.WriteAllBytes(filePath, new byte[64]);
            File.Delete(filePath);
        }
    }
    
    private string GetFilePath(string key)
    {
        // Sanitize key to prevent path traversal
        var safeKey = Path.GetFileName(key);
        return Path.Combine(_storePath, $"{safeKey}.dat");
    }
}

Credential Manager for API Keys

public class CredentialManagerService : ICredentialManager
{
    private const string CredentialPrefix = "3SC:";
    
    public void SaveCredential(string target, string username, string password)
    {
        var credential = new Credential
        {
            Target = CredentialPrefix + target,
            Username = username,
            Password = password,
            Type = CredentialType.Generic,
            Persist = PersistType.LocalMachine
        };
        
        credential.Save();
        Log.Information("Credential saved for target: {Target}", target);
    }
    
    public (string? Username, string? Password) GetCredential(string target)
    {
        var credential = new Credential { Target = CredentialPrefix + target };
        
        if (credential.Load())
        {
            return (credential.Username, credential.Password);
        }
        
        return (null, null);
    }
    
    public void DeleteCredential(string target)
    {
        var credential = new Credential { Target = CredentialPrefix + target };
        credential.Delete();
    }
}

Input Validation

Path Validation

public static class PathValidator
{
    private static readonly char[] InvalidChars = Path.GetInvalidPathChars()
        .Concat(new[] { '*', '?', '"', '<', '>', '|' })
        .ToArray();
    
    /// <summary>
    /// Validates and normalizes a file path to prevent traversal attacks.
    /// </summary>
    public static string ValidatePath(string basePath, string relativePath)
    {
        ArgumentException.ThrowIfNullOrEmpty(basePath);
        ArgumentException.ThrowIfNullOrEmpty(relativePath);
        
        // Check for invalid characters
        if (relativePath.IndexOfAny(InvalidChars) >= 0)
        {
            throw new ArgumentException("Path contains invalid characters", nameof(relativePath));
        }
        
        // Normalize and get full path
        var fullPath = Path.GetFullPath(Path.Combine(basePath, relativePath));
        var normalizedBase = Path.GetFullPath(basePath);
        
        // Ensure the path is within the base directory
        if (!fullPath.StartsWith(normalizedBase, StringComparison.OrdinalIgnoreCase))
        {
            throw new SecurityException($"Path traversal attempt detected: {relativePath}");
        }
        
        return fullPath;
    }
    
    /// <summary>
    /// Validates a widget package entry point path.
    /// </summary>
    public static bool IsValidEntryPoint(string widgetPath, string entry)
    {
        if (string.IsNullOrEmpty(entry))
            return false;
        
        // Entry must be a simple filename, no paths
        if (entry != Path.GetFileName(entry))
            return false;
        
        // Must be a DLL
        if (!entry.EndsWith(".dll", StringComparison.OrdinalIgnoreCase))
            return false;
        
        // File must exist within widget directory
        var fullPath = Path.Combine(widgetPath, entry);
        return File.Exists(fullPath);
    }
}

String Validation

public static class InputValidator
{
    private static readonly Regex SafeNamePattern = new(
        @"^[a-zA-Z0-9][a-zA-Z0-9\-_.]{0,63}$",
        RegexOptions.Compiled);
    
    public static bool IsValidWidgetKey(string? key)
    {
        return !string.IsNullOrEmpty(key) 
            && key.Length <= 64 
            && SafeNamePattern.IsMatch(key);
    }
    
    public static bool IsValidDisplayName(string? name)
    {
        return !string.IsNullOrWhiteSpace(name) 
            && name.Length <= 128
            && !name.Contains('<')  // Prevent XSS
            && !name.Contains('>');
    }
    
    public static string SanitizeHtml(string input)
    {
        if (string.IsNullOrEmpty(input))
            return string.Empty;
        
        return WebUtility.HtmlEncode(input);
    }
    
    public static string? TruncateWithEllipsis(string? input, int maxLength)
    {
        if (string.IsNullOrEmpty(input) || input.Length <= maxLength)
            return input;
        
        return input[..(maxLength - 3)] + "...";
    }
}

Error Message Security

Safe Error Messages

public static class SafeErrors
{
    // Public-facing error messages (user-visible)
    public const string GenericError = "An unexpected error occurred. Please try again.";
    public const string NetworkError = "Unable to connect. Please check your internet connection.";
    public const string DatabaseError = "Failed to save changes. Please try again.";
    public const string WidgetLoadError = "Failed to load widget. It may be corrupted or incompatible.";
    public const string AuthenticationError = "Authentication failed. Please check your credentials.";
    
    // Never expose these to users:
    // - Stack traces
    // - File paths
    // - Database connection strings
    // - Internal exception messages
    // - Server names or IPs
    
    public static string ToUserMessage(Exception ex)
    {
        return ex switch
        {
            HttpRequestException => NetworkError,
            Microsoft.Data.Sqlite.SqliteException => DatabaseError,
            FileNotFoundException => "The requested file was not found.",
            UnauthorizedAccessException => "Access denied. You may not have permission for this operation.",
            OperationCanceledException => "Operation was cancelled.",
            _ => GenericError
        };
    }
}

// Usage in ViewModel
catch (Exception ex)
{
    Log.Error(ex, "Detailed error for debugging");  // Full details to logs
    ErrorMessage = SafeErrors.ToUserMessage(ex);     // Safe message to UI
}

Audit Logging

Security Events

public static class SecurityAudit
{
    public static void LogCredentialAccess(string target, bool success)
    {
        Log.Information(
            "Security: Credential access - Target: {Target}, Success: {Success}",
            target, success);
    }
    
    public static void LogWidgetLoad(string widgetKey, string path, bool success)
    {
        Log.Information(
            "Security: Widget load - Key: {WidgetKey}, Path: {Path}, Success: {Success}",
            widgetKey, LogSanitizer.MaskPath(path), success);
    }
    
    public static void LogPermissionRequest(string widgetKey, string[] permissions, bool granted)
    {
        Log.Information(
            "Security: Permission request - Widget: {WidgetKey}, Permissions: {@Permissions}, Granted: {Granted}",
            widgetKey, permissions, granted);
    }
    
    public static void LogSuspiciousActivity(string activity, string details)
    {
        Log.Warning(
            "Security: Suspicious activity - Activity: {Activity}, Details: {Details}",
            activity, details);
    }
}

Secure Coding Practices

Memory Security

// Use SecureString for sensitive data in memory (when possible)
public class SecureCredential : IDisposable
{
    private SecureString? _password;
    
    public void SetPassword(string password)
    {
        _password?.Dispose();
        _password = new SecureString();
        
        foreach (var c in password)
        {
            _password.AppendChar(c);
        }
        
        _password.MakeReadOnly();
    }
    
    public string GetPassword()
    {
        if (_password == null)
            return string.Empty;
        
        var ptr = Marshal.SecureStringToBSTR(_password);
        try
        {
            return Marshal.PtrToStringBSTR(ptr);
        }
        finally
        {
            Marshal.ZeroFreeBSTR(ptr);
        }
    }
    
    public void Dispose()
    {
        _password?.Dispose();
        _password = null;
    }
}

Principle of Least Privilege

// Widget permissions model
public class WidgetPermissions
{
    public bool CanAccessNetwork { get; init; }
    public bool CanAccessFileSystem { get; init; }
    public bool CanAccessClipboard { get; init; }
    public bool CanStartProcess { get; init; }
    
    public static WidgetPermissions Default => new()
    {
        CanAccessNetwork = false,
        CanAccessFileSystem = false,
        CanAccessClipboard = false,
        CanStartProcess = false
    };
    
    public static WidgetPermissions FromManifest(string[] permissions)
    {
        return new WidgetPermissions
        {
            CanAccessNetwork = permissions.Contains("network"),
            CanAccessFileSystem = permissions.Contains("filesystem"),
            CanAccessClipboard = permissions.Contains("clipboard"),
            CanStartProcess = permissions.Contains("process")
        };
    }
}

Security Checklist

Before Release

  • [ ] All credentials use DPAPI storage
  • [ ] No hardcoded secrets in code
  • [ ] Error messages sanitized for users
  • [ ] File paths validated
  • [ ] Input validated at boundaries
  • [ ] Audit logging for security events
  • [ ] Widget permissions enforced
  • [ ] No sensitive data in logs

Code Review Security Questions

  1. Does this code handle user input? Is it validated?
  2. Does this code load external data? Is it sanitized?
  3. Does this code access credentials? Is access logged?
  4. Does this error message expose internal details?
  5. Does this file operation validate paths?
  6. Does this widget operation check permissions?

Common Vulnerabilities to Avoid

VulnerabilityPrevention
Path traversalValidate and normalize all paths
Credential exposureUse DPAPI, never log credentials
Information disclosureSanitize error messages
Arbitrary code executionSandbox widgets, validate assemblies
InjectionParameterize all queries
XSS in WebViewSanitize HTML content

References

平台分布

Gemini CLI

28.85%
按下载量换算31

windsurf

22.35%
按下载量换算24

trae

18.96%
按下载量换算20

OpenCode

15.07%
按下载量换算16

Codex

8.04%
按下载量换算9

Claude Code

4.06%
按下载量换算4

安全审计

暂无安全审计结果可展示。

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills