[Feature] Integrity verification

Aperta
#35 12 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Ambito
documentation

Direzione di ricerca

Inizia leggendo la specifica attuale del formato AppImage e le issue collegate di AppImageSpec #29 e #34. Confronta gli approcci proposti basati su MD5, dimensione del file e CRC, quindi stabilisci quale meccanismo di integrità dovrebbe adottare la specifica e come verrà verificato il completamento.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

wontfix

AppImages are files which can get really big in size, and download errors can occur with such sizes
I propose to add some way to (at least try to) verify it's integrity at launch

Why ?
As of now, a partially downloaded AppImage will fail to launch with

Something went wrong trying to read the squashfs image.

Cannot mount AppImage, please check your FUSE setup.
You might still be able to extract the contents of this AppImage 
if you run it with the --appimage-extract option. 
See https://github.com/AppImage/AppImageKit/wiki/FUSE 
for more information
open dir error: No such file or directory

It is maybe harmless in this case, but I think it could potentially cause problems if the partially downloaded AppImage seems like a legit squashfs image. (This is only a theory, I do not have any proof this can happen)

Implementation propositions :

  • Use https://github.com/AppImage/AppImageSpec/issues/29 and verify the md5sum of the AppImage on launch.
    Cons : as pointed there, that would be costly. Plus, I'm not sure if this section is actually going to be in the specification
  • Store the file size in bytes in an ELF section, maybe .appimage_size, and verify the size of the executed file is the same
    Cons : some programs might zerofill the file and fill bytes as their download them
  • Store a CRC checksum in an ELF section, maybe .crc_checksum, and verify it. I think that's the best option, because CRC is an algorithm made for file integrity (as opposed to a simple file size verification), and is more lightweight than MD5

I think this feature should be looked at before https://github.com/AppImage/AppImageSpec/issues/34 (because well, it would modify the spec)

Lingua principale
Nessun dato sulla lingua
Stelle
94
Fork
30
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di AppImage/AppImageSpec

Tutte le issue di AppImage/AppImageSpec

Issue simili

Altre issue su Documentation

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.