Skip to content

Disallow logging.conf from elsewhere than the app folder - #825

Open
Ickerday wants to merge 1 commit into
developfrom
maintenance/disallow-logging-configs-from-outside-app-folder
Open

Disallow logging.conf from elsewhere than the app folder#825
Ickerday wants to merge 1 commit into
developfrom
maintenance/disallow-logging-configs-from-outside-app-folder

Conversation

@Ickerday

@Ickerday Ickerday commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

No description provided.


splunk_home = path.abspath(path.join(getcwd(), environ.get("SPLUNK_HOME", "")))
app_file = getattr(sys.modules["__main__"], "__file__", sys.executable)
app_root = path.dirname(path.abspath(path.dirname(app_file)))

@mateusz834 mateusz834 Jul 29, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that even correct? What if the CSC python file is inside bin/foo/bar/csc.py i don't think this will find the app dir correct, right?

There is an assumption that csc files are in bin/csc.py.

if path.exists(configuration_file):
filename = configuration_file
break
elif not path.isabs(filename):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we update this branch too? It will hit when filename is a relative path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants