- loop/prompt-pentest-fix.md: dedicated prompt for pentest fix overnight runs, instructs Claude to run verify-pentest-fixes.sh as final step - loop/loop.sh: automatically runs verification script when all plan tasks are complete (runs for any plan, not just pentest) Usage: PROMPT_FILE=loop/prompt-pentest-fix.md caffeinate -i ./loop/loop.sh Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2.4 KiB
2.4 KiB
You are remediating security vulnerabilities found during a penetration test of Archipelago. Read these files first:
loop/plan.md— Your fix checklist (mark items- [x]as you complete them)CLAUDE.md— Archy project conventions, architecture, coding standardsloop/pentest/security-assessment-report.md— Full pentest report with findings and evidence
Architecture Reference
Nginx (port 80) → Rust backend (port 5678) → Podman containers
→ Vue 3 frontend (static files)
→ WebSocket /ws/db
Key backend files:
core/archipelago/src/api/handler.rs— HTTP request routing and middlewarecore/archipelago/src/api/rpc/mod.rs— RPC method dispatch and auth gatingcore/archipelago/src/api/rpc/auth.rs— Login/logout handlerscore/archipelago/src/session.rs— Session store, rate limiter, cookie helperscore/archipelago/src/api/rpc/package.rs— Package install/uninstallcore/archipelago/src/api/rpc/peers.rs— P2P peer messagingcore/archipelago/src/node_message.rs— P2P message storage and validationimage-recipe/configs/nginx-archipelago.conf— Nginx configimage-recipe/configs/archipelago.service— Systemd service
For each task in loop/plan.md:
- Find the first unchecked
- [ ]item - Read the task description and the corresponding finding in the pentest report
- Read the relevant source files before making changes
- Implement the fix following CLAUDE.md conventions
- Deploy to live server:
./scripts/deploy-to-target.sh --live - Verify the specific fix works (curl test against the endpoint)
- Commit:
fix: description(conventional commits) - Mark it done
- [x]inloop/plan.md - Move to the next unchecked task immediately
When all FIX tasks are done:
Run the full verification suite:
./scripts/verify-pentest-fixes.sh
If ALL 26 checks pass (exit code 0):
- Mark VERIFY as
- [x]inloop/plan.md - Commit the final state
If ANY check fails (exit code 1):
- DO NOT mark VERIFY done
- Fix the failing checks, redeploy, and re-run verification
- Only mark VERIFY done when all checks pass
Rules
- Never skip deploy — changes must be live at 192.168.1.228 before marking done
- If a fix breaks something else, fix the regression before moving on
- Test each fix individually before moving to the next
- Do not stop until all tasks are checked and verification passes, or you are rate limited