agentops
- 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
-
HighStatic binary scan invokes ldd, enabling code execution from untrusted ELF binaries
skills/security/scripts/security_suite.py:147
When the
securityskill runssecurity_suite.py collect-static(orrun) on Linux,_collect_staticinvokeslddon the target binary to list linked libraries. On Linux systems,lddworks 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 atplugin/skills/security/scripts/security_suite.py.Fix: Replace
lddwith a non-executing ELF header reader such asreadelf -dorobjdump -p. -
HighBinary security suite runs target executables unsandboxed on the host and exposes environment secrets
skills/security/scripts/security_suite.py:490
security_suite.pyruns target binaries directly on the host with no OS, container, filesystem, or network isolation._collect_dynamiccreates an ordinary directory nameddynamic/sandboxand only overridesHOMEandTMPDIR, while labeling the run asandboxin 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 inheritedos.environ(exposing API keys, cloud tokens, and the realHOME). The same script is mirrored atplugin/skills/security/scripts/security_suite.py.Fix: Require an enforced container or OS sandbox (such as
docker run --rm --network none,bwrap, orsandbox-exec, matching theergonomicsskill) before running target binaries, and scrub environment variables and working directories in_probe_help. -
Medium
ao doctor --fixcopies untrusted reposkills/globally into~/.claude/skillsand dereferences symlinkscli/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 aSKILL.md—which is normal when AgentOps was installed via the Claude Code plugin marketplace andaovia Homebrew—runningao doctor --fixin any repository triggersskillsMissingFixer. Unlike other checks that verifyinsideAgentopsRepo(env.RepoRoot), this fixer blindly copies every file under the current repository'sskills/tree into the user's global~/.claude/skillsfolder, preserving executable permissions. BecausewalkRelFilesdoes not reject symlinks,os.ReadFilealso follows symlinks inside the untrusted repo'sskills/folder and copies arbitrary local files into~/.claude/skillsand.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-sourceflag) before mirroring skills into~/.claude/skills, and reject symlinks during directory traversal usingos.OpenRootandde.Type().IsRegular(). -
Medium
ao doctor undowrites and renames arbitrary paths withoutwrite_scopesor traversal checkscli/internal/doctor/recovery.go:116
Although
ao doctordocuments thatundonever writes outsidewrite_scopesand never touches.git/**or shell startup files,undoOnenever callsEnsureInScopeontarget(filepath.Join(repoRoot, rec.Path)) orrec.RenameTo. Furthermore,readActionBackuponly checksfilepath.IsLocal(rec.Path)whenrec.BackupPathis empty. An untrusted repository with a committed.doctor/directory (latest,actions.jsonl, andbackups/) can specifyrec.Pathvalues like.git/hooks/post-checkoutor../../../.zshrcwith executable mode bits; if a user or prompt-injected agent runsao doctor undo latest,atomicWriteoverwrites those arbitrary files on disk.Fix: Validate
targetandrec.RenameTowithEnsureInScope(and reject.git/**and symlinked parent components viaos.OpenRoot), and verify.doctor/latestresolves strictly inside<repoRoot>/.doctor/runs/. -
MediumDefault read-only
ao doctorfollows symlinks on.doctorand.gitignore, enabling file disclosure and external writescli/internal/doctor/runartifact.go:316
Default
ao doctor(diagnose) is documented as read-only, yet it callsNewRunArtifactandpersistRunon every run without checkingLstator usingos.OpenRoot. First,ensureGitignorereads<repoRoot>/.gitignoreviaos.ReadFileand replaces it with a regular file containing the original contents plus.doctor/; if an untrusted repository commits.gitignoreas a symlink to a sensitive file (such as../.envor../../.ssh/id_ed25519), runningao doctorcopies the victim's secret file into<repoRoot>/.gitignore. Second, if.doctoror.doctor/scorecard_history.jsonlis a committed symlink pointing outside the repository,NewRunArtifactandAppendScorecardHistoryfollow it to create directories or append JSON lines to arbitrary user files.Fix: Anchor
.doctorand.gitignoreoperations toos.OpenRoot(repoRoot), verify withLstatthat.doctor, its subdirectories,scorecard_history.jsonl, and.gitignoreare not symlinks before reading or writing, or avoid writing artifacts during read-onlydiagnoseruns. -
MediumSkill integrity health check executes heal.sh from an unverified working directory
cli/internal/quality/skill_installs.go:330
CheckSkillIntegrity(used forao doctorskill-hygiene checks) callsFindHealScript(), which looks upskills/skill-builder/scripts/heal.shrelative 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 containingskills/skill-builder/scripts/heal.sh,CheckSkillIntegrityexecutes the untrusted script viabash.Fix: Remove the unverified relative working-directory check from
FindHealScript()and resolveheal.shonly from trusted user-level plugin or skill installation directories. -
Mediumao goals export silently executes shell commands from GOALS.md when no baseline snapshot exists
cli/internal/goals/commands.go:436
ao goals exportis described asExport latest snapshot as JSON (for CI), which reads like a read-only export of stored data. However, when.agents/ao/goals/baselineshas no saved snapshot (the normal state on any fresh clone because.agents/is gitignored),RunExportfalls back to loadingGOALS.mdorGOALS.yamlfrom the repository and callingMeasure, which runs everyCheckcell underbash -c. Runningao goals exportto inspect a freshly cloned untrusted repository executes arbitrary shell commands from its goals file.Fix: Return an error in
RunExportwhen no snapshot exists on disk instead of implicitly runningMeasure, leaving shell execution strictly toao goals measure. -
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.shreads symlinked files underreferences/andscripts/into the generated skill file and runsrsync -a --copy-linkson 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_ed25519or~/.codex/auth.json) copies those secrets into the output bundle. The same script is mirrored atplugin/skills/skill-builder/scripts/converter/convert.sh.Fix: Reject symlinks or use
rsync --safe-linksand verify all inlined files are regular non-symlink files confined tosource_dir. -
Low
ao doctor --onlinesends HTTP GET requests to unvalidated URLs from repo.agents/daemon/activation.jsoncli/internal/doctor/fix_bridges.go:255
When
ao doctor --onlineis run,openclawHealthUnreachableDetectorreadsbase_urlfrom<repoRoot>/.agents/daemon/activation.jsonand requestsbase + "/openclaw/v1/health"without checking the URL scheme, restricting the host to loopback, or disabling HTTP redirects. If an untrusted repository includes anactivation.jsonwhosebase_urlends with?or#(for examplehttp://127.0.0.1:8080/secret?orhttp://169.254.169.254/latest/meta-data/#), the/openclaw/v1/healthsuffix is absorbed into the query or fragment, and up to 240 bytes of any non-okHTTP 2xx response body are echoed into the finding evidence and saved report.Fix: Parse
base_urlwithnet/url, requirehttporhttpson a loopback address (127.0.0.1,::1, orlocalhost) with no userinfo, query, or fragment, and disable cross-host redirects in the HTTP client. -
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 neithersha256sumnorshasumis found onPATH, the function prints a warning and returns0even when--no-verifywas not set. Running an optional installer likescripts/install-bd.shin a minimal environment lacking both utilities will silently install an unverified download.Fix: Return non-zero in
verify_checksumwhen no SHA-256 tool is available unless--no-verify(NO_VERIFY=1) was explicitly passed. -
LowSource-checkout
codex_exec_guardedhelper passes--dangerously-skip-permissionswhenREVIEWER=agyIn the source-checkout helper
scripts/lib/codex-exec.sh, selectingREVIEWER=agyignoresCODEX_EXEC_SANDBOX=read-onlyand 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 andskills/agy-native/SKILL.mddiscloses the behavior, prompt injection in reviewed code during a source-checkoutREVIEWER=agyrun can modify workspace files.Fix: Omit
--dangerously-skip-permissionswhenCODEX_EXEC_SANDBOXisread-only, using AGY's default posture where non-read actions are denied. -
LowPrototype orchestration selector probes hardcoded SSH host
bushidoby defaultIf a contributor or user runs the prototype script
lib/orchestrate-select.shwithout settingAGENTOPS_NTM_HOSTorAGENTOPS_ORCH, it attempts an outbound SSH connection to the hardcoded host namebushido. On a shared local network wherebushidoresolves 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_HOSTto empty and only probe NTM over SSH when the user explicitly configures a host. -
Lowao gate check executes matching scripts in untrusted foreign repositories
cli/internal/gates/scriptrunner.go:144
ao quick-startandao robot-docsadvise runningao gate checkfor deterministic repository checks. AlthoughIsAgentOpsRepowas added to skip AgentOps-internal script checks in foreign repositories,ScriptRunner.Runonly checksIsAgentOpsRepowhen the script file is absent on disk (andIsAgentOpsRepoitself only checks formodule github.com/boshu2/agentops/cliincli/go.mod). An untrusted repository being triaged or reviewed can include a file at an always-run gate path such asscripts/check-git-config-hygiene.shand haveao gate checkexecute it viabashorpython3even 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.
-
LowPreToolUse guard hooks create sentinel files in predictable shared /tmp directories
hooks/guards/hooks/policy-dispatch.sh:151
When
TMPDIRis unset (the default on Linux),policy-dispatch.sh(as well as the opt-ininstalled-skill-edit-guard.shandread-budget-guard.shhooks, plus their copies underplugin/hooks/) writes session sentinels under fixed/tmppaths such as/tmp/aop-policy-dispatchusing: > "$sentinel". On a multi-user Linux host, another local user can pre-create/tmp/aop-policy-dispatchas a world-writable non-sticky directory (which bypassesfs.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}/runwith mode0700, or verify directory ownership (-O) and non-symlink status before writing. -
LowGit option injection in ao gate check range scope
cli/internal/gates/changedfiles.go:222
ValidateRangeSpecchecks only that arange:scope argument is non-empty and contains.., without rejecting a leading-. Passing--scope "range:--output=/path/a/../target"forwards--output=...as an option togit diff, causing Git to create or overwrite/path/targeteven underao gate check --dry-run. This matters if an agent is granted narrow permission to runao gate checkwhile direct file writes are disallowed.Fix: Reject range specs starting with
-inValidateRangeSpecand pass--end-of-optionsbefore the revision range ingit diff. -
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
LowSmoke test redirects logs to predictable files in /tmp
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.
