Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
with:
allow_issue_writing: false
artifact_name: zap-${{ matrix.name }}-pr${{ github.event.number }}
target: https://cstar-pr-${{ github.event.number }}.apps.silver.devops.gov.bc.ca/${{ matrix.path }}
target: https://cstar-${{ github.event.number }}.apps.silver.devops.gov.bc.ca/${{ matrix.path }}
token: ${{ secrets.GITHUB_TOKEN }}

results:
Expand Down
39 changes: 23 additions & 16 deletions frontend/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,24 +51,31 @@

header {
-Server
X-Frame-Options "SAMEORIGIN"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Wondering why this and X-XSS-Protection were removed as I believe they pertain to iframe security

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the feedback! Good question about X-Frame-Options. CSP replaced it with frame-ancestors: 'self', but I supposed it could be left in for IE11? And other legacy browsers?

X-XSS-Protection is discouraged, though, and again replaced with the CSP. AFAIK current browsers have stopped using it. I suppose that again we could leave it in for legacy browsers, but if anything it should be explicitly disabled (0) to prevent buggy legacy filters from being used.

X-XSS-Protection "1;mode=block"
Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate"
X-Content-Type-Options "nosniff"
Strict-Transport-Security "max-age=31536000"
Content-Security-Policy "default-src 'self' https://*.gov.bc.ca;
script-src 'self' https://*.gov.bc.ca 'unsafe-inline' 'unsafe-eval';
style-src 'self' https://fonts.googleapis.com https://use.fontawesome.com 'unsafe-inline';
font-src 'self' https://fonts.gstatic.com;
img-src 'self' data: https://fonts.googleapis.com https://www.w3.org https://*.gov.bc.ca https://*.tile.openstreetmap.org;
frame-ancestors 'self';
Cache-Control "no-cache, must-revalidate"
Content-Security-Policy "base-uri 'self';
connect-src 'self'
https://dev.loginproxy.gov.bc.ca/
https://test.loginproxy.gov.bc.ca/
https://loginproxy.gov.bc.ca/;
default-src 'none';
font-src 'self';
form-action 'self';
block-all-mixed-content;
connect-src 'self' https://*.gov.bc.ca wss://*.gov.bc.ca;"
Referrer-Policy "same-origin"
Permissions-Policy "fullscreen=(self), camera=(), microphone=()"
Cross-Origin-Resource-Policy "cross-origin"
frame-ancestors 'self';
frame-src 'self'
https://dev.loginproxy.gov.bc.ca/
https://test.loginproxy.gov.bc.ca/
https://loginproxy.gov.bc.ca/;
img-src 'self';
script-src 'self' 'unsafe-inline';
style-src 'self' 'unsafe-inline';
upgrade-insecure-requests;"
Cross-Origin-Opener-Policy "same-origin"
Cross-Origin-Resource-Policy "same-origin"
Permissions-Policy "camera=(), fullscreen=(self), microphone=()"
Referrer-Policy "same-origin"
Strict-Transport-Security "max-age=31536000"
X-Content-Type-Options "nosniff"
X-Frame-Options "SAMEORIGIN"
}
}

Expand Down
Loading