<?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 Re: How the Splunk APIs deal with files in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/How-the-Splunk-APIs-deal-with-files/m-p/526901#M9434</link>
    <description>&lt;P&gt;This is one of the limitations of AppInspect.&amp;nbsp; Such warnings are supposed to be resolved during manual inspection by Splunk.&lt;/P&gt;</description>
    <pubDate>Wed, 28 Oct 2020 15:40:49 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2020-10-28T15:40:49Z</dc:date>
    <item>
      <title>How the Splunk APIs deal with files</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-the-Splunk-APIs-deal-with-files/m-p/526893#M9433</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;I am new to Splunk Cloud App development. I have got some Splunk Cloud warning messages after AppInspect from Splunk Cloud Team, which are mostly related to manage file access in Python code. After I searched the document and Google, I came out a way but not sure if it works. Could anyone point me out if the follwoing way works to avoid the warning message?&lt;/P&gt;&lt;P&gt;try:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; from splunk.clilib.bundle_paths import &lt;STRONG&gt;make_splunkhome_path&lt;/STRONG&gt;&lt;BR /&gt;except ImportError:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; from splunk.appserver.mrsparkle.lib.util import&lt;STRONG&gt; make_splunkhome_path&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;_file = &lt;STRONG&gt;make_splunkhome_path&lt;/STRONG&gt;(["var", "log", "splunk", log_file_name])&lt;BR /&gt;with open(_file, 'w') as filehandler:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; filehandler.write("content need to write to file")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FYI, the warning messages were refering the "Method used to write/manipulate/remove to/from files outside of the app dir".&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 15:21:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-the-Splunk-APIs-deal-with-files/m-p/526893#M9433</guid>
      <dc:creator>jsun</dc:creator>
      <dc:date>2020-10-28T15:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: How the Splunk APIs deal with files</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-the-Splunk-APIs-deal-with-files/m-p/526901#M9434</link>
      <description>&lt;P&gt;This is one of the limitations of AppInspect.&amp;nbsp; Such warnings are supposed to be resolved during manual inspection by Splunk.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 15:40:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-the-Splunk-APIs-deal-with-files/m-p/526901#M9434</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-10-28T15:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: How the Splunk APIs deal with files</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-the-Splunk-APIs-deal-with-files/m-p/527767#M9435</link>
      <description>&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 15:47:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-the-Splunk-APIs-deal-with-files/m-p/527767#M9435</guid>
      <dc:creator>jsun</dc:creator>
      <dc:date>2020-11-03T15:47:45Z</dc:date>
    </item>
  </channel>
</rss>

