← MCP server and skill grades

agentops

boshu2/agentops

D
Type
Plugin
Scanned
Nov 17, 2026
Version
596942dd0c97
Files read
2508

AgentOps is a set of workflow skills, safety hooks, and an optional command-line tool that help AI coding assistants like Claude Code, Codex, and Cursor plan, test, and review software. The biggest risk is running its security scanner or command-line checks on untrusted projects or programs, which can execute untrusted code directly on your computer without a sandbox or overwrite and expose files outside the project folder.

What it can reach

Files
Reads and modifies project files, local session transcripts, and workspace tracking folders, as well as skill links, settings, and logs inside your home folder's AI assistant directories (such as ~/.claude, ~/.codex, ~/.agents, and ~/.cursor).
Shell commands
Runs local terminal commands, Git, Python helpers, project test and check scripts, headless AI coding tools (claude, codex, agy), and target programs inspected by its security and audit tools.
Network
Connects to AI model providers when running headless coding agents, downloads release archives from GitHub during optional installation, and sends health-check requests when online diagnostic checks are run.
Secrets
Uses existing AI assistant logins and API keys (such as ANTHROPIC_API_KEY and ~/.codex/auth.json) when launching background agents or scans, copies Codex login files to temporary folders during evaluations, and reads GitHub tokens in the optional Windows installer.
System
Installs hook scripts in Claude Code to check command and file-editing calls before they run, and inspects macOS LaunchAgent background-service files during maintenance checks.

Findings

2 high6 medium14 low
  1. HighStatic binary scan invokes ldd, enabling code execution from untrusted ELF binaries

    skills/security/scripts/security_suite.py:147

    When the security skill runs security_suite.py collect-static (or run) on Linux, _collect_static invokes ldd on the target binary to list linked libraries. On Linux systems, ldd works by invoking the ELF binary's dynamic linker (PT_INTERP); a crafted ELF executable specifying a malicious interpreter can execute arbitrary code on the user's machine during what is presented as non-executing static analysis. The same script is mirrored at plugin/skills/security/scripts/security_suite.py.

    Fix: Replace ldd with a non-executing ELF header reader such as readelf -d or objdump -p.

  2. HighBinary security suite runs target executables unsandboxed on the host and exposes environment secrets

    skills/security/scripts/security_suite.py:490

    security_suite.py runs target binaries directly on the host with no OS, container, filesystem, or network isolation. _collect_dynamic creates an ordinary directory named dynamic/sandbox and only overrides HOME and TMPDIR, while labeling the run a sandbox in its reports. Furthermore, _collect_contract (_probe_help) executes the binary and recursively discovered subcommand tokens in the caller's real working directory with the full inherited os.environ (exposing API keys, cloud tokens, and the real HOME). The same script is mirrored at plugin/skills/security/scripts/security_suite.py.

    Fix: Require an enforced container or OS sandbox (such as docker run --rm --network none, bwrap, or sandbox-exec, matching the ergonomics skill) before running target binaries, and scrub environment variables and working directories in _probe_help.

  3. Mediumao doctor --fix copies untrusted repo skills/ globally into ~/.claude/skills and dereferences symlinks

    cli/internal/doctor/fix_skills.go:277

    When none of the four checked local skill directories (~/.claude/skills, ~/.codex/skills, ~/.agents/skills, or the Codex native cache) contains a SKILL.md—which is normal when AgentOps was installed via the Claude Code plugin marketplace and ao via Homebrew—running ao doctor --fix in any repository triggers skillsMissingFixer. Unlike other checks that verify insideAgentopsRepo(env.RepoRoot), this fixer blindly copies every file under the current repository's skills/ tree into the user's global ~/.claude/skills folder, preserving executable permissions. Because walkRelFiles does not reject symlinks, os.ReadFile also follows symlinks inside the untrusted repo's skills/ folder and copies arbitrary local files into ~/.claude/skills and .doctor/runs/ backups. An attacker's repository can plant persistent global skills and scripts across all future Claude Code sessions.

    Fix: Verify insideAgentopsRepo(env.RepoRoot) (or require an explicit trusted --skills-source flag) before mirroring skills into ~/.claude/skills, and reject symlinks during directory traversal using os.OpenRoot and de.Type().IsRegular().

  4. Mediumao doctor undo writes and renames arbitrary paths without write_scopes or traversal checks

    cli/internal/doctor/recovery.go:116

    Although ao doctor documents that undo never writes outside write_scopes and never touches .git/** or shell startup files, undoOne never calls EnsureInScope on target (filepath.Join(repoRoot, rec.Path)) or rec.RenameTo. Furthermore, readActionBackup only checks filepath.IsLocal(rec.Path) when rec.BackupPath is empty. An untrusted repository with a committed .doctor/ directory (latest, actions.jsonl, and backups/) can specify rec.Path values like .git/hooks/post-checkout or ../../../.zshrc with executable mode bits; if a user or prompt-injected agent runs ao doctor undo latest, atomicWrite overwrites those arbitrary files on disk.

    Fix: Validate target and rec.RenameTo with EnsureInScope (and reject .git/** and symlinked parent components via os.OpenRoot), and verify .doctor/latest resolves strictly inside <repoRoot>/.doctor/runs/.

  5. MediumDefault read-only ao doctor follows symlinks on .doctor and .gitignore, enabling file disclosure and external writes

    cli/internal/doctor/runartifact.go:316

    Default ao doctor (diagnose) is documented as read-only, yet it calls NewRunArtifact and persistRun on every run without checking Lstat or using os.OpenRoot. First, ensureGitignore reads <repoRoot>/.gitignore via os.ReadFile and replaces it with a regular file containing the original contents plus .doctor/; if an untrusted repository commits .gitignore as a symlink to a sensitive file (such as ../.env or ../../.ssh/id_ed25519), running ao doctor copies the victim's secret file into <repoRoot>/.gitignore. Second, if .doctor or .doctor/scorecard_history.jsonl is a committed symlink pointing outside the repository, NewRunArtifact and AppendScorecardHistory follow it to create directories or append JSON lines to arbitrary user files.

    Fix: Anchor .doctor and .gitignore operations to os.OpenRoot(repoRoot), verify with Lstat that .doctor, its subdirectories, scorecard_history.jsonl, and .gitignore are not symlinks before reading or writing, or avoid writing artifacts during read-only diagnose runs.

  6. MediumSkill integrity health check executes heal.sh from an unverified working directory

    cli/internal/quality/skill_installs.go:330

    CheckSkillIntegrity (used for ao doctor skill-hygiene checks) calls FindHealScript(), which looks up skills/skill-builder/scripts/heal.sh relative to the current working directory before checking the user's installed skill folders, without verifying that the working directory is a trusted AgentOps checkout. If a user or agent runs that health check inside a cloned untrusted repository or external PR checkout containing skills/skill-builder/scripts/heal.sh, CheckSkillIntegrity executes the untrusted script via bash.

    Fix: Remove the unverified relative working-directory check from FindHealScript() and resolve heal.sh only from trusted user-level plugin or skill installation directories.

  7. Mediumao goals export silently executes shell commands from GOALS.md when no baseline snapshot exists

    cli/internal/goals/commands.go:436

    ao goals export is described as Export latest snapshot as JSON (for CI), which reads like a read-only export of stored data. However, when .agents/ao/goals/baselines has no saved snapshot (the normal state on any fresh clone because .agents/ is gitignored), RunExport falls back to loading GOALS.md or GOALS.yaml from the repository and calling Measure, which runs every Check cell under bash -c. Running ao goals export to inspect a freshly cloned untrusted repository executes arbitrary shell commands from its goals file.

    Fix: Return an error in RunExport when no snapshot exists on disk instead of implicitly running Measure, leaving shell execution strictly to ao goals measure.

  8. MediumSkill converter follows symlinks and copies arbitrary host files into converted output

    skills/skill-builder/scripts/converter/convert.sh:585

    When converting a skill package to Codex or Cursor format, convert.sh reads symlinked files under references/ and scripts/ into the generated skill file and runs rsync -a --copy-links on all remaining files and folders without checking that symlink targets stay inside the source skill directory. Converting a third-party skill directory that contains symlinks to sensitive host files (such as ~/.ssh/id_ed25519 or ~/.codex/auth.json) copies those secrets into the output bundle. The same script is mirrored at plugin/skills/skill-builder/scripts/converter/convert.sh.

    Fix: Reject symlinks or use rsync --safe-links and verify all inlined files are regular non-symlink files confined to source_dir.

  9. Lowao doctor --online sends HTTP GET requests to unvalidated URLs from repo .agents/daemon/activation.json

    cli/internal/doctor/fix_bridges.go:255

    When ao doctor --online is run, openclawHealthUnreachableDetector reads base_url from <repoRoot>/.agents/daemon/activation.json and requests base + "/openclaw/v1/health" without checking the URL scheme, restricting the host to loopback, or disabling HTTP redirects. If an untrusted repository includes an activation.json whose base_url ends with ? or # (for example http://127.0.0.1:8080/secret? or http://169.254.169.254/latest/meta-data/#), the /openclaw/v1/health suffix is absorbed into the query or fragment, and up to 240 bytes of any non-ok HTTP 2xx response body are echoed into the finding evidence and saved report.

    Fix: Parse base_url with net/url, require http or https on a loopback address (127.0.0.1, ::1, or localhost) with no userinfo, query, or fragment, and disable cross-host redirects in the HTTP client.

  10. LowInstaller helper skips SHA-256 verification instead of failing closed when hash tools are absent

    scripts/lib/installer-common.sh:320

    In verify_checksum, if neither sha256sum nor shasum is found on PATH, the function prints a warning and returns 0 even when --no-verify was not set. Running an optional installer like scripts/install-bd.sh in a minimal environment lacking both utilities will silently install an unverified download.

    Fix: Return non-zero in verify_checksum when no SHA-256 tool is available unless --no-verify (NO_VERIFY=1) was explicitly passed.

  11. LowSource-checkout codex_exec_guarded helper passes --dangerously-skip-permissions when REVIEWER=agy

    scripts/lib/codex-exec.sh:751

    In the source-checkout helper scripts/lib/codex-exec.sh, selecting REVIEWER=agy ignores CODEX_EXEC_SANDBOX=read-only and unconditionally adds --dangerously-skip-permissions, auto-approving all tool calls (including file writes) in the workspace. While this library is not shipped in installed plugins and skills/agy-native/SKILL.md discloses the behavior, prompt injection in reviewed code during a source-checkout REVIEWER=agy run can modify workspace files.

    Fix: Omit --dangerously-skip-permissions when CODEX_EXEC_SANDBOX is read-only, using AGY's default posture where non-read actions are denied.

  12. LowPrototype orchestration selector probes hardcoded SSH host bushido by default

    lib/orchestrate-select.sh:19

    If a contributor or user runs the prototype script lib/orchestrate-select.sh without setting AGENTOPS_NTM_HOST or AGENTOPS_ORCH, it attempts an outbound SSH connection to the hardcoded host name bushido. On a shared local network where bushido resolves via local DNS search domains or mDNS, this leaks the user's SSH username and offered public keys to an untrusted host.

    Fix: Default AGENTOPS_NTM_HOST to empty and only probe NTM over SSH when the user explicitly configures a host.

  13. Lowao gate check executes matching scripts in untrusted foreign repositories

    cli/internal/gates/scriptrunner.go:144

    ao quick-start and ao robot-docs advise running ao gate check for deterministic repository checks. Although IsAgentOpsRepo was added to skip AgentOps-internal script checks in foreign repositories, ScriptRunner.Run only checks IsAgentOpsRepo when the script file is absent on disk (and IsAgentOpsRepo itself only checks for module github.com/boshu2/agentops/cli in cli/go.mod). An untrusted repository being triaged or reviewed can include a file at an always-run gate path such as scripts/check-git-config-hygiene.sh and have ao gate check execute it via bash or python3 even without an executable permission bit.

    Fix: Skip script-backed AgentOps checks in foreign repositories before checking or executing workspace files, and require explicit opt-in before running repository scripts.

  14. LowPreToolUse guard hooks create sentinel files in predictable shared /tmp directories

    hooks/guards/hooks/policy-dispatch.sh:151

    When TMPDIR is unset (the default on Linux), policy-dispatch.sh (as well as the opt-in installed-skill-edit-guard.sh and read-budget-guard.sh hooks, plus their copies under plugin/hooks/) writes session sentinels under fixed /tmp paths such as /tmp/aop-policy-dispatch using : > "$sentinel". On a multi-user Linux host, another local user can pre-create /tmp/aop-policy-dispatch as a world-writable non-sticky directory (which bypasses fs.protected_symlinks) and place symlinks inside it to truncate files owned by the user when a policy block triggers.

    Fix: Place hook sentinel directories inside a private per-user directory such as ${AGENTOPS_HOME:-$HOME/.agents/ao}/run with mode 0700, or verify directory ownership (-O) and non-symlink status before writing.

  15. LowGit option injection in ao gate check range scope

    cli/internal/gates/changedfiles.go:222

    ValidateRangeSpec checks only that a range: scope argument is non-empty and contains .., without rejecting a leading -. Passing --scope "range:--output=/path/a/../target" forwards --output=... as an option to git diff, causing Git to create or overwrite /path/target even under ao gate check --dry-run. This matters if an agent is granted narrow permission to run ao gate check while direct file writes are disallowed.

    Fix: Reject range specs starting with - in ValidateRangeSpec and pass --end-of-options before the revision range in git diff.

  16. LowPreToolUse policy hooks rely on syntactic regexes that can be bypassed

    hooks/guards/policies/policies.json:15

    The README states that the Claude Code plugin includes PreToolUse guards for private _beads tracker data in commits, manual provenance-ledger edits, and installed-skill overwrites. However, policies.json only matches specific literal command shapes: commands like git add -A or git add . still stage _beads/, and an agent with Bash access can use python3 -c or a >| redirect to write a waiver into ~/.agents/ao/policy-waivers (disabling any deny policy) or modify protected files directly.

    Fix: Back up syntactic PreToolUse guards with OS or Git controls—such as .gitignore or a git pre-commit check for _beads/ and restrictive ownership on ~/.agents/ao/policy-waivers—and note these limits in the main README.

  17. LowCodex bulk-reader role declares read-only sandbox that Codex ignores

    skills/orchestrate/agents/bulk-reader.toml:6

    The bulk-reader Codex role sets sandbox_mode = "read-only", but Codex ignores sandbox_mode in custom agent files and inherits the parent session's sandbox (typically workspace-write during coding). Because bulk-reader runs on a low-effort model (gpt-5.6-luna at low reasoning effort) and is instructed to use shell sed commands to slice large files, prompt injection inside an untrusted large file has an easier path to trigger file writes or shell commands inherited from a write-enabled parent.

    Fix: Remove shell-based reading instructions from bulk-reader so it relies strictly on file-read tools, and warn users at invocation time when delegating untrusted files from a write-enabled parent session.

  18. LowDefault PreToolUse guards can be bypassed via shell redirections, scripts, or policy waivers

    plugin/hooks/guards/policies/policies.json:57

    The README states that the Claude Code plugin includes PreToolUse guards against private _beads tracker commits and installed-skill overwrites, which could otherwise persist malicious instructions across sessions. However, core.skills:copy-into-installed only matches cp, rsync, and mv commands rather than shell redirects, tee, or scripts, core.git:add-beads-ledger does not catch git add -A, and core.policy:self-waive leaves interpreter one-liners and noclobber redirects (>|) able to write waivers to .agents/ao/policy-waivers that disable all deny policies.

    Fix: Treat PreToolUse regex guards as mistake-prevention aids rather than a security boundary, extend core.skills:copy-into-installed to cover shell redirects and tee, and move policy waivers out of agent-writable paths.

  19. LowSecurity suite runbook uses predictable /tmp output directories when TMPDIR is unset

    plugin/skills/security/references/security-suite-runbook.md:54

    The runbook instructs the agent to pass fixed paths under ${TMPDIR:-/tmp}/security-suite/ as --out-dir, and collect-dynamic redirects the inspected binary's HOME, TMPDIR, and working directory into that folder. On multi-user Linux systems where TMPDIR is unset, another local user could pre-create /tmp/security-suite to read scan artifacts or tamper with files in the scratch directory.

    Fix: Create a private per-run directory with mktemp -d and pass that path to --out-dir instead of a fixed path under /tmp.

  20. LowRetired Gas City agent pack roles default to unrestricted or auto-edit permissions

    packs/agentops-factory/agents/mayor/agent.toml:10

    The retired Gas City role configs still present in packs/ set permission_mode = "unrestricted" for mayor, refiner, and implementer-claude, and permission_mode = "auto-edit" for the validator role. In particular, the mayor prompt notes that incoming mail bodies are untrusted data, so relying on prompt prohibitions alone with unrestricted tool permissions would expose anyone manually loading these legacy packs to arbitrary command execution on prompt injection.

    Fix: Remove the retired packs/ directory or restrict mayor and validator agent.toml definitions to read-only or command-scoped permission modes.

  21. LowContributor test scripts execute binaries from predictable /tmp paths

    tests/e2e/goals-measure-scenarios.sh:20

    Several developer test scripts use hardcoded executable paths in the world-writable /tmp directory (/tmp/ao-e2e-f2 in tests/e2e/goals-measure-scenarios.sh, /tmp/ao-e2e-f4 in tests/e2e/goals-trace-chain.sh, and /tmp/ao-pg1 in tests/install/test-five-minute-journey.sh). In the two e2e scripts, if /tmp/ao-e2e-f2 or /tmp/ao-e2e-f4 already exists, is executable, and has a timestamp newer than the cli/cmd/ao directory, go build is skipped and the file in /tmp is executed directly. In test-five-minute-journey.sh, go build errors are silenced without set -e before executing /tmp/ao-pg1. On a shared multi-user machine, another local user can pre-create these files to run arbitrary code as a contributor running the tests. Normal plugin users never run these test scripts.

    Fix: Build temporary test binaries inside a private directory created with mktemp -d (or via e2e_factory_ao_bin in tests/lib/e2e-factory.sh) instead of fixed paths under /tmp.

  22. LowSmoke test redirects logs to predictable files in /tmp

    tests/smoke-test.sh:80

    The contributor smoke test redirects command output to fixed filenames directly under /tmp (/tmp/validate-council.log and /tmp/${test_name}.log). On shared multi-user systems without kernel symlink protection on /tmp (such as macOS), another local user can pre-create symlinks at those paths to overwrite files owned by the user running the test suite. Installed plugins do not run this script.

    Fix: Create a private temporary directory with mktemp -d at the start of tests/smoke-test.sh, clean it up on EXIT, and write all log files inside that directory.