Skip to content
Snippets Groups Projects

Hatchery support

Closed Renze requested to merge renze/hatchery_apps into master
3 unresolved threads

Add app directories to the path and change menu to use the provided metadata.

ELF apps are listed, but people can also include them with apps. I think they should be published in the hatchery together with an init.py containing something like:

import os
os.exec("/apps/myapp/mybinary.elf")

It lists all ELF files found in /elf

Edited by Renze

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
13 24
14 25 def list_apps():
15 """Create a list of available apps."""
16 apps = sorted(os.listdir("."))
17
18 # Filter for apps
19 apps = [app for app in apps if app.endswith(".elf") or app.endswith(".py")]
20
21 if "menu.py" in apps:
22 apps.remove("menu.py")
26 """Create a list of available apps."""
27 appFolders = sorted(os.listdir("/apps"))
28
29 apps = []
30 for appFolder in appFolders:
31 apps.append([appFolder, read_metadata(appFolder)])
  • Renze added 1 commit

    added 1 commit

    Compare with previous version

  • Sorry, it looks like this Merge Request has some code quality issues!

    The pipeline lint has failed - look at its failure output to understand what sort of diffs we'd like you to apply.

    You can also use tools/code-style.sh to fix files that have issues.

    Good luck! I will update this comment when I detect you have applied your fixes.

  • Renze changed the description

    changed the description

  • Author Developer

    Maybe you should blacklist python from writing to any .elf file, that would solve the virus problem for now. Also prevent writing to the firmware update file from python, unless you want people to fuck around with that...

  • I don't think we should try to build a fake sense of security into this. If some script wants to be malicious it has all the possibilities it wants. We can't protect against that anyway.

    The main rationale behind the whole elf story for me was, that I want to at least give people certainty about the source-code of the binary blob; If we just allow uploading random blobs, there is no guarantee about what sources it was built from and thus you don't have the option to look at the sources and evaluate for yourself whether that looks legit.

    If we only allow uploading source-files which are then built (and optionally signed) by some CI-server, you at least know how the C-code looks which the l0dable was built from.

  • Daniel Hoffend mentioned in merge request !143 (merged)

    mentioned in merge request !143 (merged)

  • Based of your work, we've implemented https://git.card10.badge.events.ccc.de/card10/firmware/merge_requests/143

    For now we will work on some opt-in feature for elfs, until we have working infrastructure.

  • closed

  • Please register or sign in to reply
    Loading