Skip to content

feat(securemark): add SecureMark, an image and PDF watermarking app (org.ginies.secure_mark) - #1004

Merged
jing2uo merged 1 commit into
flatpark:mainfrom
rhgKc2yp:add/org.ginies.secure_mark
Nov 7, 2026
Merged

jing2uo merged 1 commit into
flatpark:mainfrom
rhgKc2yp:add/org.ginies.secure_mark

Conversation

@rhgKc2yp

@rhgKc2yp rhgKc2yp commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Adds SecureMark 3.0.0 (org.ginies.secure_mark), supporting visible image/PDF watermarks and invisible image steganography: hidden text, encrypted file embedding and experimental DCT watermarking.

Packaging: Official x86_64 Linux AppImage, pinned as extra-data and unpacked offline using FlatPark's pinned appimage-tools stack. Runs unmodified through AppRun on GNOME 51; updates follow GitHub releases automatically.

Sandbox: Wayland/fallback X11 and IPC for display, DRI for rendering, and Secret Service for signing-key storage. Files and output folders use portals. No default filesystem or network grants; metainfo documents overrides for directory access and network sharing.

Validation and testing:

  • Descriptor audit, AppStream validation, shell syntax, release resolver, offline system-install extraction check, and signed local repository build/install passed.
  • Fresh launch and restart rendered correctly on Xwayland; native Wayland passed in the user's test. Measured WM_CLASS matches StartupWMClass.
  • Imported PNG/PDF fixtures through real file portals with the user's assistance, previewed visible watermarks and exported both. Validated the PNG and confirmed the saved PDF loads and contains the watermark text.
  • First-run state and output-folder preference survived update/restart. Home and desktop/autostart entry listings were unchanged.
  • No blocked bus-name ownership requests. Second launch opens another window, matching upstream's non-unique application setting; tray/MPRIS are not applicable.
  • Steganography, signing, encryption passed

Not tested: network sharing, printing or other advanced modes.

Flathub: No SecureMark listing found by name; no prior Flatpak/Flathub issues or submissions found in the upstream and Flathub trackers. Requested by a user; no developer approval claimed.

Prepared with OpenAI Codex.

Thanks!

@jing2uo

jing2uo commented Nov 7, 2026

Copy link
Copy Markdown
Collaborator

Review: SecureMark (org.ginies.secure_mark)

Reviewed at head a0b0d78c against docs/reviewers/review-runbook.md. This is a static review only: no build command, resolver, apply_extra or app was run.

Recommendation: PASS, once pr-checks has run. No check run exists for a0b0d78c (lint-and-test, guard-infra and build-changed never triggered, while #1005, opened the same evening, got all four). A maintainer re-run or a close/reopen should start them. The notes at the end don't block merging.

# Phase Check Tier Verdict Evidence
0 Safety Static-only; artifacts handled in an isolated dir ★ ✅ AppImage and appimage-tools tarball fetched as bytes into a scratch dir. The SquashFS was carved at offset 944632 (the ELF section-header end, which is also where the second hsqs sits) and listed with 7-Zip before extraction. The AppImage stub was never run, and nothing inside it was run either
1.1 Scope Classification ★ ✅ New app: 8 files, all under registry/org.ginies.secure_mark/ (+141/−0). Nothing under that id on main
1.2 Scope High-scrutiny surface ★ ✅ No .github/, scripts/, config/ or existing resolver touched. The resolver sits in the new app dir
2.1 Provenance Submitter account ★ ✅ rhgKc2yp: account from 2026-10-22, 0 followers, 10 repos (mostly *-release build repos and a flatpark fork). Young, but has had about 25 packaging PRs merged here since 2026-10-22 (#808 … #1021), with no problems
2.2 Provenance Source repo ★ ✅ aginies/SecureMark: created 2026-03-19, GPL-3.0, not a fork, 1★. Releases go back to v1.7.2 (2026-03-27), all built by its own Build & Release SecureMark workflow. Owner aginies (Antoine Giniès, SUSE): account from 2013-03, 82 repos. Low popularity, but a long-standing real developer and a release history built in CI
2.3 Provenance Commit identity ★ ✅ One commit, author and committer rhgKc2yp <[email protected]>
2.4 Provenance Timeline ★ ✅ Upstream repo from 2026-03, then v3.0.0 published 2026-10-20 by aginies. Its assets were re-uploaded on 2026-10-27 17:33 by a workflow_dispatch run on master 231980cc (the tag still points at 335e6d51). The PR came 2026-11-05. The submitter has no link to upstream, and the bytes come from upstream CI (5.1/5.4)
2.5 Provenance Trust tier ★ ✅ unknown-but-plausible (young account, steady record here)
2.6 Provenance Artifact tier ★ ✅ Tier 1: open source (GPL-3.0), official upstream AppImage
3.1 Manifest Source types ★ ✅ Two extra-data sources, each with sha256 and a non-zero size, both x86_64-only (securemark.AppImage 29899256 bytes, appimage-tools.tar.xz 57220 bytes). The other five are local file sources. No git, no archive
3.1b Manifest Nothing remote built into /app ★ ✅ buildsystem: simple only installs in-repo files. appimage-tools is extra-data as the runbook requires, so neither payload enters the ref
3.2 Manifest finish-args escape perms ★ ✅ None. wayland, fallback-x11, ipc, dri, talk-name=org.freedesktop.secrets, each commented. There is no network grant and no filesystem grant
3.3 Manifest policy: honest ★ ✅ proprietary: false (GPL-3.0). dangerous_permissions: [] is correct, since none is used
3.4 Manifest build-commands / injected code ★ ✅ Install-only. The wrapper is a single exec /app/extra/securemark/AppRun "$@". No LD_PRELOAD, no env, no patch
3.4b Manifest packaging: declarations ★ ✅ None needed: nothing injected, no host commands, no sandbox switched off. appimage-tools is a support file the site derives from the manifest
3.5 Manifest Source URLs genuine ★ ✅ github.com/aginies/SecureMark/releases/download/v3.0.0/SecureMark-v3.0.0-Linux.AppImage and github.com/flatpark/prebuilt/releases/download/appimage-tools-v2/…-fd-26.08-x86_64.tar.xz (the same pin 29 other manifests use)
3.6 Manifest App id matches vendor ★ ✅ org.ginies.secure_mark is upstream's own APPLICATION_ID (linux/CMakeLists.txt:10 @ 231980cc), and so also the GTK prgname behind StartupWMClass=Org.ginies.secure_mark. The metainfo says it is a community package that runs the upstream build unmodified
3.7 Manifest update.command ★ ✅ ./resolve-update.sh
3.8 Manifest Download host ★ ✅ Upstream's GitHub releases, uploaded by github-actions[bot] from upstream's workflow (run actor aginies), not by the submitter
3.9 Manifest Optional caps opt-in ★ ✅ LAN sharing (--share=network) and drag-and-drop from a directory (--filesystem=<dir>) are left out and given as flatpak override lines in the metainfo, with --reset to undo. Files and output folders go through portals (file_selector_linux → GTK FileChooser)
3.10 Manifest Testing record ★ ✅ The PR body lists what passed: descriptor audit, AppStream, check-apply-extra, a signed local repo build/install, fresh launch and restart on Xwayland, native Wayland, measured WM_CLASS, PNG/PDF import and export through real portals, steganography, signing, encryption, state across update/restart, unchanged home and autostart listings, bus ownership. It also says what wasn't tested (network sharing, printing, advanced modes)
4.1 Runtime No fetch-and-exec ★ ✅ The only updater is a notify-only check (lib/pages/parts/state.misc_dialogs.dart:253-281). It GETs api.github.com/repos/aginies/SecureMark/releases/latest, compares versions, and shows a snackbar that launchUrls the release page. Nothing is downloaded or run, and without a network grant the check just fails. Other Process.run calls: openssl req -x509 … and chmod 600 for the optional HTTPS share cert (lib/utils/certificate_manager.dart:85,338), and macOS/Windows-only camera probes (lib/main.dart:96,104)
4.2 Runtime Resolver as code ★ ✅ Reads releases/latest of the hard-coded aginies/SecureMark (optionally with GITHUB_TOKEN). Picks exactly one asset by ^SecureMark-v[^/]+-Linux\.AppImage$ (otherwise an error), strips the leading v from tag_name, and prints JSON with jq. No eval, no writes, no interpolation into a shell. The URL comes from browser_download_url, so it stays on GitHub release storage. CI computes the sha256. It doesn't filter prerelease, but /releases/latest already leaves out prereleases and drafts
4.3 Runtime Network × filesystem ★ ✅ No network and no filesystem grant by default. With the network override, local_server_manager.dart runs an HttpServer.bind/bindSecure on an ephemeral port for LAN sharing (the 0.0.0.0 string). The other hosts in libapp.so are the GitHub repo/API/privacy-policy, doc links and XML namespaces
5.1 Artifact sha256 == pin ★ ✅ securemark.AppImage: c05cd653…df88b5b613, 29899256 bytes, the same as GitHub's asset digest. appimage-tools.tar.xz: 01ff0b36…4971b12304, 57220 bytes, the same as the appimage-tools-v2 asset digest (github-actions[bot])
5.2 Artifact Inspected per type ★ ✅ Type-2 AppImage: a static-pie stub plus a SquashFS 4.0 (zstd), 238 entries, all uid/gid 0. Four symlinks, all relative and inside the tree (AppRun → usr/bin/SecureMark, .DirIcon, SecureMark.png, SecureMark.desktop). No .., no absolute paths, no setuid/setgid. 47 entries are mode 0777, all of them usr/share/doc/*/copyright (linuxdeploy). Flatpak's flatpak_canonicalize_permissions resets the modes of the apply_extra output, so this doesn't matter. apply_extra.sh uses the standard offline path: appimage-offset + unsquashfs -o, no FUSE, stub never run. It checks that AppRun is an executable symlink and deletes the AppImage and the tools afterwards
5.3 Artifact Open-source: nothing injected 1 ✅ The payload is run unmodified through AppRun. The icon is byte-identical to the AppImage's usr/share/icons/hicolor/512x512/apps/SecureMark.png (6931082c…). The desktop file is upstream's with Exec/Icon renamed to the app id, plus Comment, Terminal, Graphics and StartupWMClass. Upstream ships no metainfo, so it was written for this package
5.4 Artifact Shipped == official ★ ✅ apply_extra.sh unpacks the SquashFS whole into /app/extra/securemark and rewrites nothing. The pinned bytes are the current upstream asset
5.5 Artifact Bundled runtime vs upstream ★ ✅ libflutter_linux_gtk.so is byte-identical (sha256 360ff98c…5993a891, Build ID f168355f…) to Google's flutter_infra_release/flutter/cf636b1d…/linux-x64-release/linux-x64-flutter-gtk.zip (Dart 3.13.7, 2026-10-22). libapp.so (the Dart AOT snapshot of upstream's code) and the plugin .sos are built by upstream CI. usr/lib/ holds the GTK3/GLib/Pango/X11 stack that linuxdeploy copies from the Ubuntu runner (61 libs, with Debian copyright files). SecureMark has RUNPATH $ORIGIN/../lib, so that stack is used ahead of GNOME 51's copy. That is upstream's own bundle, and the manifest comment says so
5.6 Artifact IOC scan ★ ✅ No hits for xmrig, stratum+, /dev/tcp, nc -e, bash -i, crontab, .bashrc, LD_PRELOAD, autostart anywhere in the tree. The only \x7fELF is at offset 0 in SecureMark, libapp.so and libpdfium.so, so nothing is embedded. Dotted quads: only 0.0.0.0 and 127.0.0.1. RUNPATHs are $ORIGIN / $ORIGIN/../lib, plus some build-host paths left over from upstream CI: /home/runner/work/SecureMark/… on 5 plugins in usr/bin/lib/, and /usr/lib/jvm/temurin-25-jdk-amd64/lib/server on libdartjni.so. Neither path exists in the sandbox, and the app grants neither /home nor writable /usr, so I don't count this as RPATH injection
6.1 Compliance Purpose ★ ✅ Watermarking and steganography tool. GPL-3.0 allows redistribution, and extra-data keeps the binary off FlatPark's storage anyway
6.2 Compliance Non-FOSS not a reason ★ ➖ Open source
7.1 Verdict Overall ★ ✅ PASS (once CI has run)
7.2 Verdict Hard-fail triggers ★ ✅ None
7.3 Verdict Recommends only ★ ✅ A maintainer merges after pr-checks passes

Files read

  • org.ginies.secure_mark.yml: runtime choice and its comment, finish-args and their comments, the one module, appimage-tools outside the MANAGED block (the same layout as com.heynote.app).
  • flatpark.yml: x86_64-only (upstream ships no aarch64 AppImage), update.command, policy:.
  • apply_extra.sh: checks both files exist, bsdtar --no-same-owner, a numeric-only offset check, unsquashfs -no-xattrs -o, checks the AppRun symlink, cleans up.
  • securemark-wrapper: a single exec.
  • resolve-update.sh: see 4.2.
  • org.ginies.secure_mark.desktop, .png: compared with the AppImage's (5.3). .metainfo.xml: override list, developer, the screenshot is pinned to 231980cc (the commit the shipped bytes were built from), release 3.0.0.
  • Upstream at 231980cc: linux/CMakeLists.txt, .github/workflows/build.yml (linuxdeploy packaging, release upload), state.misc_dialogs.dart, certificate_manager.dart, local_server_manager.dart, main.dart (Process/HTTP call sites only).

Reproduce

curl -fsSLo sm.AppImage https://github.com/aginies/SecureMark/releases/download/v3.0.0/SecureMark-v3.0.0-Linux.AppImage
curl -fsSLo at.tar.xz https://github.com/flatpark/prebuilt/releases/download/appimage-tools-v2/appimage-tools-appimage-tools-v2-fd-26.08-x86_64.tar.xz
sha256sum sm.AppImage at.tar.xz; stat -c '%n %s' sm.AppImage at.tar.xz
gh api repos/aginies/SecureMark/releases/tags/v3.0.0 --jq '.assets[]|{name,digest,created_at}'
LC_ALL=C grep -aob hsqs sm.AppImage | head -2                  # 944632 is the image
tail -c +944633 sm.AppImage > sm.sqfs
7zz l -slt sm.sqfs                                            # 238 entries, uid/gid 0, 4 relative symlinks
7zz x -snl -ox sm.sqfs
find x -type l -printf '%p -> %l\n'; find x -perm /6000
for f in $(find x -type f); do head -c4 "$f" | grep -q $'\x7fELF' && readelf -d "$f" | grep -E 'RPATH|RUNPATH' | sed "s|^|$f |"; done
LC_ALL=C grep -aobP '\x7fELF' x/usr/bin/SecureMark x/usr/bin/lib/libapp.so x/usr/bin/lib/libpdfium.so
grep -rlaE 'xmrig|stratum\+|/dev/tcp|nc -e|bash -i|crontab|\.bashrc|LD_PRELOAD|autostart' x
strings -n6 x/usr/bin/lib/libapp.so | grep -oE 'https?://[A-Za-z0-9._/-]+' | sort -u
curl -fsSLo gtk.zip https://storage.googleapis.com/flutter_infra_release/flutter/cf636b1dfb818dd6a3ff16e390e93b1a036969c8/linux-x64-release/linux-x64-flutter-gtk.zip
7zz e gtk.zip libflutter_linux_gtk.so && sha256sum libflutter_linux_gtk.so x/usr/lib/libflutter_linux_gtk.so

Not covered

  • Nothing was built or run here (runbook Phase 0). The build, check-apply-extra.sh and the rest of pr-checks.yml haven't run on this head yet (see top).
  • SecureMark's Dart source wasn't audited (Tier 1). I read only the call sites for processes, HTTP and updates.
  • libapp.so, the plugin .sos and libpdfium.so can't be matched to a canonical upstream artifact, beyond being built by upstream CI. The bundled Ubuntu libs in usr/lib/ weren't hash-matched against Ubuntu packages.
  • Network sharing, printing and the advanced modes, as the PR says.

Notes (non-blocking)

  • Upstream re-uploads assets under an existing tag. The v3.0.0 assets were replaced on 2026-10-27 from master 231980cc, a week after the release, and the tag still points at 335e6d51. update-pins.mjs re-pins from the GitHub asset digest when that happens again, so nothing is needed here. But if a re-upload races an install, the install will fail on the sha256 check until the bot's re-pin lands.
  • The HTTPS share mode calls the openssl CLI (certificate_manager.dart:85). org.gnome.Platform//51 ships /usr/bin/openssl, so it should work once --share=network is added. It's untested, as the PR says.

@jing2uo
jing2uo merged commit 32e041e into flatpark:main Nov 7, 2026
@rhgKc2yp
rhgKc2yp deleted the add/org.ginies.secure_mark branch November 7, 2026 06:45
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