<?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 R80 automation - run-script potential leakage of credentials in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/R80-automation-run-script-potential-leakage-of-credentials/m-p/25392#M1524</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After messing with the &lt;STRONG&gt;run-script&lt;/STRONG&gt; API call for automating several things on R80, I noticed that it&amp;nbsp;does not filter/mask user credentials and other sensitive data sent to it.&amp;nbsp;Everything gets&amp;nbsp;stored in the Recent Tasks&amp;nbsp;log (bottom left corner).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's an example from provisioning a VS using &lt;STRONG&gt;vsx_provisioning_tool&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.checkpoint.com/legacyfs/online/checkpoint/70107_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Had to switch to local authentication (-L) to prohibit the user credentials from being exposed and stored.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, I think this should be handled&amp;nbsp;by &lt;STRONG&gt;run-script&lt;/STRONG&gt;&amp;nbsp;itself, possibly the Check Point GUI, especially when executing obvious Check Point internal tools. Could be some regex foo or something, replacing the output with "-p xxxxxxx" instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a nice weekend!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;- Fredrik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Sep 2018 13:26:18 GMT</pubDate>
    <dc:creator>Fredrik_Holmber</dc:creator>
    <dc:date>2018-09-07T13:26:18Z</dc:date>
    <item>
      <title>R80 automation - run-script potential leakage of credentials</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/R80-automation-run-script-potential-leakage-of-credentials/m-p/25392#M1524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After messing with the &lt;STRONG&gt;run-script&lt;/STRONG&gt; API call for automating several things on R80, I noticed that it&amp;nbsp;does not filter/mask user credentials and other sensitive data sent to it.&amp;nbsp;Everything gets&amp;nbsp;stored in the Recent Tasks&amp;nbsp;log (bottom left corner).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's an example from provisioning a VS using &lt;STRONG&gt;vsx_provisioning_tool&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.checkpoint.com/legacyfs/online/checkpoint/70107_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Had to switch to local authentication (-L) to prohibit the user credentials from being exposed and stored.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, I think this should be handled&amp;nbsp;by &lt;STRONG&gt;run-script&lt;/STRONG&gt;&amp;nbsp;itself, possibly the Check Point GUI, especially when executing obvious Check Point internal tools. Could be some regex foo or something, replacing the output with "-p xxxxxxx" instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a nice weekend!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;- Fredrik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2018 13:26:18 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/R80-automation-run-script-potential-leakage-of-credentials/m-p/25392#M1524</guid>
      <dc:creator>Fredrik_Holmber</dc:creator>
      <dc:date>2018-09-07T13:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: R80 automation - run-script potential leakage of credentials</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/R80-automation-run-script-potential-leakage-of-credentials/m-p/25393#M1525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can see that being a potentially useful addition.&lt;/P&gt;&lt;P&gt;Perhaps something to be considered for a later release.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Sep 2018 07:59:21 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/R80-automation-run-script-potential-leakage-of-credentials/m-p/25393#M1525</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2018-09-09T07:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: R80 automation - run-script potential leakage of credentials</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/R80-automation-run-script-potential-leakage-of-credentials/m-p/25394#M1526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for&amp;nbsp;bringing this to our attention!&lt;/P&gt;&lt;P&gt;We had several RnD meetings to discuss this issue and we're considering&amp;nbsp;changing the run-script command&amp;nbsp;so that sensitive data will not be leaked by mistake.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the meanwhile, you'll be glad to know that &lt;STRONG&gt;there is a way to&amp;nbsp;avoid this issue today (no API change is required)&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;* The run-script API&amp;nbsp;has an "args" parameter.&lt;/P&gt;&lt;P&gt;* The data in the "args" parameter is passed to the script however the data in the "args" parameter does not appear in the audit logs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;PRE&gt;"mgmt_cli run-script script-name 'sample1' &lt;STRONG&gt;script 'my_script.sh -p $1'&lt;/STRONG&gt; &lt;STRONG&gt;args 'my secret password'&lt;/STRONG&gt; targets r80_20_ga -r true"&lt;/PRE&gt;&lt;P&gt;The audit log for the above script would show "&lt;STRONG&gt;my_script.sh -p $1" and will not include the secret password.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We'll update the run-script API documentation to bring it to the attention of other users.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2018 08:57:20 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/R80-automation-run-script-potential-leakage-of-credentials/m-p/25394#M1526</guid>
      <dc:creator>Uri_Bialik</dc:creator>
      <dc:date>2018-10-18T08:57:20Z</dc:date>
    </item>
  </channel>
</rss>

