Skip to content
Back to skills

128 Fn 26 5a526af5

ASecurity

Update ralph-guard.py hooks to validate codex calls same as rp calls.

  • 9 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 11, 2026
developmentpythonbackend

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 128-fn-26_5a526af5 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 128 Fn 26 5a526af5?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 128 Fn 26 5a526af5
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-128-fn-26-5a526af5/badge)](https://www.skillsdirectory.com/skills/tools-only-128-fn-26-5a526af5)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
# fn-2.6 Update ralph-guard.py for codex patterns

## Description

Update ralph-guard.py hooks to validate codex calls same as rp calls.

### Changes needed

1. **Block direct codex calls** (prevent drift):
   ```python
   BLOCKED_CODEX_PATTERNS = [
       r'codex\s+exec\s+(?!.*--sandbox)',      # exec without sandbox
       r'codex\s+review',                       # direct review (should use flowctl)
       r'codex\s+exec\s+.*--last',             # --last flag (use explicit session_id)
   ]
   ```

2. **Allow flowctl wrappers**:
   ```python
   ALLOWED_PATTERNS = [
       r'flowctl\s+codex\s+',    # All flowctl codex commands OK
       r'flowctl\s+rp\s+',       # All flowctl rp commands OK
   ]
   ```

3. **Track codex mode** - Similar state tracking as rp mode

4. **Session enforcement** (optional, warn-only):
   - If receipt exists with `session_id` and codex exec starts new session → warn
   - Block `--last` flag entirely (must use explicit session_id)

### Files to modify

- `plugins/flow-next/scripts/hooks/ralph-guard.py`
## Acceptance
- [ ] Direct `codex exec` without sandbox blocked
- [ ] Direct `codex review` blocked (must use flowctl wrapper)
- [ ] `codex exec --last` blocked (must use explicit session_id)
- [ ] `flowctl codex *` commands allowed
- [ ] Existing `flowctl rp *` validation unchanged
- [ ] State tracking works for codex mode
## Done summary
Updated ralph-guard.py to support codex backend: tracks codex review state, validates receipt writes for both backends, detects verdict from codex output.
## Evidence
- Commits: a0c302a
- Tests: smoke_test.sh
- PRs:

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.