Fixes T5466. An image is an example of a binary which should not be executable. Modify the ArcanistChmodLinter to disallow certain blacklisted MIME types from being executable.
Details
Details
- Reviewers
epriestley - Group Reviewers
Blessed Reviewers - Maniphest Tasks
- T5466: `ArcanistChmodLinter` does not raise an error on images that are executable
- Commits
- rARC5ab288b30c36: `ArcanistChmodLinter` should not allow certain MIME types to be executable
Created an executable image file and ran arc lint over this file.
Diff Detail
Diff Detail
- Repository
- rARC Arcanist
- Branch
- chmod-images
- Lint
Lint Passed - Unit
Tests Passed - Build Status
Buildable 1390 Build 1390: [Placeholder Plan] Wait for 30 Seconds
Event Timeline
Comment Actions
You could presumably also use identify from ImageMagick. Probably overkill though.
(other thought: it should be clear to users that exif is needed to lint image+executable. I wouldn't expect users to find out on their own)
Comment Actions
Yeah, I suppose we could mention in the help text. Although I'd probably prefer to have a few alternatives that could be used without the Exif extension (I don't expect users to want to install an extension just for a linter)
Comment Actions
I suppose that we could, I thought that you were against using the MIME type (D9187#8) but, upon a second reading, I think that you were referring to non-binary files. FWIW, exif_imagetype seems to work on most image types AFAICT.