<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Splunk and CSP functions in Security</title>
    <link>https://community.splunk.com/t5/Security/Splunk-and-CSP-functions/m-p/439007#M10275</link>
    <description>&lt;P&gt;I'm running nginx with the below security config.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "no-referrer-when-downgrade" always;
add_header Content-Security-Policy "default-src 'self' http: https: data: blob: 'unsafe-inline'" always;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When this file is enabled within nginx Splunk web will throw &lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;This browser is not supported by&lt;BR /&gt;
Splunk. Please refer to the list of&lt;BR /&gt;
Supported Browsers.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Console shows &lt;BR /&gt;
    EvalError: call to Function() blocked by CSP common.js:1:30458&lt;BR /&gt;
    Content Security Policy: The page’s settings blocked the loading of a resource at eval (“default-src”).&lt;/P&gt;

&lt;P&gt;Mozilla seems to say that the function call is banned ...  via &lt;A href="https://developer.mozilla.org/en-US/docs/Archive/B2G_OS/Firefox_OS_apps/Building_apps_for_Firefox_OS/CSP#Applicable_CSP_Restrictions"&gt;https://developer.mozilla.org/en-US/docs/Archive/B2G_OS/Firefox_OS_apps/Building_apps_for_Firefox_OS/CSP#Applicable_CSP_Restrictions&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;The function constructor is banned
You may not use the Function() constructor. Using it will throw a security error.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Sooo anyone run into this before ? I'm running Splunk Ent 7.2.3 &lt;/P&gt;</description>
    <pubDate>Mon, 12 Aug 2019 14:10:00 GMT</pubDate>
    <dc:creator>tb5821</dc:creator>
    <dc:date>2019-08-12T14:10:00Z</dc:date>
    <item>
      <title>Splunk and CSP functions</title>
      <link>https://community.splunk.com/t5/Security/Splunk-and-CSP-functions/m-p/439007#M10275</link>
      <description>&lt;P&gt;I'm running nginx with the below security config.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "no-referrer-when-downgrade" always;
add_header Content-Security-Policy "default-src 'self' http: https: data: blob: 'unsafe-inline'" always;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When this file is enabled within nginx Splunk web will throw &lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;This browser is not supported by&lt;BR /&gt;
Splunk. Please refer to the list of&lt;BR /&gt;
Supported Browsers.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Console shows &lt;BR /&gt;
    EvalError: call to Function() blocked by CSP common.js:1:30458&lt;BR /&gt;
    Content Security Policy: The page’s settings blocked the loading of a resource at eval (“default-src”).&lt;/P&gt;

&lt;P&gt;Mozilla seems to say that the function call is banned ...  via &lt;A href="https://developer.mozilla.org/en-US/docs/Archive/B2G_OS/Firefox_OS_apps/Building_apps_for_Firefox_OS/CSP#Applicable_CSP_Restrictions"&gt;https://developer.mozilla.org/en-US/docs/Archive/B2G_OS/Firefox_OS_apps/Building_apps_for_Firefox_OS/CSP#Applicable_CSP_Restrictions&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;The function constructor is banned
You may not use the Function() constructor. Using it will throw a security error.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Sooo anyone run into this before ? I'm running Splunk Ent 7.2.3 &lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2019 14:10:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Splunk-and-CSP-functions/m-p/439007#M10275</guid>
      <dc:creator>tb5821</dc:creator>
      <dc:date>2019-08-12T14:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk and CSP functions</title>
      <link>https://community.splunk.com/t5/Security/Splunk-and-CSP-functions/m-p/439008#M10276</link>
      <description>&lt;P&gt;Chrome seems to debug this a bit differently &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;common.js:1 Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "default-src 'self' http: https: data: blob: 'unsafe-inline'".

    at new Function (&amp;lt;anonymous&amp;gt;)
    at Function._.template (common.js:1)
    at child.&amp;lt;anonymous&amp;gt; (common.js:45)
    at child.compileTemplate (common.js:1)
    at child.constructor (common.js:44)
    at new child (common.js:30)
    at child.page (account.js:3)
    at child.execute (common.js:30)
    at Object.callback (common.js:30)
    at common.js:30
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Aug 2019 14:13:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Splunk-and-CSP-functions/m-p/439008#M10276</guid>
      <dc:creator>tb5821</dc:creator>
      <dc:date>2019-08-12T14:13:25Z</dc:date>
    </item>
  </channel>
</rss>

