Skip to content

feat(attachments): ask before opening a program or a script - #598

Closed
hanthor wants to merge 2 commits into
hyprlab:mainfrom
tuna-os:feat/risky-attachments
Closed

hanthor wants to merge 2 commits into
hyprlab:mainfrom
tuna-os:feat/risky-attachments

Conversation

@hanthor

@hanthor hanthor commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Opening an attachment hands it to the desktop's default handler, which for a .desktop file, a shell script or an AppImage means running it. Hylki now asks first, with the existing destructive-confirm dialog, when the name ends in one of about 50 risky extensions (.desktop, .sh, .AppImage, .jar, .exe, macro-enabled Office files, ...) or the first bytes are an ELF or Windows binary or a #! script.

Tests: the risky-name and magic-bytes table.

Opening an attachment hands it to the desktop's default handler. A .desktop, shell script, AppImage, jar, Windows binary and similar, or a file whose first bytes are ELF, MZ or a shebang whatever its name, now asks first.
hyprlab added a commit that referenced this pull request Nov 7, 2026
Opening an attachment hands it to the desktop's default handler. A launcher, script, package or Windows binary, or a file whose first bytes are ELF, MZ or a shebang whatever its name, now asks first.

Co-Authored-By: James Reilly <5840441+hanthor@users.noreply.github.com>
@hyprlab

hyprlab commented Nov 8, 2026

Copy link
Copy Markdown
Owner

Agentic reply:

Your warning before opening a program or a script is in the 1.48.0-beta.3 release, landed by hand and credited to you. At landing, .sh and .desktop files ask too, since GIO types them by their ending, and .flatpak, .jnlp, .ppsm, .potm, .xlam, .ppam, .xlsb and .sldm were added. The dialog says to trust where the file came from, as it also covers attachments in the composer. Please test it there and report anything that doesn't look right. It reaches the stable channel with the next stable release.

The beta build is in the repo now. If you already have the beta installed, flatpak update picks it up. If not, download and install it first:

flatpak install --user --from https://hylki.hyprlab.co/flatpak/co.hyprlab.Hylki.Beta.flatpakref

RPM, Debian and AppImage betas: Beta channel.

@hyprlab hyprlab closed this Nov 8, 2026
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