본문으로 건너뛰기
Skillpedia
보안75k · #3035

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가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/stack-trace-exposure/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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.

repo: thedaviddias/Front-End-Checklist

인기도

GitHub 스타
75k
순위
#3035
라이선스
MIT
업데이트
2026. 10. 31.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬