wp-cli-secure-command icon indicating copy to clipboard operation
wp-cli-secure-command copied to clipboard

Implement a command for managing CSP policies

Open igorhrcek opened this issue 3 years ago • 0 comments

Is your feature request related to a problem? Please describe. No

Describe the solution you'd like We should implement a command that will allow us to manage different CSP policies - apply rules to certain policies, such as style-src, font-src, script-src etc.

The user should also be able to get information about what is applied as a policy, like "show me what I set as a script-src" and then to either add or remove addresses from it.

Describe alternatives you've considered None

Additional context CSP can get really messy, with too many URLs and different types of policies, so parsing them can be a tricky business.

I think that we should keep a state in a separate file (like in JSON object on FS) and use that to build policy directive and write it into configuration file.

igorhrcek avatar Mar 21 '22 10:03 igorhrcek