stack-trace-exposure
하는 일
이 스킬은 서버 코드와 API 응답의 오류 처리를 검토해, 상세한 오류 정보가 사용자에게 보이지 않고 비공개로 기록되도록 합니다. 앱에서 공격자가 알아낼 수 있는 정보를 줄이려는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓API나 서버 코드의 오류 처리를 보안 관점에서 검토해 달라고 요청할 때.
- ✓운영 환경의 오류 응답에 스택 트레이스, 파일 경로, 라이브러리 정보가 포함되어 있을 때.
- ✓모든 경로를 같은 방식으로 처리하는 중앙 오류 핸들러를 만들고 싶을 때.
스킬 링크
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/stack-trace-exposure/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“문제가 생기면 제 API가 전체 오류 스택을 브라우저로 보냅니다. 안전한 메시지를 보여 주고 상세 내용은 비공개로 기록하도록 바꿔 주실 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 원시 오류 객체, 스택 트레이스, 내부 경로가 클라이언트로 전송되는 곳을 찾습니다. 서버에 전체 세부 정보를 기록하고 일반적인 메시지를 반환하는 중앙 오류 핸들러를 추가하며, 사용자의 신고와 로그를 맞춰 볼 수 있도록 상관관계 ID를 포함합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 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
자주 묻는 질문
스택 트레이스는 왜 위험한가요?
스킬에 따르면 파일 경로, 함수 이름, 라이브러리 버전이 드러나 공격자가 알려진 취약점을 찾는 데 쓸 수 있습니다.
상관관계 ID란 무엇인가요?
스킬은 지원팀이 방문자의 오류를 서버 로그와 맞춰 볼 수 있도록 하는 참조 코드로 이를 제안합니다.
OWASP 지침도 포함하나요?
스킬은 로깅과 모니터링 위험을 이유로 OWASP를 언급하지만, 점검은 응답에 노출되는 내용에 집중합니다.
상세 정보
작성자의 원본 설명
Use when reviewing error handling middleware, API route handlers, or server responses for security-sensitive information disclosure.
인기도
- GitHub 스타
- 75k
- 순위
- #3035
- 라이선스
- MIT
- 업데이트
- 2026. 10. 31.
댓글
- …
이 저장소의 다른 스킬
frontendchecklist
75k명령줄 도구를 사용해 380개가 넘는 규칙으로 프런트엔드 코드와 실시간 페이지를 접근성, 속도, SEO, 보안 측면에서 점검합니다.
frontend-checklist-global
75kFront-End Checklist의 386개 규칙 전체로 프런트엔드 프로젝트를 감사하고, 발견한 문제마다 구체적인 해결 방법을 제시합니다.
404-page
75k없는 페이지 화면에 도움이 되는 링크가 있고 실제 404 상태 코드를 반환하는지 확인해, 길을 잃은 방문자를 돕습니다.
about-page
75k사이트를 운영하는 사람을 설명하는 명확한 소개 페이지가 있는지 검토해, 방문자와 검색 엔진의 신뢰를 높입니다.