Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Dockerfile-serve #935

Merged
merged 1 commit into from Jan 7, 2019
Merged

Update Dockerfile-serve #935

merged 1 commit into from Jan 7, 2019

Conversation

degeri
Copy link
Member

@degeri degeri commented Dec 1, 2018

Tightened CSP and added 2 new security headers.

CSP New rule: default-src 'none'; script-src 'self'; img-src 'self' data:; style-src 'self' 'sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=';font-src 'self';connect-src 'self' faucet.decred.org explorer.dcrdata.org testnet.dcrdata.org testnet.decred.org mainnet.decred.org;manifest-src 'self'; object-src 'none';

1.By default allow none
2.Script allow "self"
3.Images allow "self" and "data:" (used in proposals)
4.Styles (CSS) allow "self" and one whitelisted inline CSS.
5.Font allow "self"
6.Connect allow "self" ; faucet.decred.org ; explorer.dcrdata.org ; testnet.dcrdata.org ; testnet.decred.org ; mainnet.decred.org
7.Manifest allow "self"
8. Object set to "none"

New Security Headers:

Header set X-Content-Type-Options "nosniff" ==> fixes a chrome and IE specific issue. https://scotthelme.co.uk/hardening-your-http-response-headers/ look under "X-Content-Type-Options"

Header set Referrer-Policy "same-origin" ==> Defines that "referrer" value should only be given in "same-origin" requests. (https://scotthelme.co.uk/a-new-security-header-referrer-policy/)

Tightened CSP and added 2 new security headers. 

CSP New rule: default-src 'none'; script-src 'self'; img-src 'self' data:; style-src 'self' 'sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=';font-src 'self';connect-src 'self' faucet.decred.org explorer.dcrdata.org testnet.dcrdata.org testnet.decred.org mainnet.decred.org;manifest-src 'self'; object-src 'none';

1.By default allow none
2.Script allow "self"
3.Images allow "self" and "data:" (used in proposals)
4.Styles (CSS) allow "self" and one whitelisted inline CSS. 
5.Font allow "self"
6.Connect allow "self" ; faucet.decred.org ; explorer.dcrdata.org ; testnet.dcrdata.org ; testnet.decred.org ; mainnet.decred.org
7.Manifest allow "self"
8. Object set to "none"

New Security Headers:

Header set X-Content-Type-Options "nosniff" ==> fixes a chrome and IE specific issue.  https://scotthelme.co.uk/hardening-your-http-response-headers/ look under "X-Content-Type-Options"
Header set Referrer-Policy "same-origin" ==> Defines that "referrer" value should only be given in "same-origin"  requests.  (https://scotthelme.co.uk/a-new-security-header-referrer-policy/)
@degeri degeri changed the title Update Update Dockerfile-serve Dec 1, 2018
Copy link
Member

@dajohi dajohi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants