{"action":"opened","issue":{"url":"https://api.github.com/repos/amarfurt/hdc/issues/49","repository_url":"https://api.github.com/repos/amarfurt/hdc","labels_url":"https://api.github.com/repos/amarfurt/hdc/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/amarfurt/hdc/issues/49/comments","events_url":"https://api.github.com/repos/amarfurt/hdc/issues/49/events","html_url":"https://github.com/amarfurt/hdc/issues/49","id":154203898,"number":49,"title":"Hardening: Implement CSP","user":{"login":"LukasReschke","id":878997,"avatar_url":"https://avatars.githubusercontent.com/u/878997?v=3","gravatar_id":"","url":"https://api.github.com/users/LukasReschke","html_url":"https://github.com/LukasReschke","followers_url":"https://api.github.com/users/LukasReschke/followers","following_url":"https://api.github.com/users/LukasReschke/following{/other_user}","gists_url":"https://api.github.com/users/LukasReschke/gists{/gist_id}","starred_url":"https://api.github.com/users/LukasReschke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LukasReschke/subscriptions","organizations_url":"https://api.github.com/users/LukasReschke/orgs","repos_url":"https://api.github.com/users/LukasReschke/repos","events_url":"https://api.github.com/users/LukasReschke/events{/privacy}","received_events_url":"https://api.github.com/users/LukasReschke/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-11T09:54:58Z","updated_at":"2016-05-11T09:54:58Z","closed_at":null,"body":"Since no inline JavaScript is used it should be easily possible to implement a very strict CSP policy. Using CSP will make XSS a non-issue in nearly all browsers: http://caniuse.com/#feat=contentsecuritypolicy\r\n\r\nCSP is as easy as sending a simple header, http://cspisawesome.com/ has a nice builder for it.\r\n\r\nMy recommendations:\r\n\r\n- Default to `none`\r\n- Script to `self`\r\n- Style to `self` (requires the removal of all inline CSS)\r\n- Image, Connect, etc. to the whitelists of hosts that actually are required"}}