Bug#884095: flag to force file types

Hans-Christoph Steiner hans at eds.org
Wed Mar 21 14:52:30 UTC 2018


Chris Lamb:
> severity 884095 wishlist
> thanks
> 
> Hi hc,
> 
>> Something like --force=apk would solve both.
> 
> So, I'm a little nervous about introducing such a directive.
> 
> This is primarily in terms that diffoscope should really just Do The
> Right Thing by default in all cases and not need magic flags to get a
> the desired result. :)
> 
> This is just a better user experience but also has real practical
> implications; it is not tidy (or even possible) to specify such flags
> in automated or hosted CI environments such as tests.reproducible-builds.org, try.diffoscope.org. Travis CI, etc. on a per-package basis.
> 
> Whilst we might have other flags that you could point to that would
> violate this informal "rule", I would certainly cheer their removal.
> 
> (There are also — entirely secondary — concerns around whether this
> flag would change the behaviour in nested files as well, but we can
> leave that for now..)
> 
> Have we really exhausted the detection route for this? :)
> 
> 
> Regards,
> 

I think the detection route has been exhausted.  It seems that no one
wants to do what it takes to reliably detect APKs.  I understand why
libfile does not want to include more elaborate checks like:

* ZIP file
* with AndroidManifest.xml in it

There are also often cases when working with malware samples that they
are deliberately created to avoid being detected as APKs, for example
the "Janus" vuln https://github.com/odensc/janus.  That works by making
the APK seem like a DEX file.



More information about the Reproducible-builds mailing list