stack-trace-exposure
What it does
This skill reviews error handling in server code and API responses to make sure detailed error information is logged privately and not shown to users. It is for developers who want to reduce what attackers can learn from their app.
When to use it
- ✓When you ask the agent to review error handling in your API or server code for security.
- ✓When production error responses include stack traces, file paths, or library details.
- ✓When you want a central error handler that treats all routes the same way.
Skill link
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/stack-trace-exposure/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“When something breaks, my API sends the full error stack to the browser. Can you change it to show a safe message and log the details privately?”
5 new skills a week. 1 minute to read.
How it works
The agent finds places where raw error objects, stack traces, or internal paths are sent to the client. It adds a central error handler that logs full details on the server and returns a generic message, with a correlation ID to match logs to user reports.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Prevent stack trace exposure in production error responses
Stack traces reveal file paths, function names, library versions, and sometimes database schema or configuration details. An attacker uses this information to identify the exact version of a framework or ORM, look up known CVEs for that version, and craft a targeted exploit. OWASP lists "Security Logging and Monitoring Failures" (A09) as a top-10 risk partly because organisations often expose this information without realising it.
Quick Reference
- Never return raw error objects or stack traces in API responses
- Log full error details server-side; send only a generic message to the client
- Use a central error handler to ensure consistent sanitisation across all routes
- Assign correlation IDs so support teams can match client-visible errors to server logs
Check
Check whether production API error responses include stack traces, file paths, or internal implementation details.
Fix
Implement a central error handler that logs full details server-side and returns only a sanitised, generic error message to the client.
Explain
Explain what information stack traces reveal and how attackers use that information to identify and exploit vulnerabilities.
Code Review
Review error handlers, catch blocks, and API response code. Flag any location where error.stack, error.message (raw), or internal paths are serialised directly into a response body.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/security/stack-trace-exposure
FAQ
Why are stack traces risky?
The skill says they can reveal file paths, function names, and library versions that attackers use to find known weaknesses.
What is a correlation ID?
The skill suggests it as a reference code, so support teams can match a visitor's error to the server logs.
Does this cover the OWASP guidance?
The skill mentions OWASP's logging and monitoring risk as a reason, but its checks focus on what is exposed in responses.
Details
Original description by the author
Use when reviewing error handling middleware, API route handlers, or server responses for security-sensitive information disclosure.
Popularity
- GitHub stars
- 75k
- Ranking position
- #3035
- License
- MIT
- Updated
- 10/31/2026
Comments
- …
More skills from this repository
frontendchecklist
75kChecks frontend code and live pages against 380+ rules for accessibility, speed, SEO and security, using a command-line tool.
frontend-checklist-global
75kAudits a frontend project against all 386 Front-End Checklist rules, and gives a specific fix for each issue found.
404-page
75kChecks that your missing-page screen offers helpful links and returns a real 404 status, to help lost visitors find their way.
about-page
75kReviews whether your site has a clear About page that explains who runs it, to build trust with visitors and search engines.
Similar skills
reverse-engineer-anything
422kHelps your agent look inside shipped apps and packages to explain features, compare versions, or guide a rebuild, using the REA tool.
1password
394kHelps your agent set up the 1Password CLI, sign in, and read or inject secrets without printing their values into chat.
healthcheck
394kHelps your agent audit the computer or server that runs OpenClaw for security risks, such as SSH, firewall, updates, and backups, then suggest safe fixes.