# 프론트엔드 개발자를 위한 보안 팁

> Clean Markdown view of GeekNews topic #2082. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=2082](https://news.hada.io/topic?id=2082)
- GeekNews Markdown: [https://news.hada.io/topic/2082.md](https://news.hada.io/topic/2082.md)
- Type: news
- Author: [xguru](https://news.hada.io/@xguru)
- Published: 2020-05-15T09:33:45+09:00
- Updated: 2020-05-15T09:33:45+09:00
- Original source: [medium.com](https://medium.com/better-programming/frontend-app-security-439797f57892)
- Points: 10
- Comments: 0

## Topic Body

XSS,Clickjacking,SQL Injection 등을 막기 위한 기본 보안 수칙

1. 사용자 입력 제한 :  DOMPurify, Secure-filters

2. hidden 사용 유의 : ZAP

3. content-security-policy(CSP) 헤더 추가

4. XSS 방지 모드 헤더 추가

5. innerHTML 대신 textContent

6. X-Frame-Options : Deny 추가 - iframe 임베딩 방지

7. 에러 메시지 일반화 : "암호가 틀렸습니다" → "로그인정보가 올바르지 않습니다"

8. Captcha 사용 : 로그인, 가입 및 등록, Contact 등 페이지

9. Referrer-Policy 헤더 또는 a 태그에 rel=noopener 추가

10. Feature-Policy 헤더 추가

11. 정기적으로 npm  audit 실행

12. 프론트 도메인 기능별 분리하기

13. 써드파티 서비스 호출시 유의하기 : CSP 설정 과 스크립트 로딩시 integrity 속성 적용

## Comments



_No public comments on this page._
