백엔드, 데이터 및 보안 더 많은 세부 정보 A2 · 공식 명세 플랫폼: 웹

Content Security Policy

콘텐츠 보안 정책

콘텐츠 보안 정책(CSP)은 브라우저 콘텐츠를 위한 HTTP 규칙입니다. 어떤 파일이 로드될 수 있고 어떤 스크립트가 실행될 수 있는지를 제한합니다.

당신은 이것을 이렇게 부를 수 있습니다 Content Security PolicyCSP브라우저 리소스 정책

작동 방식을 확인하세요

원본 작업 예제콘텐츠 보안 정책

다른 예시

은행 SPA는 `Content-Security-Policy-Report-Only`로 시작하고 인라인 핸들러를 제거합니다. 그 다음 `script-src 'nonce-r4…' 'strict-dynamic'; object-src 'none'; base-uri 'none'; frame-ancestors 'none'`를 적용합니다. 모든 응답에는 새롭고 추측하기 어려운 nonce가 부여됩니다. 샘플링된 위반 보고서에는 고객 URL이 기록되지 않습니다.

주요 부분

  1. 01정책 전달
  2. 02디렉티브 가져오기 및 문서화
  3. 03위반 보고 및 배포

사용할 때

추가 방어 수단으로 테스트된 엄격한 CSP를 사용하세요. 가능하면 nonce 또는 해시를 사용하세요. 변경된 정책을 완전히 적용하기 전에 보고서를 확인하세요.

다음 경우에는 사용하지 마세요

넓은 `*` 또는 `unsafe-inline` 규칙을 강한 보안처럼 다루거나 추측 가능한 nonce를 재사용하지 마세요. CSP는 일반 XSS 방지를 대체하지 못합니다.

코드에서 사용된 이름

Content-Security-Policy response header with nonces/hashes and restrictive directives

출시하기 전에

Check contracts and invariants, authorization, and input limits. Test retries, one-time effects, timeouts, and partial failures. Verify data integrity, compatibility, monitoring, recovery, and rollback.

복사 가능한 요청

Outcome:Complete the task with 콘텐츠 보안 정책 (Content Security Policy)。 User context:은행 SPA는 `Content-Security-Policy-Report-Only`로 시작하고 인라인 핸들러를 제거합니다. 그 다음 `script-src 'nonce-r4…' 'strict-dynamic'; object-src 'none'; base-uri 'none'; frame-ancestors 'none'`를 적용합니다. 모든 응답에는 새롭고 추측하기 어려운 nonce가 부여됩니다. 샘플링된 위반 보고서에는 고객 URL이 기록되지 않습니다. Technical concept or control:콘텐츠 보안 정책 (Content Security Policy)。 Why it fits:추가 방어 수단으로 테스트된 엄격한 CSP를 사용하세요. 가능하면 nonce 또는 해시를 사용하세요. 변경된 정책을 완전히 적용하기 전에 보고서를 확인하세요. Do not use it when:넓은 `*` 또는 `unsafe-inline` 규칙을 강한 보안처럼 다루거나 추측 가능한 nonce를 재사용하지 마세요. CSP는 일반 XSS 방지를 대체하지 못합니다. Engineering requirements: Define inputs, outputs, contracts, and rules that must always hold. Set authorization and input checks. Define failures, timeouts, retries, one-time effects, data moves, and compatibility limits. Operations: Add useful signals and logs that hide sensitive data. Set capacity limits and write an operator guide. Test recovery and rollback. Acceptance criteria: Contract and failure-path tests pass. Data and authorization rules still hold during retries and partial failures. Check performance limits, monitoring, recovery, and rollback. Evidence and limits (evidence boundary):공식 문서라고 해도 초안, 출시 후보, 최종 버전일 수 있어요. 상태와 브라우저나 플랫폼 지원 여부를 꼭 확인하세요. Unknowns to confirm: Where the code runs, data stores, traffic shape, consistency needs, and the security boundary. Also confirm the compatibility period, service goals, and rollback limits.

이 요청을 확인하세요

Review how 콘텐츠 보안 정책 (Content Security Policy) is used now. Definition: 콘텐츠 보안 정책(CSP)은 브라우저 콘텐츠를 위한 HTTP 규칙입니다. 어떤 파일이 로드될 수 있고 어떤 스크립트가 실행될 수 있는지를 제한합니다. Release checks: Check contracts and invariants, authorization, and input limits. Test retries, one-time effects, timeouts, and partial failures. Verify data integrity, compatibility, monitoring, recovery, and rollback. Before changing code, list the evidence, gaps, severity, and the smallest safe fix.

A2
이 용어는 얼마나 공식적인가요?

공식 명세

출판된 공식 규격이 나열된 기술 범위에서 이 용어를 정의해요.

공식 문서라고 해도 초안, 출시 후보, 최종 버전일 수 있어요. 상태와 브라우저나 플랫폼 지원 여부를 꼭 확인하세요.

범위
소스가 포함하는 것만:정규 이름、정의、의미론、구현
문서 상태
초안
선택됨
2026-07-30

증거 출처 및 범위

권위 있는 출처 + 용어 참조 · W3C Web Application Security Working Group · 초안 Content Security Policy Level 3 — Policy framework Policy framework 범위: 정규 이름、정의、의미론、구현 여기 역할: 직접 용어 참조 출처 범위: 정규 이름, 정의, 의미론, 구현 권위 있는 출처 · W3C Web Application Security Working Group · 초안 Content Security Policy Level 3 범위: 정규 이름、정의、의미론、구현 여기 역할: 명시된 범위 안의 권위 출처 범위: 정규 이름, 정의, 의미론, 구현

직접 복사

브라우저가 이것을 복사할 수 없습니다. 아래 요청을 선택하고 직접 복사하세요.