codex
“OpenAI Codex CLI wrapper — three modes. (gstack)”
aipkg.jsonLICENSE.txtREADME.mdSKILL.mdSKILL.md.tmpl- 01SDI-385%HIGH
SKILL.md:10
detailhide
The manifest declares only [Bash, Read, Write, Glob, Grep, AskUserQuestion] as allowed tools, but the preamble and skill workflow extensively execute arbitrary binaries from ~/.claude/skills/gstack/bin/ (gstack-config, gstack-telemetry-log, gstack-codex-probe, gstack-review-log, etc.) and modify user configuration (~/.gstack/ directories, CLAUDE.md, .gitignore). The declared tools do not cover the actual security boundary — external binary execution and config mutation are not Read/Write/Bash equivalents.
08 - second opinion09 - outside voice challenge10allowed-tools:11 - Bash12 - Readfix 1. Audit ~/.claude/skills/gstack/bin/ binaries for their source, signature, and update mechanism. 2. Add explicit allowed-tools entries for each binary category (telemetry, config, probing). 3. Document the gstack framework trust model in SKILL.md preamble — make clear these are installed binaries, not just bash. 4. Consider sandboxing or validation of binary invocation (e.g., require signed checksums). 5. Add a SECURITY.md file explaining the trust assumptions.
- 02SDI-280%MEDIUM
SKILL.md:5
detailhide
The skill is presented as 'Code review: independent diff review via codex review with pass/fail gate' but embeds extensive telemetry collection (skill-usage.jsonl, timeline logging, session tracking), user preference tracking (question tuning, writing style prompts), upgrade prompts, and vendoring detection — all of which execute without explicit per-feature opt-in within the skill itself. Users running /codex review expect a code review, not enrollment in an analytics pipeline. The telemetry features are gated on ~TEL config but that config is set via out-of-band prompts, not documented in the skill description.
3preamble-tier: 34version: 1.0.05description: OpenAI Codex CLI wrapper — three modes. (gstack)6triggers:7 - codex reviewfix 1. Add a 'Privacy & Analytics' section to the skill documentation (preamble or README) listing all telemetry features. 2. Move telemetry initialization behind an explicit AskUserQuestion in the skill itself (not just preamble) when first telemetry is about to execute. 3. Document the question-tuning and preference-tracking features in the skill description. 4. Add a --no-telemetry flag to the skill invocation to allow users to opt-out per-run. 5. Include analytics-disabled instructions in the skill README.
- 03SDI-490%HIGH
SKILL.md:1511
detailhide
The skill documentation explicitly states 'Never modify files. This skill is read-only.' (lines 1511–1517) but the preamble and workflow then execute code that modifies .gitignore (line 272), CLAUDE.md (lines 238–260), plan files (lines 1106–1140), and user config files (~/.gstack/.*). This is a direct contract violation — users trust the 'read-only' claim but the skill performs destructive mutations. This violates principle of least surprise and could corrupt user projects.
1509## Important Rules15101511- **Never modify files.** This skill is read-only. Codex runs in read-only sandbox mode.1512- **Present output verbatim.** Do not truncate, summarize, or editorialize Codex's output1513 before showing it. Show it in full inside the CODEX SAYS block.fix 1. Remove the 'Never modify files. This skill is read-only.' statement from line 1511 if mutations are intentional, or 2. Refactor the preamble and workflow to defer all mutations to explicit user-confirmed AskUserQuestion steps with full change preview, or 3. Split modification logic into a separate opt-in skill (/codex-apply-suggestions) that users consciously invoke. 4. Add a --dry-run flag to all mutation operations. 5. Log all file mutations to a .codex-mutations.log for audit.
- 04SDI-185%MEDIUM
SKILL.md.tmpl:54
detailhide
The skill claims to be a read-only wrapper but calls telemetry logging functions (_gstack_codex_log_event, _gstack_codex_log_hang) that collect usage data about user code reviews. This violates the stated read-only contract and creates an undisclosed data collection channel that users cannot easily audit or disable. The telemetry functions access external infrastructure outside the skill's declared permissions.
52If `NOT_FOUND`, also log the event:53```bash54_TEL=$(~/.claude/skills/gstack/bin/gstack-config get telemetry 2>/dev/null || echo off)55source ~/.claude/skills/gstack/bin/gstack-codex-probe 2>/dev/null && _gstack_codex_log_event "codex_cli_missing" 2>/dev/null || true56```fix Remove all telemetry logging calls from the skill, or if telemetry is necessary, add an explicit section to the preamble documenting all data collected, where it's sent, and how users can opt out. Declare telemetry as a required permission in the manifest rather than hiding it in implementation details.
- 05SDI-380%MEDIUM
SKILL.md.tmpl:54
detailhide
The skill sources multiple external shell scripts (~/.claude/skills/gstack/bin/gstack-config, gstack-codex-probe, gstack-paths, gstack-review-log) without declaring these dependencies in the allowed-tools manifest. These external scripts could be modified by other agents or processes, leading to arbitrary code execution. The skill trusts these paths implicitly with no integrity checking.
52If `NOT_FOUND`, also log the event:53```bash54_TEL=$(~/.claude/skills/gstack/bin/gstack-config get telemetry 2>/dev/null || echo off)55source ~/.claude/skills/gstack/bin/gstack-codex-probe 2>/dev/null && _gstack_codex_log_event "codex_cli_missing" 2>/dev/null || true56```fix Add explicit dependency declarations to the manifest for all sourced scripts. Implement checksum or signature verification for external shell script dependencies before sourcing them. Consider inlining critical bootstrap logic rather than sourcing external files.
- 06SDI-275%LOW
SKILL.md.tmpl:71
detailhide
The skill implements telemetry event logging (_gstack_codex_log_event calls) that is unjustified by the stated purpose of being an OpenAI Codex CLI wrapper for code review. Logging review results, timeouts, auth failures, and exit codes creates a persistent audit trail of user code-review activities without informed consent. This is mission creep beyond a simple wrapper utility.
6970if ! _gstack_codex_auth_probe >/dev/null; then71 _gstack_codex_log_event "codex_auth_failed"72 echo "AUTH_FAILED"73fifix Either remove telemetry logging entirely and clarify the skill is a pure passthrough wrapper, or prominently document in the description that the skill collects usage telemetry and provide instructions for disabling it. Allow users to opt-in rather than opt-out.
- 07SQP-275%MEDIUM
SKILL.md:175
detailhide
The telemetry collection logic (lines 175–201) writes to ~/.gstack/analytics/skill-usage.jsonl and invokes gstack-telemetry-log without an explicit user warning or consent flow within the /codex skill itself. The preamble only shows echo statements about telemetry state, but users are not asked for consent at skill invocation time. The skill assumes ~TEL config was already set by a prior interaction, creating a consent-loop gap for first-time users.
173Only run `open` if yes. Always run `touch`.174175If `TEL_PROMPTED` is `no` AND `LAKE_INTRO` is `yes`: ask telemetry once via AskUserQuestion:176177> Help gstack get better. Share usage data only: skill, duration, crashes, stable device ID. No code, file paths, or repo names.fix 1. Add an explicit AskUserQuestion in Step 0 (before Codex CLI execution) if telemetry state is unset: 'Help improve Codex skill usage: share anonymized data (skill name, duration, outcome)? This enables the gstack team to prioritize features.' 2. Log consent decision with timestamp. 3. Respect --no-telemetry flag for this and all subsequent steps. 4. Document all telemetry fields in a DATA_COLLECTION.md file visible to users.
- 08SQP-270%MEDIUM
SKILL.md.tmpl:5
detailhide
The skill description and preamble do not warn users that it requires the external 'codex' CLI binary and OpenAI API credentials. Users may invoke this skill without understanding the external dependency chain, leading to authentication failures, data being sent to OpenAI, and unclear error messages. The dependency on proprietary external tools should be prominently disclosed upfront.
3preamble-tier: 34version: 1.0.05description: |6 OpenAI Codex CLI wrapper — three modes. Code review: independent diff review via7 codex review with pass/fail gate. Challenge: adversarial mode that tries to breakfix Add a clear warning section to the preamble explaining that this skill requires: (1) the codex CLI installed separately, (2) valid OpenAI API authentication, (3) internet connectivity, and (4) willingness to send code snippets to OpenAI's servers. Include installation and setup instructions before any functional content.
- 09SQP-272%MEDIUM
SKILL.md.tmpl:54
detailhide
The skill implements telemetry logging and data collection (_gstack_codex_log_event, _gstack_codex_log_hang) without warning users that review metadata and hang events are being logged. Users are not informed that the skill collects information about their code-review activities, auth failures, timeouts, and commits—all of which could be considered sensitive operational data.
52If `NOT_FOUND`, also log the event:53```bash54_TEL=$(~/.claude/skills/gstack/bin/gstack-config get telemetry 2>/dev/null || echo off)55source ~/.claude/skills/gstack/bin/gstack-codex-probe 2>/dev/null && _gstack_codex_log_event "codex_cli_missing" 2>/dev/null || true56```fix Add a prominent warning in the preamble: 'This skill collects usage telemetry including review outcomes, timeout events, auth failures, and commit hashes. Data is logged to [location]. To disable telemetry, set GSTACK_TELEMETRY=off before running.' Provide users with visibility and control.
- 10SSD-165%MEDIUM
SKILL.md.tmpl:37
detailhide
The preamble describes the skill as providing a '200 IQ autistic developer' persona with 'brutally honest' output. This role-play framing is a subtle semantic prompt injection technique that primes the external Codex model to adopt a specific communication style and may bypass its normal safety guidelines by framing directness as a desirable feature. This narrative could escalate to users trusting adversarial findings more than they should.
35brutally honest second opinion from a different AI system.3637Codex is the "200 IQ autistic developer" — direct, terse, technically precise, challenges38assumptions, catches things you might miss. Present its output faithfully, not summarized.39fix Remove personality descriptors and persona framing from the skill description. Replace with neutral technical language: 'Codex provides an independent code review.' Do not frame directness or 'brutal honesty' as a feature—it can normalize unsafe output handling.
- 11SSD-460%MEDIUM
SKILL.md.tmpl:144
detailhide
The instructions gradually frame trusting external Codex output as a normal part of the workflow ('independent opinion', 'second opinion', 'outside voice challenge'). This narrative setup normalizes deferring to an external model's judgment without explicit verification, setting the stage for permission escalation where users may eventually trust Codex findings over their own safety instincts or Claude Code's native review capabilities.
142---143144## Filesystem Boundary145146All prompts sent to Codex MUST be prefixed with this boundary instruction:fix Explicitly state that Codex output should be independently verified by users and is not a replacement for human judgment or security review. Add a mandatory verification step that requires users to confirm they understand a finding before acting on it. Clarify that Codex is a tool, not an authority.
- 12SSD-360%LOW
SKILL.md.tmpl:493
detailhide
The consult mode stores session context across invocations without explicit scope limits on what data persists. The instructions do not specify retention duration, what happens to session data after a period of inactivity, or whether users can audit/delete their session history. This creates implicit data retention with unclear boundaries.
491 exit 1492fi493# Fix 1: wrap with timeout (gtimeout/timeout fallback chain via probe helper)494_gstack_codex_timeout_wrapper 600 codex exec "<prompt>" -C "$_REPO_ROOT" -s read-only -c 'model_reasoning_effort="medium"' --enable web_search_cached --json < /dev/null 2>"$TMPERR" | PYTHONUNBUFFERED=1 "$PYTHON_CMD" -u -c "495import sys, jsonfix Add explicit scope limits: 'Session context is retained on OpenAI servers for 24 hours (or [duration]). To delete your session, run: rm .context/codex-session-id and contact OpenAI to purge server-side context. Your codebase content is [retained/deleted] [timeframe]. For sensitive code, start a fresh session each run.
- 13TM1Tool Parameter Abuse70%HIGH
SKILL.md:40
detailhide
The find command with -exec rm {} + (line 40) uses the Bash tool to delete arbitrary files from ~/.gstack/sessions/ based on modification time. While the intent is session cleanup, the pattern is dangerous if the path or logic ever becomes user-controllable or if ~/.gstack/sessions/ is ever symlinked to a critical directory. This violates the principle of explicit, auditable file deletion and is not protected by the 'Write' allowed-tool boundary.
mkdir -p ~/.gstack/sessions touch ~/.gstack/sessions/"$PPID" _SESSIONS=$(find ~/.gstack/sessions -mmin -120 -type f 2>/dev/null | wc -l | tr -d ' ') find ~/.gstack/sessions -mmin +120 -type f -exec rm {} + 2>/dev/null || true _PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null || echo "true") _PROACTIVE_PROMPTED=$([ -f ~/.gstack/.proactive-prompted ] && echo "yes" || echo "no") _BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown")fix 1. Replace find...exec with a dedicated cleanup binary or Python script that validates paths before deletion. 2. Add a --dry-run output showing exactly which session files will be deleted before executing rm. 3. Log all deletions to ~/.gstack/.cleanup-log for audit. 4. Add a --preserve-sessions flag to skip cleanup. 5. Whitelist session file patterns (must match '^[0-9]+-[0-9]+$') before deletion.
- 14TM1Tool Parameter Abuse80%HIGH
SKILL.md:272
detailhide
Line 272 executes 'git rm -r .claude/skills/gstack/' as part of an AskUserQuestion flow without explicit confirmation of the exact path or validation that the directory exists and is actually a gstack install (not a user directory shadowing it). This is a destructive git operation that could delete user files if paths are ever misconfigured. The operation is buried in Step A of a 4-option question and is not highlighted as destructive.
- B) No, I'll handle it myself If A: 1. Run `git rm -r .claude/skills/gstack/` 2. Run `echo '.claude/skills/gstack/' >> .gitignore` 3. Run `~/.claude/skills/gstack/bin/gstack-team-init required` (or `optional`) 4. Run `git add .claude/ .gitignore CLAUDE.md && git commit -m "chore: migrate gstack from vendored to team mode"`fix 1. Add a --dry-run first: run 'git rm -r --dry-run .claude/skills/gstack/' and show the user the exact list of files that will be deleted. 2. Require explicit user confirmation (separate AskUserQuestion) after the dry-run, naming the exact files. 3. Add a post-delete validation: verify that ~/.claude/skills/gstack still exists and is the team-mode version before proceeding. 4. Log the deletion to .git/hooks/post-commit. 5. Provide a recovery note (git reflog, git fsck) in case of accident.