dallbit Prompt & Skill

API Endpoint Security Review

Audits API endpoints for security like Rate Limiting, input validation, and CORS.

Prompt Template

The more specific your inputs, the higher the quality of the output.

{{api_code}}

You are an API security architect. Analyze the security of the following API endpoint code and prioritize improvements. ### API Code app.get('/api/user/:id', (req, res) => { ... }) ### Key Focus - **Rate Limiting**: Defense against brute-force and DoS attacks. - **Input Validation**: Prevention of parameter manipulation. - **CORS Configuration**: Appropriateness of allowed origins. - **Error Messages**: Prevention of information disclosure (e.g., stack traces). - **Security Headers**: Application of HTTP headers like HSTS or CSP. ### Output Format 1. List of identified security flaws. 2. Improvement recommendations by priority (Urgent/Important/Normal). 3. Examples of corrected API security configurations and code.