Skip to content

Commit 8c2e6f3

Browse files
labkey-adamgithub-actions[bot]
authored andcommitted
update CSP to match commit a7f460f65e74266ecd6b3ab2ee47eda2330a146b
1 parent c17884b commit 8c2e6f3

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

application.properties

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -165,18 +165,19 @@ context.workDirLocation=/work/Tomcat/localhost
165165

166166
## START OF CSP ENFORCE BLOCK (DO NOT CHANGE THIS TEXT)
167167
csp.enforce=\
168-
default-src 'self' https: ; \
169-
connect-src 'self' ${CONNECTION.SOURCES} ; \
170-
object-src 'none' ; \
171-
style-src 'self' https: 'unsafe-inline' ${STYLE.SOURCES} ; \
172-
img-src 'self' https: data: ${IMAGE.SOURCES} ; \
173-
font-src 'self' data: ${FONT.SOURCES} ; \
174-
script-src 'self' 'unsafe-eval' 'strict-dynamic' 'nonce-${REQUEST.SCRIPT.NONCE}' ; \
175-
base-uri 'self' ; \
168+
default-src 'self' ; /* Limit the default to only the current server */\
169+
connect-src 'self' ${CONNECTION.SOURCES} ; /* Limit allowed connection sources */\
170+
object-src 'none' ; /* These tags are not currently used by LKS */\
171+
style-src 'self' 'unsafe-inline' ${STYLE.SOURCES} ; /* We currently have a few inline <style> tags that we are weeding out */\
172+
img-src 'self' data: ${IMAGE.SOURCES} ; /* Limit image loading locations */\
173+
font-src 'self' data: ${FONT.SOURCES} ; /* Limit font source loading locations */\
174+
script-src 'unsafe-eval' 'strict-dynamic' 'nonce-${REQUEST.SCRIPT.NONCE}' ; /* Limit scripts to those with nonces or transitive scripts */\
175+
base-uri 'self' ; /* Limit the base tags to only source from current server */\
176176
upgrade-insecure-requests ;\
177-
frame-ancestors 'self' ; \
178-
frame-src 'self' ${FRAME.SOURCES} ; \
179-
report-uri https://www.labkey.org/admin-contentSecurityPolicyReport.api?cspVersion=e10&${CSP.REPORT.PARAMS} ;
177+
${UPGRADE.INSECURE.REQUESTS} /* Conditionally add upgrade-secure-requests directive if HTTPS is required */\
178+
frame-ancestors 'self' ; /* Limit iframe content destinations (who can load this server's content into an iframe) */\
179+
frame-src 'self' ${FRAME.SOURCES} ; /* Limit iframe content sources (from what servers can this server's iframe content be loaded) */\
180+
report-uri https://www.labkey.org/admin-contentSecurityPolicyReport.api?cspVersion=e12&${CSP.REPORT.PARAMS} ; /* Report any encountered CSP violations to the local server */
180181
## END OF CSP ENFORCE BLOCK (DO NOT CHANGE THIS TEXT)
181182

182183
## START OF CSP REPORT BLOCK (DO NOT CHANGE THIS TEXT)
@@ -191,7 +192,7 @@ csp.report=\
191192
base-uri 'self' ; /* Limit the base tags to only source from current server */\
192193
frame-ancestors 'self' ; /* Limit iframe content destinations (who can load this server's content into an iframe) */\
193194
frame-src 'self' ${FRAME.SOURCES} ; /* Limit iframe content sources (from what servers can this server's iframe content be loaded) */\
194-
report-uri https://www.labkey.org/admin-contentSecurityPolicyReport.api?cspVersion=r11&${CSP.REPORT.PARAMS} ; /* Report any encountered CSP violations to the supplied URL */
195+
report-uri https://www.labkey.org/admin-contentSecurityPolicyReport.api?cspVersion=r12&${CSP.REPORT.PARAMS} ; /* Report any encountered CSP violations to the local server */
195196
## END OF CSP REPORT BLOCK (DO NOT CHANGE THIS TEXT)
196197

197198
## Load optional application.properties if file exists - used for one-off labkey cloud use cases etc.

0 commit comments

Comments
 (0)