Protocol preauth guard

From XuShuwenn/RedAct · View interactive version

Protocol preauth guard is an AI agent skill from the GitHub repository XuShuwenn/RedAct. Identify and fix pre-authentication message handling that allows side effects in stateful protocol servers.

How to use this skill

Skill file

Pre-Authentication Guarding for Stateful Protocol Handlers

A reusable workflow to locate and fix vulnerabilities where a server processes side-effecting protocol messages before a session is authenticated. Applicable to SSH-like connection layers, RPC frameworks, or any transport with a handshake/authentication phase followed by a stateful message phase.

When to Use

Activate this skill when:

Core Workflow

1) Map the protocol flow and states

2) Trace the unsafe path

3) Choose the guard strategy

4) Implement the guard

5) Preserve normal behavior

6) Expand coverage of message variants

7) Verify

Verification

Use a combination of static and behavioral verification:

Common Pitfalls

Success Criteria

Optional Script Usage

Use the helper script to audit handlers for missing pre-auth guards.

Adjust the patterns to match the project’s naming. This script is language-agnostic and operates on regex matches and proximity.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.