# comfy-org/comfy-openjutsu — AlpLab Radar Static Code Audit

- Ring: `trial`
- Category: `media`
- Overall score: `3.6/5`
- Implementation check: `verified`
- Maturity: `early`
- Audited commit: `70ec62df0eda` (read-only; nothing from the repository was executed)
- Reviewed at: 2026-11-30T12:43:25Z
- Repository: https://github.com/comfy-org/comfy-openjutsu
- Radar entry: https://radar.alplab.co/#repo/comfy-org/comfy-openjutsu
- License: `MIT`
- Tags: `comfyui`, `video`, `character-swap`, `nextjs`, `image-editing`, `workflow`

## Summary

Next.js web app that swaps the person in a video clip for a character from one image by filling and submitting a MiniMax H3 character-swap workflow to a Comfy Developer Platform deployment

## Implementation Check

Code implements exactly what the README documents: lib/swap.ts binds workflows/swap.api.json at the node ids the README names (30, 9, trim, 31, 801, anchor_image/anchor_fit, save at 809); first-frame anchoring via GPT Image is in lib/anchor.ts; test/swap.test.ts asserts those bindings against the real template JSON

## When to Use

Reach for it when you already run (or will pay for) a Comfy Developer Platform deployment with the pinned MiniMax H3/SAM 3.1 models and want a ready UI for one-shot character swap; skip it for anything else — it does only this job and is inert without the deployment, API key and credits

## Sub-scores

| Dimension | Score |
|---|---|
| quality | 4.5/5 |
| usability | 3.5/5 |
| reliability | 3.0/5 |
| security | 4.0/5 |
| integration | 3.0/5 |

## Code Evidence

lib/swap.ts swapWorkflow() mutates a structuredClone of workflows/swap.api.json (video to node 30, character to 9, trim start/duration, 480/768 to node 31, prompt+seed to 801) and deletes the anchor nodes when absent — matching README's node table line for line; test/swap.test.ts binds against the actual template file and covers settings validation (5-15 s, seed, sizes); build/ contains a provenance-documented GPL-3.0 patch to the upstream node pack and pinned HF revisions in build/model-files.md; THIRD_PARTY_NOTICES present; API key read only server-side in lib/comfy.ts, examples proxy is allow-listed via lib/examples.ts exampleFiles set

## Issues Found

No auth on any route — safe only because next dev/start binds to 127.0.0.1 (package.json); upload validation in lib/uploads.ts trusts the client-declared MIME type; /api/jobs/[id] and the output proxy rely on job ids being unguessable; job state lives only in the client (reload loses it, documented)

## Key Risks

Nothing was executed — no CI configured, so the real tests are unproven to pass; requires a paid Comfy Developer Platform deployment, API key and credits, and the README says only a 96 GB GPU configuration was tried; the anchor feature sends the first frame and character image through Comfy Router to GPT Image 2.5 (disclosed); MiniMax H3 Community License excludes US/EU/UK/KR regions per build/model-files.md; single contributor, 2 commits, one day of history

## Reviewed Files

- `README.md`
- `package.json`
- `.env.example`
- `.gitignore`
- `next.config.ts`
- `app/layout.tsx`
- `app/page.tsx`
- `app/api/jobs/route.ts`
- `app/api/jobs/[id]/route.ts`
- `app/api/jobs/[id]/outputs/[outputId]/route.ts`
- `app/api/anchor/route.ts`
- `app/api/examples/[file]/route.ts`
- `components/app-runner.tsx`
- `lib/swap.ts`
- `lib/comfy.ts`
- `lib/anchor.ts`
- `lib/frame.ts`
- `lib/uploads.ts`
- `lib/job-error.ts`
- `lib/examples.ts`
- `workflows/swap.api.json`
- `build/model-files.md`
- `build/h3_character_swap.patch`
- `test/swap.test.ts`
- `test/anchor.test.ts`
- `test/job-error.test.ts`
