aidantwoods / aidantwoods/SecureHeaders

Report missing CSP directives

Open
#55 0 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
PHP
Stars
433
Forks
21
PR merge metrics
No merged PRs in 30d

Description

`base-uri` must be defined to have blocking behaviour.
If `default-src` is not defined many directives will have no fallback (and so will operate as if `*` was specified if they too are undefined by the CSP).
Some key directives that should not be emitted include:
* `default-src` (obviously)
* `object-src`
* `script-src`
* `style-src`

SecureHeaders should emit a warning if any directive that falls back to `default-src` is absent from CSP **and** `default-src` is also absent.

We should also enumerate things that do not fallback to `default-src` (like `base-uri`) and warn about these separately (regardless of whether `default-src` is present).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.