Skip to content
This repository was archived by the owner on Jul 7, 2025. It is now read-only.

Conversation

@bajtos
Copy link
Member

@bajtos bajtos commented Apr 15, 2025

We must not leak the filesystem structure when the code is running inside a sandboxed environment. The Checker App files are usually in the user's home directory. The full path includes the username, which is sensitive information we should not leak to untrusted modules. The modules should have access only to the path relative to the project (module) root.

Before:

file:///Users/bajtos/Library/Caches/app.filstation.desktop/sources/spark/main.js

After:

file:///ZINNIA/main.js

I discovered this issue while working on #735

Parent issue:

bajtos added 8 commits April 15, 2025 14:35
We must not leak the filesystem structure when the code is running
inside a sandboxed environment. Only path relative to the project root
should be available to the module.

Signed-off-by: Miroslav Bajtoš <[email protected]>
Signed-off-by: Miroslav Bajtoš <[email protected]>
Signed-off-by: Miroslav Bajtoš <[email protected]>
Signed-off-by: Miroslav Bajtoš <[email protected]>
@bajtos bajtos changed the title fix: source code paths relative to module root fix: do not leak username to untrusted modules Apr 17, 2025
@bajtos bajtos marked this pull request as ready for review April 17, 2025 09:10
@bajtos bajtos requested a review from juliangruber April 17, 2025 09:10
Copy link
Member

@juliangruber juliangruber left a comment

Choose a reason for hiding this comment

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

Idea sounds great to me, I'll step back in favor of Nikolas' review here

@bajtos bajtos requested a review from NikolasHaimerl April 22, 2025 16:17
@bajtos bajtos merged commit 0419b15 into main Apr 23, 2025
16 checks passed
@bajtos bajtos deleted the relative-module-paths branch April 23, 2025 07:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants