Token导航 LogoToken导航TokenDH.com
开发执行命令github未标认证来源可访问许可证需确认审计异常

macos-securitymacOS 安全

Agent Skill

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

总安装

588

周安装

25

GitHub Stars

4

下载量

206
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/alphaonedev/openclaw-graph --skill macos-security

简介

macOS 安全用于辅助安全审计、权限检查、凭据风险、认证流程和常见漏洞排查。

  • 适合让 Agent 梳理敏感配置、检查依赖风险、分析鉴权逻辑或生成安全复核清单。
  • 使用时不能把工具输出直接当最终结论,涉及密钥、令牌、用户数据或生产系统时应先确认最小权限。
  • 需确认脱敏方式和操作边界,避免越权访问或误操作影响系统稳定性。
  • 该工具当前无额外说明,具体能力以来源仓库实现为准。

SKILL.md

macos-security

Purpose

This skill enables the AI agent to manage macOS security features, including XProtect for malware detection, MRT for removal, TCC for privacy permissions, quarantine attributes, code signing validation, and security audits. Use it to harden macOS systems against threats and ensure compliance.

When to Use

Apply this skill during system hardening routines, app deployment checks, privacy audits, or malware scans. Use it for new macOS setups, software installations, or when troubleshooting security issues like unauthorized app access or unsigned binaries.

Key Capabilities

  • Detect malware via XProtect by querying the latest definitions and scanning files.
  • Run MRT to remove known threats from the system.
  • Manage TCC permissions to control app access to sensitive data like camera or contacts.
  • Inspect and remove quarantine flags on downloaded files to allow execution.
  • Validate code signing for apps to ensure they are from trusted developers.
  • Perform security audits using system logs to identify potential breaches.

Usage Patterns

Invoke this skill in scripts for automated hardening, e.g., during VM provisioning or CI/CD pipelines for macOS apps. Use it reactively for incident response or proactively in scheduled tasks. For AI agents, call it via function wrappers that handle macOS-specific commands, ensuring elevated privileges with sudo where needed. Pattern: Check security status first, then apply fixes.

Common Commands/API

Use these macOS CLI commands for security tasks. All require admin privileges; check for errors via exit codes.

  • XProtect scan: Use softwareupdate --list to check for updates, then xprotect scan /path/to/file (via internal tools). Example snippet: system("softwareupdate --list"); if (exit_code!= 0) {handle_error("Update check failed");}
  • MRT removal: Run /usr/libexec/MRTConfigData remove to trigger malware removal. Example snippet: system("/usr/libexec/MRTConfigData remove"); print("MRT executed; check logs for results.");
  • TCC permissions: Use tccutil reset <service> <app> to reset or tccutil set <service> <app> allow to grant. Example: tccutil set Camera com.example.app allow for camera access.
  • Quarantine handling: Check with xattr -l /path/to/file and remove via xattr -d com.apple.quarantine /path/to/file. Example snippet: xattr -l /path/to/file; if (grep("com.apple.quarantine")) {system("xattr -d com.apple.quarantine /path/to/file");}
  • Code signing validation: Run codesign -vvv --verify --strict /path/to/app to check signatures. Example: codesign -dvvv /Applications/MyApp.app for detailed verification.
  • Security audit: Query logs with log show --predicate 'subsystem == "com.apple.securityd"' --last 1h. Config format: Use predicates in log command for filtering, e.g., JSON output via --style json.

If API keys are needed (e.g., for third-party security tools), use env vars like $SECURITY_API_KEY in scripts: curl -H "Authorization: Bearer $SECURITY_API_KEY" https://api.example.com/scan.

Integration Notes

Integrate by wrapping commands in AI agent functions, e.g., use Python's subprocess to call tccutil. For automation, combine with tools like Jamf or MDM APIs. Ensure the agent runs with sufficient privileges; use osascript for user prompts if needed. Config files like /etc/authorization can be edited for TCC policies, but back them up first. Test integrations in a sandboxed macOS environment to avoid disruptions.

Error Handling

Always check command exit codes; for example, if codesign returns non-zero, log the error and suggest re-signing. Parse outputs for specific strings, e.g., if tccutil fails with "Access denied", prompt for admin elevation. Use try-catch in scripts:

try {
  system("tccutil set Camera com.example.app allow");
} catch (e) {
  if (e.includes("permission")) { system("sudo -u root tccutil set Camera com.example.app allow"); }
}

Common errors: Permission issues (use sudo), file not found (verify paths), or outdated XProtect (run updates first). Log all errors to /var/log/securityd.log for auditing.

Concrete Usage Examples

  1. Malware Scan and Removal: To scan a suspicious file and remove threats:

- First, update XProtect: softwareupdate --install --all. - Then run MRT: system("/usr/libexec/MRTConfigData remove"). - Verify: log show --predicate 'eventMessage contains "MRT"'. This ensures the system is cleaned; handle errors by checking if MRT is available.

  1. TCC Permission Management for an App: To grant camera access to a new app:

- Check current status: tccutil reset Camera com.example.app. - Grant permission: tccutil set Camera com.example.app allow. - Test: Run the app and confirm access. If errors occur, use sudo and log the action for auditing.

Graph Relationships

  • Related to: macos-filesystem (for handling quarantined files)
  • Depends on: macos-networking (for security audits involving network logs)
  • Conflicts with: none
  • Used by: general-security (as a subsystem for macOS-specific hardening)

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.28%
按下载量换算71

Claude

30.28%
按下载量换算62

Cursor

19.45%
按下载量换算40

Gemini CLI

8.66%
按下载量换算18

安全审计

Gen Agent Trust Hub

未通过

Socket

未通过

Snyk

可疑

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/alphaonedev/openclaw-graph --skill macos-security 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills