x-content-type
하는 일
이 스킬은 웹 서버가 nosniff 보안 헤더를 보내는지 확인합니다. 흔한 공격에 대비해 웹사이트를 강화하려는 개발자와 IT 담당자를 위한 스킬입니다.
사용하는 경우
- ✓서버 응답에 X-Content-Type-Options 헤더가 없을 때.
- ✓보안 체크리스트가 헤더 강화를 요구할 때.
- ✓파일을 업로드한 뒤 방문자에게 다시 제공할 때.
스킬 링크
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/x-content-type/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“보안 점검에서 X-Content-Type-Options 헤더가 없다고 나옵니다. 추가해 주실 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 모든 응답에 대해 서버나 프레임워크 설정에 헤더를 추가합니다. 그다음 응답 헤더를 확인해 헤더가 있는지 검증합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Set X-Content-Type-Options: nosniff
Browsers that MIME-sniff can be tricked into executing malicious JavaScript uploaded as an image — even if the server sends Content-Type: image/png. nosniff forces the browser to honor the declared type.
Quick Reference
- Set
X-Content-Type-Options: nosniffon all responses — the only valid value isnosniff - Without this header, browsers may execute a JavaScript file disguised as an image if the server serves it with the wrong MIME type
- This header is required by OWASP's security hardening checklist and the Fetch specification
- Pair with correct
Content-Typeheaders on all responses for defense in depth - Takes 5 minutes to configure and has no compatibility issues
Check
Check whether the server sends an X-Content-Type-Options: nosniff header on responses. Verify the header is present on HTML pages, scripts, stylesheets, and API responses.
Fix
Add X-Content-Type-Options: nosniff to all HTTP responses. Configure it at the web server level (Nginx, Apache) or in your application framework, and verify with curl -I https://example.com.
Explain
Explain what MIME type sniffing is, how it can be exploited to execute malicious files, and how X-Content-Type-Options: nosniff prevents this attack.
Code Review
Review server config, headers, forms, and integration points related to Set X-Content-Type-Options: nosniff. Flag exact responses, cookies, or browser behaviors that violate the rule, and verify them against the effective production-like response.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/security/x-content-type
자주 묻는 질문
nosniff는 무엇을 하나요?
브라우저가 파일 형식을 추측하는 대신 선언된 형식을 신뢰하도록 하여, 해로운 파일을 실행할 가능성을 줄입니다.
호환성 문제가 있나요?
스킬에 따르면 이 헤더에는 알려진 호환성 문제가 없으며, 설정에 몇 분이면 충분합니다.
작동하는지 어떻게 확인하나요?
스킬은 curl 요청으로 응답 헤더를 확인할 것을 제안합니다.
상세 정보
작성자의 원본 설명
Use when auditing HTTP response headers on any web server or CDN for security hardening.
인기도
- GitHub 스타
- 75k
- 순위
- #3090
- 라이선스
- MIT
- 업데이트
- 2026. 10. 31.
댓글
- …
이 저장소의 다른 스킬
frontendchecklist
75k명령줄 도구를 사용해 380개가 넘는 규칙으로 프런트엔드 코드와 실시간 페이지를 접근성, 속도, SEO, 보안 측면에서 점검합니다.
frontend-checklist-global
75kFront-End Checklist의 386개 규칙 전체로 프런트엔드 프로젝트를 감사하고, 발견한 문제마다 구체적인 해결 방법을 제시합니다.
404-page
75k없는 페이지 화면에 도움이 되는 링크가 있고 실제 404 상태 코드를 반환하는지 확인해, 길을 잃은 방문자를 돕습니다.
about-page
75k사이트를 운영하는 사람을 설명하는 명확한 소개 페이지가 있는지 검토해, 방문자와 검색 엔진의 신뢰를 높입니다.