splunk / splunk-sdk-python

Splunk Software Development Kit for Python
http://dev.splunk.com
Apache License 2.0
698 stars 370 forks source link

Incorrect permissions on file lib/splunklib/modularinput/event_writer.py in release 1.7.2 #487

Closed gjanders closed 1 year ago

gjanders commented 2 years ago

The issue is the permissions of the file: lib/splunklib/modularinput/event_writer.py

-rwxr-xr-x 1 user None 2878 Sep 22 20:09 event_writer.py

So 755 will not pass appinspect, this file should be 644 like all the other files...

diogofgm commented 2 years ago

In my copy the others are 664

ncanumalla-splunk commented 2 years ago

@gjanders Thank you for reporting this issue. The team is taking a look.

gjanders commented 2 years ago

@ncanumalla-splunk thanks for the reply. Perhaps this check could be automated or send it via appinspect which would definitely find the issue :)

ncanumalla-splunk commented 2 years ago

@gjanders Our team hasn't changed the file permissions in the SDK and doesn't handle updating them. It depends on the way the SDK is packaged with the app. You have the option to move the SDK into /bin. Also, we recommend you install the SDK using pip in which case the file permissions are 664. Hope that helps.

gjanders commented 2 years ago

@ncanumalla-splunk refer to https://github.com/splunk/splunk-sdk-python/releases/tag/1.7.2

Or this picture: 2022-10-06 09_36_23-E__temp_splunk-sdk-python-1 7 2 (1) tar gz_splunk-sdk-python-1 7 2 (1) tar_splun

gjanders commented 2 years ago

Perhaps your packaging system has an issue then? The releases are created on this github and that is the .tar.gz from tag 1.7.2

ncanumalla-splunk commented 2 years ago

@gjanders Thank you very much for pointing this out in the Github release. We will look into fixing this and also check on our packaging/release process. cc: @ashah-splunk

gjanders commented 2 years ago

image

As per the image, it's actually in the master branch...I'll send in a pull request

gjanders commented 2 years ago

https://github.com/splunk/splunk-sdk-python/pull/491

ashah-splunk commented 2 years ago

@gjanders thanks for the PR, we are also looking into options to prevent such file permission changes in future. We will be merging the change soon. Also we have modified the PR with base branch to develop as per the process. Changes will be available in the master branch once new SDK is released.

gjanders commented 2 years ago

Thanks for updating the PR

ashah-splunk commented 2 years ago

new PR ref - #493

ashah-splunk commented 1 year ago

@gjanders fix is available in the Python SDK latest release v1.7.3. Request you to pull the latest release.