All Apps and Add-ons

Feature Request: AppInspect to check for absolute paths

gsopkoTC
Path Finder

All one has to do is search Splunk Answers as such...

https://answers.splunk.com/search.html?f=&redirect=search%2Fsearch&sort=relevance&q=ImportError%3A+N...

...to see that there are a lot of apps finding conflicting Python libraries/modules. A cause for this is that most apps that I have seen that I have encountered this issue have not specified an absolute path as suggested via Splunk SDK documentation, as well as what's provided in the example init py here (line 17):

https://github.com/splunk/splunk-sdk-python/blob/master/splunklib/__init__.py#L17

A step that would mitigate this would be for the AppInspect program to look for this:

from future import absolute_import

And if not, reject the app with a statement regarding that the app needs to be built to utilize absolute versus relative paths. Otherwise, we'll all continue to have the problem of apps stumbling into another app directory looking for a Python library and throwing an error. Other steps should also be taken to prevent, but this is a good start and can be readily automated.

0 Karma
Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...