Bug 1542149 - Add some MacOS file extensions to to the list of executable extensions in download protection. r=Gijs

Here are the file extensions are added to the list:
1. action
2. caction
3. configprofile
4. definition
5. dylib
6. internetconnect
7. networkconnect
8. service
9. wflow
10.workflow

Differential Revision: https://phabricator.services.mozilla.com/D26284

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Dimi Lee 2019-04-05 12:04:49 +00:00
Родитель 33e3a6dedd
Коммит fe3a1447b2
3 изменённых файлов: 94 добавлений и 76 удалений

Просмотреть файл

@ -162,7 +162,7 @@ const char* const ApplicationReputationService::kBinaryFileExtensions[] = {
//".001", //".001",
//".7z", //".7z",
//".ace", //".ace",
//".action", // Mac script ".action", // Mac script
//".ad", exec // Windows //".ad", exec // Windows
//".ade", exec // MS Access //".ade", exec // MS Access
//".adp", exec // MS Access //".adp", exec // MS Access
@ -193,6 +193,7 @@ const char* const ApplicationReputationService::kBinaryFileExtensions[] = {
".bz2", // Linux archive (bzip2) ".bz2", // Linux archive (bzip2)
".bzip2", // Linux archive (bzip2) ".bzip2", // Linux archive (bzip2)
".cab", // Windows archive ".cab", // Windows archive
".caction", // Automator action
".cdr", // Mac disk image ".cdr", // Mac disk image
".cfg", // Windows ".cfg", // Windows
".chi", // Windows Help ".chi", // Windows Help
@ -200,10 +201,11 @@ const char* const ApplicationReputationService::kBinaryFileExtensions[] = {
".class", // Java ".class", // Java
//".cmd", exec // Windows executable //".cmd", exec // Windows executable
//".com", exec // Windows executable //".com", exec // Windows executable
".command", // Mac script ".command", // Mac script
".cpgz", // Mac archive ".configprofile", // Configuration file for Apple systems
".cpi", // Control Panel Item. Executable used for adding icons ".cpgz", // Mac archive
// to Control Panel ".cpi", // Control Panel Item. Executable used for adding icons
// to Control Panel
//".cpio", //".cpio",
//".cpl", exec // Windows executable //".cpl", exec // Windows executable
//".crt", exec // Windows signed certificate //".crt", exec // Windows signed certificate
@ -213,6 +215,7 @@ const char* const ApplicationReputationService::kBinaryFileExtensions[] = {
".dart", // Mac disk image ".dart", // Mac disk image
".dc42", // Apple DiskCopy Image ".dc42", // Apple DiskCopy Image
".deb", // Linux package ".deb", // Linux package
".definition", // Automator action
".desktop", // A shortcut that runs other files ".desktop", // A shortcut that runs other files
".dex", // Android ".dex", // Android
".dht", // HTML ".dht", // HTML
@ -232,6 +235,7 @@ const char* const ApplicationReputationService::kBinaryFileExtensions[] = {
".dotx", // MS Word ".dotx", // MS Word
".drv", // Windows driver ".drv", // Windows driver
".dvdr", // Mac Disk image ".dvdr", // Mac Disk image
".dylib", // Mach object dynamic library file
".efi", // Firmware ".efi", // Firmware
".eml", // MS Outlook ".eml", // MS Outlook
//".exe", exec // Windows executable //".exe", exec // Windows executable
@ -255,6 +259,7 @@ const char* const ApplicationReputationService::kBinaryFileExtensions[] = {
//".inf", exec // Windows installer //".inf", exec // Windows installer
".ini", // Generic config file ".ini", // Generic config file
//".ins", exec // IIS config //".ins", exec // IIS config
".internetconnect", // Configuration file for Apple system
//".inx", // InstallShield //".inx", // InstallShield
".iso", // CD image ".iso", // CD image
//".isp", exec // IIS config //".isp", exec // IIS config
@ -315,7 +320,8 @@ const char* const ApplicationReputationService::kBinaryFileExtensions[] = {
//".msi", exec // Windows installer //".msi", exec // Windows installer
//".msp", exec // Windows installer //".msp", exec // Windows installer
//".mst", exec // Windows installer //".mst", exec // Windows installer
".ndif", // Mac disk image ".ndif", // Mac disk image
".networkconnect", // Configuration file for Apple systems
//".ntfs", // 7z //".ntfs", // 7z
".ocx", // ActiveX ".ocx", // ActiveX
//".ops", exec // MS Office //".ops", exec // MS Office
@ -411,6 +417,7 @@ const char* const ApplicationReputationService::kBinaryFileExtensions[] = {
//".sct", exec // Windows shell //".sct", exec // Windows shell
".search-ms", // Windows ".search-ms", // Windows
".seplugin", // AppleScript ".seplugin", // AppleScript
".service", // Systemd service unit file
//".settingcontent-ms", exec // Windows settings //".settingcontent-ms", exec // Windows settings
".sh", // Linux shell ".sh", // Linux shell
".shar", // Linux shell ".shar", // Linux shell
@ -474,9 +481,10 @@ const char* const ApplicationReputationService::kBinaryFileExtensions[] = {
//".vtx", exec // MS Visio //".vtx", exec // MS Visio
//".wav", //".wav",
//".webp", //".webp",
".website", // Windows ".website", // Windows
".wim", // Windows Imaging ".wflow", // Automator action
//".workflow", // Mac Automator ".wim", // Windows Imaging
".workflow", // Mac Automator
//".wrc", // FreeArc archive //".wrc", // FreeArc archive
//".ws", exec // Windows script //".ws", exec // Windows script
//".wsc", exec // Windows script //".wsc", exec // Windows script

Просмотреть файл

@ -29,9 +29,9 @@ class ApplicationReputationService final
public: public:
static const char* const kNonBinaryExecutables[2]; static const char* const kNonBinaryExecutables[2];
#ifdef XP_WIN #ifdef XP_WIN
static const char* const kBinaryFileExtensions[176]; static const char* const kBinaryFileExtensions[186];
#else #else
static const char* const kBinaryFileExtensions[175]; static const char* const kBinaryFileExtensions[185];
#endif #endif
static already_AddRefed<ApplicationReputationService> GetSingleton(); static already_AddRefed<ApplicationReputationService> GetSingleton();

Просмотреть файл

@ -9,12 +9,13 @@
// PLEASE read the comment in ApplicationReputation.cpp before modifying this // PLEASE read the comment in ApplicationReputation.cpp before modifying this
// list. // list.
static const char* const kTestFileExtensions[] = { static const char* const kTestFileExtensions[] = {
".ad", // Windows (ignored for app rep) ".action", // Nac script
".ade", // MS Access ".ad", // Windows (ignored for app rep)
".adp", // MS Access ".ade", // MS Access
".air", // Adobe Air (ignored for app rep) ".adp", // MS Access
".apk", // Android package ".air", // Adobe Air (ignored for app rep)
".app", // Executable application ".apk", // Android package
".app", // Executable application
".applescript", ".applescript",
".application", // MS ClickOnce ".application", // MS ClickOnce
".appref-ms", // MS ClickOnce ".appref-ms", // MS ClickOnce
@ -25,65 +26,69 @@ static const char* const kTestFileExtensions[] = {
".bash", // Linux shell ".bash", // Linux shell
".bat", // Windows shell ".bat", // Windows shell
".bin", ".bin",
".btapp", // uTorrent and Transmission ".btapp", // uTorrent and Transmission
".btinstall", // uTorrent and Transmission ".btinstall", // uTorrent and Transmission
".btkey", // uTorrent and Transmission ".btkey", // uTorrent and Transmission
".btsearch", // uTorrent and Transmission ".btsearch", // uTorrent and Transmission
".btskin", // uTorrent and Transmission ".btskin", // uTorrent and Transmission
".bz", // Linux archive (bzip) ".bz", // Linux archive (bzip)
".bz2", // Linux archive (bzip2) ".bz2", // Linux archive (bzip2)
".bzip2", // Linux archive (bzip2) ".bzip2", // Linux archive (bzip2)
".cab", // Windows archive ".cab", // Windows archive
".cdr", // Mac disk image ".caction", // Automator action
".cfg", // Windows ".cdr", // Mac disk image
".chi", // Windows Help ".cfg", // Windows
".chm", // Windows Help ".chi", // Windows Help
".class", // Java ".chm", // Windows Help
".cmd", // Windows executable ".class", // Java
".com", // Windows executable ".cmd", // Windows executable
".command", // Mac script ".com", // Windows executable
".cpgz", // Mac archive ".command", // Mac script
".cpi", // Control Panel Item. Executable used for adding icons ".configprofile", // Configuration file for Apple systems
// to Control Panel ".cpgz", // Mac archive
".cpl", // Windows executable ".cpi", // Control Panel Item. Executable used for adding icons
".crt", // Windows signed certificate // to Control Panel
".crx", // Chrome extensions ".cpl", // Windows executable
".csh", // Linux shell ".crt", // Windows signed certificate
".dart", // Mac disk image ".crx", // Chrome extensions
".dc42", // Apple DiskCopy Image ".csh", // Linux shell
".deb", // Linux package ".dart", // Mac disk image
".desktop", // A shortcut that runs other files ".dc42", // Apple DiskCopy Image
".dex", // Android ".deb", // Linux package
".dht", // HTML ".definition", // Automator action
".dhtm", // HTML ".desktop", // A shortcut that runs other files
".dhtml", // HTML ".dex", // Android
".diskcopy42", // Apple DiskCopy Image ".dht", // HTML
".dll", // Windows executable ".dhtm", // HTML
".dmg", // Mac disk image ".dhtml", // HTML
".dmgpart", // Mac disk image ".diskcopy42", // Apple DiskCopy Image
".doc", // MS Office ".dll", // Windows executable
".docb", // MS Office ".dmg", // Mac disk image
".docm", // MS Word ".dmgpart", // Mac disk image
".docx", // MS Word ".doc", // MS Office
".dot", // MS Word ".docb", // MS Office
".dotm", // MS Word ".docm", // MS Word
".dott", // MS Office ".docx", // MS Word
".dotx", // MS Word ".dot", // MS Word
".drv", // Windows driver ".dotm", // MS Word
".dvdr", // Mac Disk image ".dott", // MS Office
".efi", // Firmware ".dotx", // MS Word
".eml", // MS Outlook ".drv", // Windows driver
".exe", // Windows executable ".dvdr", // Mac Disk image
".fon", // Windows font ".dylib", // Mach object dynamic library file
".fxp", // MS FoxPro ".efi", // Firmware
".gadget", // Windows ".eml", // MS Outlook
".grp", // Windows ".exe", // Windows executable
".gz", // Linux archive (gzip) ".fon", // Windows font
".gzip", // Linux archive (gzip) ".fxp", // MS FoxPro
".hfs", // Mac disk image ".gadget", // Windows
".hlp", // Windows Help ".grp", // Windows
".hqx", // Mac archive ".gz", // Linux archive (gzip)
".hta", // HTML trusted application ".gzip", // Linux archive (gzip)
".hfs", // Mac disk image
".hlp", // Windows Help
".hqx", // Mac archive
".hta", // HTML trusted application
".htm", ".html", ".htm", ".html",
".htt", // MS HTML template ".htt", // MS HTML template
".img", // Mac disk image ".img", // Mac disk image
@ -91,6 +96,7 @@ static const char* const kTestFileExtensions[] = {
".inf", // Windows installer ".inf", // Windows installer
".ini", // Generic config file ".ini", // Generic config file
".ins", // IIS config ".ins", // IIS config
".internetconnect", // Configuration file for Apple system
".iso", // CD image ".iso", // CD image
".isp", // IIS config ".isp", // IIS config
".jar", // Java ".jar", // Java
@ -137,6 +143,7 @@ static const char* const kTestFileExtensions[] = {
".msp", // Windows installer ".msp", // Windows installer
".mst", // Windows installer ".mst", // Windows installer
".ndif", // Mac disk image ".ndif", // Mac disk image
".networkconnect", // Configuration file for Apple system
".ocx", // ActiveX ".ocx", // ActiveX
".ops", // MS Office ".ops", // MS Office
".osas", // AppleScript ".osas", // AppleScript
@ -188,6 +195,7 @@ static const char* const kTestFileExtensions[] = {
".sct", // Windows shell ".sct", // Windows shell
".search-ms", // Windows ".search-ms", // Windows
".seplugin", // AppleScript ".seplugin", // AppleScript
".service", // Systemd service unit file
".settingcontent-ms", // Windows settings ".settingcontent-ms", // Windows settings
".sh", // Linux shell ".sh", // Linux shell
".shar", // Linux shell ".shar", // Linux shell
@ -242,7 +250,9 @@ static const char* const kTestFileExtensions[] = {
".vsx", // MS Visio ".vsx", // MS Visio
".vtx", // MS Visio ".vtx", // MS Visio
".website", // Windows ".website", // Windows
".wflow", // Automator action
".wim", // Windows Imaging ".wim", // Windows Imaging
".workflow", // Mac Automator
".ws", // Windows script ".ws", // Windows script
".wsc", // Windows script ".wsc", // Windows script
".wsf", // Windows script ".wsf", // Windows script