Repository navigation
feat(photoncam): add PhotonCAM, laser cutting and engraving CAM (io.github.pietini69.photoncam) - #934
Conversation
…ithub.pietini69.photoncam) Co-authored-by: Cursor <[email protected]>
jing2uo
left a comment
There was a problem hiding this comment.
Thanks for the package — the build side looks solid. I read through upstream's v1.2.8 source and found a few runtime issues the diff alone doesn't show. The two that need fixing before merge are settings persistence (~/.config/laser_burn) and the web remote's unauthenticated curl | bash update endpoint, which contradicts the "no in-app update download" claim. Details inline.
… from Exec= - Grant ~/.config/laser_burn: upstream hardcodes it for settings, the material palette and camera calibration, which were lost on restart. - Grant ~/Documents:create next to xdg-documents: upstream hardcodes $HOME/Documents for the material library and traffic log and falls back to the tmpfs $HOME on a localized desktop. - Drop --share=network: it only serves the opt-in web remote, which binds 0.0.0.0 without auth and exposes a curl | bash update endpoint. Documented as an override in the metainfo, with --reset. - Drop --device=dri (covered by --device=all); disclose cameras. - apply_extra: take the binary name from the archive's .desktop Exec=. - resolve-update: reject malformed versions like "1.2." in the regex. - License is GPL-3.0-only, as upstream states.
|
I pushed two commits on top of yours that fix everything from the review (aa02f40, bfd0cae): Sandbox (
Metainfo
Scripts
Checked: If you'd rather ship the web remote enabled by default, say so and argue for it in the PR body; a broad grant kept in |
There was a problem hiding this comment.
Review: PhotonCAM (io.github.pietini69.photoncam) at 2db11d10
Verdict: PASS. Ready to merge once CI is green on the latest commit.
The only high-risk grant is --device=all. It is declared in policy.dangerous_permissions with a justification and accepted: GRBL and Ruida controllers are on /dev/ttyUSB* and /dev/ttyACM*, and Flatpak has no narrower grant for them. All findings from the first review are fixed in aa02f40 and bfd0cae (summary in the comments above), and their threads are resolved. 2db11d1 grants --share=network by default again, for the Raspberry Pi controller link (see the follow-up comment).
Legend: ✅ pass · ❌ fail ·
| # | Phase | Check | Tier | Verdict | Evidence |
|---|---|---|---|---|---|
| 0 | Safety | Static-only; artifacts handled in an isolated dir | ★ | ✅ | Artifact fetched as bytes into a scratch dir, listed before extracting, extracted with --no-same-owner --no-same-permissions --no-xattrs, and analysed statically. Because the maintainer commits change the package, the maintainer also ran the packager-side checks on them: check-apply-extra, publish.sh --verify, and photoncam -V in the sandbox. |
| 1.1 | Scope | Classified | ★ | ✅ | New app: 8 files, all under registry/io.github.pietini69.photoncam/ |
| 1.2 | Scope | High-scrutiny surface | ★ | ✅ | Nothing under .github/, scripts/ or config/. The resolver is in a brand-new app dir. |
| 2.1 | Provenance | Submitter | ★ | ✅ | 3ddruck12, account from 2021-05, 34 public repos. Nine merged FlatPark listings (#581, #582, #629, #634, #793, #815, #852, #907, #930). |
| 2.2 | Provenance | Source repo age, corroboration | ★ | pietini69/photoncam, not a fork. First commit 2026-10-25, 82 commits from a single author, 3 stars, 7 releases (v1.0.0 to v1.2.8). It was renamed from LaserBurn. The project is young with little outside corroboration, which is informational only: the owner account dates from 2018, history is steady, and the IOC scan is clean. |
|
| 2.3 | Provenance | Commit identity | ★ | ✅ | 3ddruck <[email protected]>. The maintainer commits are Komh <[email protected]>. |
| 2.4 | Provenance | Timeline plausible | ★ | ✅ | Account 2018, then repo 2026-10-25, then v1.2.8 on 2026-10-31 after 82 commits. Not hours apart. |
| 2.5 | Provenance | Trust tier | ★ | ✅ | Submitter: established. Upstream: unknown-but-plausible. |
| 2.6 | Provenance | Artifact tier | ★ | ✅ | Tier 1: GPL-3.0, official upstream build |
| 3.1 | Manifest | Source types | ★ | ✅ | One extra-data source with sha256: f4b76afc…c386f and size: 8104053. The rest are local file sources. No git or archive. |
| 3.1b | Manifest | Nothing remote in /app |
★ | ✅ | build-commands only install local files (.yml:38-43). The payload is extra-data. |
| 3.2 | Manifest | finish-args | ★ | 👤→✅ | ipc, wayland, fallback-x11, --device=all (declared and accepted), --share=network (Raspberry Pi controller link, web remote), xdg-documents, ~/Documents:create, ~/.config/laser_burn:create. No escape permissions. Each grant has a comment explaining it. |
| 3.3 | Manifest | policy: honest |
★ | ✅ | proprietary: false is correct. dangerous_permissions lists --device=all, the only high-risk grant. |
| 3.4 | Manifest | Install-only, payload unmodified | ★ | ✅ | apply_extra.sh unpacks with bsdtar and moves the folder. It adds a symlink only if upstream renames the binary. The wrapper is a single exec line. No patch, no sed, nothing injected. |
| 3.4b | Manifest | packaging: |
★ | ✅ | None needed: the wrapper sets nothing, and there is no injected code, host command or sandbox-off. audit-descriptor.mjs exits 0. |
| 3.5 | Manifest | Genuine upstream | ★ | ✅ | github.com/pietini69/photoncam (fork: false) |
| 3.6 | Manifest | app-id | ★ | ✅ | io.github.pietini69 matches the GitHub owner. The metainfo labels it an unaffiliated community package. |
| 3.7 | Manifest | update.command |
★ | ✅ | ./resolve-update.sh |
| 3.8 | Manifest | Download host | ★ | ✅ | github.com/pietini69/photoncam/releases/download/v1.2.8/PhotonCAM-1.2.8-linux-x86_64.tar.gz |
| 3.9 | Manifest | Optional caps as overrides | ★ | ✅ | --filesystem=home is an override in the metainfo, with --reset. --share=network stays in finish-args because a Raspberry Pi controller link is one of the two connection types (gui/mod.rs:9008-9015), and --unshare=network is offered for USB-only setups. Justified in the PR thread. |
| 3.10 | Manifest | PR body: what was tested | ★ | Thorough: the GUI opened a project, CLI demo → gcode produced 263 lines of G-code, WM_CLASS is photoncam, which matches StartupWMClass. Nothing was sent to a controller, which is stated. The Sandbox section still says "There is no in-app update download", which is wrong. |
|
| 4.1 | Runtime | No runtime fetch-and-exec | ★ | The web remote's POST /api/system/update runs curl … install_pi_bridge.sh | bash from upstream master (src/server/mod.rs:284-292), with no authentication and bound to 0.0.0.0 (:193). It is not a core mechanism. The web remote only runs after the user starts it from the app (web_remote_active defaults to false, gui/mod.rs:506, started only from its button at :9893), and the metainfo discloses the exposure. Worth reporting upstream. |
|
| 4.2 | Runtime | Resolver reviewed as code | ★ | ✅ | Read-only GitHub API call (GITHUB_TOKEN sent only as a header to api.github.com), then jq. No eval, no writes, output is JSON on stdout. The version regex was tightened in aa02f40. |
| 4.3 | Runtime | Endpoints; filesystem×network | ★ | ✅ | Endpoints when network is enabled: raw.githubusercontent.com (the update script above), a UDP connect to 8.8.8.8:80 for local-IP detection with no traffic sent (server/mod.rs:79), a LAN listener, and TCP to the Pi bridge on port 2323. Network is granted alongside --device=all and Documents. Nothing listens until the user starts the web remote, and the app makes no outbound connection otherwise except to a Pi bridge the user configures. Accepted for the Pi controller link. |
| 5.1 | Artifact | sha256 == pin | ★ | ✅ | Re-fetched: f4b76afc62d36e28e3a9a1eca9513f18986689d809dc884eaff358c09e3c386f, 8104053 bytes. This equals the manifest pin and GitHub's asset digest. |
| 5.2 | Artifact | Inspected per type | ★ | ✅ | tar.gz with one top-level dir. Entries: photoncam (0755), PhotonCAM.desktop, photoncam.png, ._photoncam.png (AppleDouble), README.txt. No traversal, symlinks or setuid. |
| 5.3 | Artifact | Nothing injected, no vendor file changed | 1 | ✅ | Files are only moved and the folder renamed, with an optional symlink. The binary is untouched. |
| 5.4 | Artifact | Shipped == official | ★ | ✅ | Same hash as 5.1. check-apply-extra and publish.sh --verify install that tarball unchanged. |
| 5.5 | Artifact | Bundled runtimes | ★ | ➖ | Single Rust ELF with no bundled runtime |
| 5.6 | Artifact | IOC scan | ★ | ✅ | NEEDED: libc, libm, libpthread, libdl, ld-linux only. No RPATH or RUNPATH, no embedded ELF. No persistence, miner or reverse-shell strings. Hardcoded IPs: 8.8.8.8 (see 4.3) and 192.168.68.90, which appears in a unit test and in help text. Spawned commands: bash (the update endpoint), xdg-open, and the macOS-only open, explorer and shortcuts. |
| 6.1 | Compliance | Purpose | ★ | ✅ | Laser cutting and engraving CAM |
| 6.2 | Compliance | Non-FOSS not a reason | ★ | ➖ | GPL-3.0 |
| 7.1 | Verdict | Overall | ★ | ✅ | PASS (--device=all accepted by a maintainer) |
| 7.2 | Verdict | Hard-fail triggers | ★ | ✅ | None |
| 7.3 | Verdict | Recommendation only | ★ | ✅ | A human merges |
Read, file by file
flatpark.yml: the descriptor. The policy block covers--device=all,upstream_approved: false.io.github.pietini69.photoncam.yml: runtimeorg.freedesktop.Platform//26.08, finish-args as in 3.2, install-only module (.yml:38-43), managed extra-data block.apply_extra.sh: offline unpack, one top-level directory, binary name taken fromExec=.photoncam-wrapper:exec /app/extra/photoncam/photoncam "$@".resolve-update.sh: see 4.2..desktop:Exec=photoncam %f,StartupWMClass=photoncam..metainfo.xml: passesappstreamcli validate --no-net. Has the community-package line, the sandbox and web-remote disclosure, and the overrides..png: 512×512 icon.- Upstream v1.2.8 source (for runtime behaviour):
src/server/mod.rs,src/device/mod.rs,src/material/mod.rs,src/document/mod.rs,src/camera/mod.rs,src/gui/mod.rs, read where they touch paths, the network and spawned processes.
Reproduce
node scripts/audit-descriptor.mjs registry/io.github.pietini69.photoncam/flatpark.yml
flatpak run --command=appstreamcli --filesystem="$PWD" org.flatpak.Builder validate --no-net "$PWD/registry/io.github.pietini69.photoncam/io.github.pietini69.photoncam.metainfo.xml"
(cd registry/io.github.pietini69.photoncam && ./resolve-update.sh)
./scripts/check-apply-extra.sh io.github.pietini69.photoncam
./scripts/publish.sh --verify io.github.pietini69.photoncam
curl -fsSL -o pc.tar.gz https://github.com/pietini69/photoncam/releases/download/v1.2.8/PhotonCAM-1.2.8-linux-x86_64.tar.gz && sha256sum pc.tar.gz && bsdtar -tvf pc.tar.gzNot covered
- The app's source was not audited. It was only read where it bears on sandbox behaviour.
- Untested: sending a job to a real controller, the camera, and the GUI save flow after the new grants. The web remote, iPad bridge and Pi-bridge link were not exercised.
- CI on the maintainer commits (aa02f40, bfd0cae, 2db11d1) is waiting for maintainer approval of the fork run. The last green run was on f17a1b6.
…ler link A controller behind a Raspberry Pi running PhotonCAM Bridge is one of the two connection types, so the network serves the main feature. The web remote with its unauthenticated update endpoint only runs after the user starts it; the metainfo keeps that disclosure and offers --unshare=network for USB-only setups.
|
Follow-up (2db11d1):
The manifest comment says why network is granted. The metainfo still explains what the web remote exposes while it runs. The network override is replaced by The Sandbox section of the PR description is accurate again on network. Only the line "There is no in-app update download" is still wrong. |
Summary
io.github.pietini69.photoncam), a laser cutting and engraving CAM.PhotonCAM-1.2.8-linux-x86_64.tar.gz, unpacked withbsdtar --no-same-owner --no-xattrs. It runs onorg.freedesktop.Platform//26.08. The Linux build is not rebuilt.PhotonCAM-<version>-linux-x86_64.tar.gz. Older LaserBurn-named archives, and the macOS, Windows and Raspberry Pi files on the same release, are skipped.Sandbox
--device=allis declared underpolicy.dangerous_permissions. GRBL and Ruida controllers are USB serial ports, and Flatpak has no narrower device for/dev/ttyUSB*and/dev/ttyACM*.flatpak override --user --filesystem=home io.github.pietini69.photoncam.Tested
appstreamcli validate --no-net, and the resolver (1.2.8, that tarball).check-apply-extraunpacked the archive as root with no capabilities.publish.sh --verifybuilt the app and installed it from the local signed repo.lddreported no missing libraries.photoncam -Vprinted 1.2.8.photoncam demowrote a LightBurn project.photoncam gcodeturned it into 263 lines of GRBL G-code, includingM4andG1moves. The file was not sent to a controller.WM_CLASSisphotoncam.Flathub
Not published on Flathub.
io.github.pietini69.photoncamreturns 404 from the Flathub appstream API.Made with Cursor