mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-06 03:13:42 -05:00
Merge pull request #946 from GSA/stvnrlly/gtm-script-src
Add GTM to CSP sources
This commit is contained in:
@@ -150,6 +150,7 @@ def _csp(config):
|
||||
"'unsafe-eval'",
|
||||
"https://js-agent.newrelic.com",
|
||||
"https://gov-bam.nr-data.net",
|
||||
"https://www.googletagmanager.com",
|
||||
],
|
||||
"connect-src": ["'self'", "https://gov-bam.nr-data.net"],
|
||||
"style-src": ["'self'", asset_domain],
|
||||
|
||||
@@ -17,7 +17,8 @@ def test_owasp_useful_headers_set(
|
||||
assert search(r"form-action 'self';", csp)
|
||||
assert search(
|
||||
r"script-src 'self' static\.example\.com 'unsafe-eval' https:\/\/js-agent\.new"
|
||||
r"relic\.com https:\/\/gov-bam\.nr-data\.net 'nonce-.*';",
|
||||
r"relic\.com https:\/\/gov-bam\.nr-data\.net https:\/\/www\.googletagmanager\."
|
||||
r"com 'nonce-.*';",
|
||||
csp,
|
||||
)
|
||||
assert search(r"connect-src 'self' https:\/\/gov-bam.nr-data\.net;", csp)
|
||||
|
||||
Reference in New Issue
Block a user