Content Security Policy
load external resources와 연관된 정책
XSS(Cross Site Scripting)공격을 막기 위해 만들어진 정책
아무나 인라인 자바스크립트 및 css를 넣지 못하도록 하는 것
base-uri는 페이지의<base>요소에 나타날 수 있는 URL을 제한합니다.
child-src는 작업자와 삽입된 프레임 콘텐츠에 대한 URL을 나열합니다. 예:child-src https://youtube.com을 사용하면 다른 출처가 아니라 YouTube에서 가져온 동영상을 삽입할 수 있습니다. 지원 중단된frame-src지시문 대신 이 지시문을 사용하세요.
connect-src는 (XHR, WebSockets 및 EventSource를 통해) 연결할 수 있는 출처를 제한합니다.
font-src는 웹 글꼴을 제공할 수 있는 출처를 지정합니다.font-src https://themes.googleusercontent.com을 통해 Google의 웹 글꼴을 사용할 수 있습니다.
form-action은<form>태그에서의 제출을 위해 유효한 엔드포인트를 나열합니다.
frame-ancestors는 현재 페이지를 삽입할 수 있는 소스를 지정합니다. 이 지시문은<frame>,<iframe>,<embed>및<applet>태그에 적용됩니다. 이 지시문은<meta>태그에서 사용할 수 없고 HTML 이외의 리소스에만 적용됩니다.
frame-src는 지원 중단되었습니다.child-src를 대신 사용하세요.
img-src는 이미지를 로드할 수 있는 출처를 정의합니다.
media-src는 동영상과 오디오를 제공하도록 허용되는 출처를 제한합니다.
object-src는 플래시와 기타 플러그인에 대한 제어를 허용합니다.
plugin-types는 페이지가 호출할 수 있는 플러그인의 종류를 제한합니다.
report-uri은 콘텐츠 보안 정책 위반 시 브라우저가 보고서를 보낼 URL을 지정합니다.<meta>태그에서는 이 지시문을 사용할 수 없습니다.
style-src는script-src에서 스타일시트에 해당합니다.
upgrade-insecure-requests는 사용자 에이전트에 URL 구성표를 다시 작성하여 HTTP를 HTTPS로 변경하도록 지시합니다. 이 지시문은 다시 작성해야 할 이전 URL이 많은 웹사이트를 위한 것입니다.
data url
Content Security Policy "data" not working for base64 Images in Chrome 28
Thanks for contributing an answer to Stack Overflow! Please be sure to answer the question. Provide details and share your research! Asking for help, clarification, or responding to other answers. Making statements based on opinion; back them up with references or personal experience. To learn more, see our tips on writing great answers.
https://stackoverflow.com/questions/18447970/content-security-policy-data-not-working-for-base64-images-in-chrome-28
official
CSP: style-src
The HTTP Content-Security-Policy (CSP) style-src directive specifies valid sources for stylesheets.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src
checker
CSP Evaluator
CSP Evaluator allows developers and security experts to check if a Content Security Policy (CSP) serves as a strong mitigation against cross-site scripting attacks. It assists with the process of reviewing CSP policies, which is usually a manual task, and helps identify subtle CSP bypasses which undermine the value of a policy.
https://csp-evaluator.withgoogle.com/
콘텐츠 보안 정책 | Web | Google Developers
웹의 보안 모델은 에 근간을 두고 있습니다. https://mybank.com의 코드는 https://mybank.com의 데이터에만 액세스 권한이 있으며 https://evil.example.com 에는 액세스 권한이 없습니다. 각 출처는 나머지 웹과 격리되며, 빌드하여 재생할 수 있는 안전한 샌드박스를 개발자에게 제공합니다. 이론상 완벽할 정도로 훌륭합니다. 실제로는 공격자가 영리하게 그 시스템을 파괴했습니다.
https://developers.google.com/web/fundamentals/security/csp/?hl=ko

CSP(Content Security Policy): 콘텐츠 보안 정책
https://developer.mozilla.org/ko/docs/Web/HTTP/CSP웹사이트에서 XSS(Cross Site Scriptin...
https://m.blog.naver.com/01075970528/221790130199

CSP 보안설정
콘텐츠 보안 정책 (CSP) CSP (Content-Security-Policy) : 이 정책은 Mozilla가 개발 한 표준으로, 실행 시점 인 브라우저에서 XSS (Cross Site Scripting) 공격을 막는 것을 목표로합니다. CSP는 인라인 스크립트..
https://simjaejin.tistory.com/31


Seonglae Cho