Getting Data In

App Certification criteria: I need help on the 644 and 755 settings

niketn
Legend

My Waterfall Custom Visualization App fails App Inspect test which I am trying to build on Windows Machine. The only test that it fails is setting the permission 644 for all files outside of bin folder. Because of this failure my Splunk Custom Visualization app can not be certified.

Please find below the summary of App Inspector tests.

skipped: 0
success: 76
manual_check: 25
** failure: 1 **
warning: 0
error: 0

not_applicable: 60

Total: 162

I need help on setting 644 and 755 as per Source Code and Binary Standards of App Certification criteria. Anyone whose App created on Windows machine and tested with Splunk App Inspector, who manage to pass this file permission test please assist. I tried following steps to Set, View, Change, or Remove Permissions on Files and Folders from Microsoft but even after being logged in as Admin I can't change many permissions like Read and Execute and in fact dont know which specific permissions to remove as well.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

kamlesh_vaghela
SplunkTrust
SplunkTrust

Hi @niketnilay,

App packaging on windows using WinACE or 7-zip changes the file permissions. I have tried ALZip also. Both 7-zip and ALZip works similarly. So can you please try with ALzip?

http://www.altools.com/downloads/alzip.aspx

2nd way: Have you tried package app command? It should work :).

 $SPLUNK_HOME/bin/splunk package app <APP_NAME>

Thanks
Kamlesh

gjanders
SplunkTrust
SplunkTrust

I should clarify that I use 7zip to check permissions but cygwin to package 🙂

0 Karma

gjanders
SplunkTrust
SplunkTrust

Anyone whose App created on Windows
machine and tested with Splunk App
Inspector, who manage to pass this
file permission test please assist.

I can confirm the opposite, on Windows the file permissions always appear to be world writeable when tested by appinspect CLI:

FAILURE: A world-writable file was found

This occurs even though the cygwin environment I create the app in has valid permissions on all the files and the tgz file that is inspected has valid permissions on all files (644) as checked in 7zip.

I've accepted this as a limitation of using appinspect on Windows and since I rarely introduce new files into my application I don't have much of an issue with ignoring this one, it passes the online check when I submit the application for verification.

kunalmao
Communicator

Install git bash , open the file in there and then change it there.

0 Karma

niketn
Legend

@kunalmao, do you have the link? My antivirus blocked the one I tried to download.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

kunalmao
Communicator
0 Karma

niketn
Legend

App Inspect still throwing the same error after I applied 644 for entire App folder

Check that no files have *nix write permissions for all users (xx2,
xx6, xx7). Splunk recommends 644 for all app files outside of the bin/
directory, 644 for scripts within the bin/ directory that are invoked using 
an interpreter (e.g. python my_script.py or sh my_script.sh), and 755 for
scripts within the bin/ directory that are invoked directly (e.g.
./my_script.sh or ./my_script).
    FAILURE: A world-writable file was found. File: README.txt
    FAILURE: A world-writable file was found. File:
        appserver\static\visualizations\waterfall\formatter.html
    FAILURE: A world-writable file was found. File:
        appserver\static\visualizations\waterfall\package.json
    FAILURE: A world-writable file was found. File:
        appserver\static\visualizations\waterfall\preview.png
    FAILURE: A world-writable file was found. File:
        appserver\static\visualizations\waterfall\README.md
    FAILURE: A world-writable file was found. File:
        appserver\static\visualizations\waterfall\visualization.css
    FAILURE: A world-writable file was found. File:
        appserver\static\visualizations\waterfall\visualization.js

@kunalmao, Have you been able to Certify your App Built on Windows machine using this approach?

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

sbattista
Explorer

I was having the same issues, I fixed this by running the chmods in WSL on my windows machine-

 

find APPNAME_HERE -type d -exec chmod 700 {} \;

find APPNAME_HERE -type f -exec chmod 644 {} \;

0 Karma

kunalmao
Communicator

I have not got any of my apps certified. Anyway never was a fan of windows for Dev work . Just checking did you apply with -r option
Chmod -r ?

0 Karma

niketn
Legend

@kunalmao, yes I did.

Before git bash, I had tried Linux Subsystems for Windows as well to do the same and it did not work. So, I wanted someone's help who has already done this on Windows OS.

If you dont mind, I will convert your answer to comment so that it flags as unanswered for others to resolve.

PS: I have posted this question on Splunk Answers since the Splunk App Certification Team had requested to also check for help here.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...