Skip to main content

Codex CLI Integration

Rafter provides two skills for Codex CLI that add remote code analysis and local security.

Skills Architecture

Backend Skill (rafter)

API-based security scanning
  • Trigger remote SAST/SCA scans
  • Retrieve scan results
  • Check usage quota
  • Read-only operations

Local Security Toolkit (rafter-agent-security)

Local security operations
  • Secret scanning in files
  • Policy enforcement
  • Extension auditing
  • Audit logging

Setup

1. Install Rafter CLI

2. Initialize Local Security

Rafter detects Codex CLI via ~/.codex and installs skills to ~/.agents/skills/rafter/. To install all detected integrations at once:

3. Restart Codex CLI

Restart Codex CLI to load the newly installed skills.

Skill Location

After initialization:

Usage

Backend Scanning

Trigger a security scan of your repository:
Or use the rafter scan alias:
Backend scanning requires a Rafter API key. Set it via export RAFTER_API_KEY="your-key" or pass --api-key.

Local Security

These commands work locally without an API key:
Note: rafter agent scan still works but is deprecated — it will be removed in a future major version.

Skill Auditing

Treat third-party extension ecosystems as hostile by default. There have been reports of malware distributed via skill marketplaces, using social-engineering instructions to run obfuscated shell commands.
Before installing any third-party skill, audit it:
This analyzes 12 security dimensions: trust/attribution, network security, command execution, file system access, credential handling, input validation, data exfiltration, obfuscation, scope alignment, error handling, dependencies, and environment manipulation.

Configuration

Risk Levels

View Configuration

Monitoring

View Agent Activity

Troubleshooting

  1. Verify skills are installed: ls ~/.agents/skills/rafter/
  2. Re-run: rafter agent init --with-codex
  3. Restart Codex CLI
Ensure ~/.codex exists, then run: rafter agent init --with-codex

What’s Next?

Secret Scanning

21+ secret patterns detected

Command Execution

Risk-assessed command validation

Command Reference

Full CLI reference