├── templates ├── error.hdbs ├── layout.hdbs ├── loading_screen.hdbs ├── secure.hdbs └── unsecure.hdbs ├── assets ├── error.png ├── logo.png ├── green_tick.png ├── logo-small.png ├── screenshot-0.png ├── screenshot-1.png └── screenshot-2.png ├── README.md ├── manifest.json ├── translations ├── zh-cn.json ├── zh-tw.json ├── ja.json ├── ko.json ├── ar.json ├── cs.json ├── no.json ├── uk.json ├── en-US.json ├── en-ca.json ├── en-gb.json ├── nl.json ├── sv.json ├── de.json ├── fi.json ├── it.json ├── pt-br.json ├── pt.json ├── tr.json ├── es-es.json ├── es.json ├── es-419.json ├── pl.json ├── da.json ├── ru.json ├── hu.json ├── ro.json ├── fr-ca.json ├── fr.json ├── en.json └── en.yml ├── app.css ├── app.js └── LICENSE /templates/error.hdbs: -------------------------------------------------------------------------------- 1 |
2 |

{{message}}

3 |
4 | -------------------------------------------------------------------------------- /assets/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zendesk/attachment_restrictions/master/assets/error.png -------------------------------------------------------------------------------- /assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zendesk/attachment_restrictions/master/assets/logo.png -------------------------------------------------------------------------------- /assets/green_tick.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zendesk/attachment_restrictions/master/assets/green_tick.png -------------------------------------------------------------------------------- /assets/logo-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zendesk/attachment_restrictions/master/assets/logo-small.png -------------------------------------------------------------------------------- /assets/screenshot-0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zendesk/attachment_restrictions/master/assets/screenshot-0.png -------------------------------------------------------------------------------- /assets/screenshot-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zendesk/attachment_restrictions/master/assets/screenshot-1.png -------------------------------------------------------------------------------- /assets/screenshot-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zendesk/attachment_restrictions/master/assets/screenshot-2.png -------------------------------------------------------------------------------- /templates/layout.hdbs: -------------------------------------------------------------------------------- 1 |
2 |
5 |
6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Attachment Restrictions App 2 | 3 | An app that warns when an attachment in the ticket isn't included 4 | in the whitelist. 5 | 6 | 7 | -------------------------------------------------------------------------------- /templates/loading_screen.hdbs: -------------------------------------------------------------------------------- 1 |
2 | {{spinner "dotted"}} 3 |
{{t "global.loading"}}
4 |
5 | -------------------------------------------------------------------------------- /templates/secure.hdbs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
{{t "attachment.secure"}}
5 |
6 |
7 | -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Attachment Restrictions", 3 | "author": { 4 | "name": "Zendesk Labs", 5 | "email": "zendesklabs@zendesk.com" 6 | }, 7 | "defaultLocale": "en", 8 | "private": false, 9 | "location": "ticket_sidebar", 10 | "frameworkVersion": "1.0", 11 | "version": "1.0.0", 12 | "parameters": [ 13 | { 14 | "name": "whitelist", 15 | "type": "multiline" 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /templates/unsecure.hdbs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | {{t "attachment.unsecure.heading"}} 6 |

{{t "attachment.unsecure.body"}}

7 |
8 |
9 |
10 |
11 |

12 | {{t "unsecure_attachments.heading"}} 13 |

14 |
15 |
16 |
    17 | {{#each attachments}} 18 |
  • {{file_name}}
  • 19 | {{/each}} 20 |
21 |
22 |
23 |
24 | -------------------------------------------------------------------------------- /translations/zh-cn.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "name": "Secure Attachments app", 4 | "description": "当存在特定文件扩展名的附件时,此 app 会警告您。", 5 | "parameters": { 6 | "whitelist": { 7 | "label": "白名单", 8 | "helpText": "定义允许专员和用户上传的附件文件格式。(用逗号分隔各扩展名。例如:zip, jpg, gif, png, pdf)" 9 | } 10 | } 11 | }, 12 | "global": { 13 | "error": { 14 | "general": "出错了" 15 | }, 16 | "alert": { 17 | "empty_whitelist": "您尚未指定白名单。工单中的所有附件都将被视为有危险。" 18 | }, 19 | "loading": "正在扫描附件" 20 | }, 21 | "attachment": { 22 | "unsecure": { 23 | "heading": "检测到可能的恶意附件", 24 | "body": "我们已发现此工单中的一个或多个附件可用于传播恶意软件。" 25 | }, 26 | "secure": "附件是安全的" 27 | }, 28 | "unsecure_attachments": { 29 | "heading": "可能的恶意附件" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /translations/zh-tw.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "name": "Secure Attachments app", 4 | "description": "當存在特定副檔名的附檔時,此 app 會警示您。", 5 | "parameters": { 6 | "whitelist": { 7 | "label": "白名單", 8 | "helpText": "定義允許代理和使用者上傳的附檔格式。(用逗號隔開多個副檔名。例如:zip, jpg, gif, png, pdf)" 9 | } 10 | } 11 | }, 12 | "global": { 13 | "error": { 14 | "general": "出錯了" 15 | }, 16 | "alert": { 17 | "empty_whitelist": "您尚未指定白名單。工單中的所有附檔都將被視為有危險。" 18 | }, 19 | "loading": "附檔掃描中" 20 | }, 21 | "attachment": { 22 | "unsecure": { 23 | "heading": "已偵測到潛在惡意程式碼附檔", 24 | "body": "我們已發現此工單中有一個或多個附檔可用於傳播惡意程式碼。" 25 | }, 26 | "secure": "附檔安全" 27 | }, 28 | "unsecure_attachments": { 29 | "heading": "潛在惡意程式碼附檔" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /translations/ja.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "name": "Secure Attachments app", 4 | "description": "このアプリは、特定のファイル拡張子の添付ファイルがある場合に警告します。", 5 | "parameters": { 6 | "whitelist": { 7 | "label": "ホワイトリスト", 8 | "helpText": "エージェントとユーザーがアップロードできる添付ファイルのファイル形式を定義します。(拡張子はカンマで区切ります。例:Zip、jpg、gif、png、pdf)" 9 | } 10 | } 11 | }, 12 | "global": { 13 | "error": { 14 | "general": "問題が発生しました" 15 | }, 16 | "alert": { 17 | "empty_whitelist": "ホワイトリストが指定されていません。チケット内のすべての添付ファイルが危険とみなされます。" 18 | }, 19 | "loading": "添付ファイルのスキャン中" 20 | }, 21 | "attachment": { 22 | "unsecure": { 23 | "heading": "悪質な添付ファイルの可能性があるファイルが検出されました", 24 | "body": "このチケットにマルウェアを拡散させるために使用される1つまたは複数の添付ファイルが見つかりました。" 25 | }, 26 | "secure": "添付ファイルは安全です" 27 | }, 28 | "unsecure_attachments": { 29 | "heading": "悪質な添付ファイルの可能性がある添付ファイル" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /translations/ko.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "name": "Secure Attachments app", 4 | "description": "첨부 파일에 특정 파일 확장자가 있는 경우 이 앱이 경고를 표시합니다.", 5 | "parameters": { 6 | "whitelist": { 7 | "label": "허용 목록", 8 | "helpText": "상담원 및 사용자가 업로드할 수 있는 첨부 파일 형식을 정의합니다. (쉼표로 파일 확장자를 구분합니다. 예: zip, jpg, gif, png, pdf)" 9 | } 10 | } 11 | }, 12 | "global": { 13 | "error": { 14 | "general": "문제가 발생했습니다." 15 | }, 16 | "alert": { 17 | "empty_whitelist": "허용 목록을 지정하지 않았습니다. 이 티켓의 모든 첨부 파일이 위험한 것으로 간주됩니다." 18 | }, 19 | "loading": "첨부 파일 스캔 중" 20 | }, 21 | "attachment": { 22 | "unsecure": { 23 | "heading": "악성 코드가 포함된 첨부 파일이 감지되었습니다.", 24 | "body": "이 티켓에서 악성 코드를 전파하는 데 사용될 수 있는 하나 이상의 첨부 파일을 발견했습니다." 25 | }, 26 | "secure": "첨부 파일은 안전합니다." 27 | }, 28 | "unsecure_attachments": { 29 | "heading": "악성 코드가 포함된 첨부 파일" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /translations/ar.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "name": "تطبيق Secure Attachments", 4 | "description": "يحذرك هذا التطبيق عند وجود تطبيق يحتوي على مرفق بامتداد ملفات معين.", 5 | "parameters": { 6 | "whitelist": { 7 | "label": "قائمة مرغوبة", 8 | "helpText": "عرّف نُسُق ملفات المرفقات التي يُسمح للوكلاء والمستخدمين بتحميلها. (افصل بين الامتدادات بفاصلة. مثال: zip، jpg، png، pdf)" 9 | } 10 | } 11 | }, 12 | "global": { 13 | "error": { 14 | "general": "حدث خطأ ما" 15 | }, 16 | "alert": { 17 | "empty_whitelist": "أنت لم تحدد قائمة مرغوبة. ستعتبر كل المرفقات في تذكرة ما خطرة." 18 | }, 19 | "loading": "جارٍ مسح المرفقات" 20 | }, 21 | "attachment": { 22 | "unsecure": { 23 | "heading": "اكتُشِفَت مرفقات يحتمل أن تكون ضارة", 24 | "body": "لقد اكتشفنا مرفقًا أو أكثر في هذه التذكرة مما يمكن استخدامها لنشر البرامج الضارة." 25 | }, 26 | "secure": "المرفقات آمنة" 27 | }, 28 | "unsecure_attachments": { 29 | "heading": "مرفق/مرفقات يحتمل أن تكون ضارة" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /translations/cs.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "name": "Aplikace Bezpečné přílohy ", 4 | "description": "Tato aplikace vás upozorní, když existují přílohy s určitou příponou souboru.", 5 | "parameters": { 6 | "whitelist": { 7 | "label": "Seznam povolených", 8 | "helpText": "Definujte formáty souborů pro přílohy, které mohou agenti a uživatelé odesílat (přípony oddělujte čárkou, například: zip, jpg, gif, png, pdf)" 9 | } 10 | } 11 | }, 12 | "global": { 13 | "error": { 14 | "general": "Něco se nepovedlo" 15 | }, 16 | "alert": { 17 | "empty_whitelist": "Neurčili jste seznam povolených. Všechny přílohy v tiketu budou považovány za nebezpečné." 18 | }, 19 | "loading": "Skenování příloh" 20 | }, 21 | "attachment": { 22 | "unsecure": { 23 | "heading": "Zjištěny potenciálně škodlivé přílohy", 24 | "body": "V tomto tiketu jsme našli jednu nebo více příloh, který by mohly sloužit k šíření malwaru." 25 | }, 26 | "secure": "Přílohy jsou bezpečné" 27 | }, 28 | "unsecure_attachments": { 29 | "heading": "Potenciálně škodlivé přílohy" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /translations/no.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "name": "Secure Attachments app", 4 | "description": "Denne appen advarer deg når det finnes vedlegg med en bestemt filutvidelse.", 5 | "parameters": { 6 | "whitelist": { 7 | "label": "Hvitelisting", 8 | "helpText": "Definer filformatet til vedleggene som kundekonsulentene og brukerne kan laste opp. (Skill utvidelsene fra hverandre med et komma. For eksempel: zip, jpg, gif, png, pdf)" 9 | } 10 | } 11 | }, 12 | "global": { 13 | "error": { 14 | "general": "Noe gikk galt" 15 | }, 16 | "alert": { 17 | "empty_whitelist": "Du har ikke angitt en hviteliste. Alle vedlegg i saken blir ansett som farlig." 18 | }, 19 | "loading": "Skanner vedlegg" 20 | }, 21 | "attachment": { 22 | "unsecure": { 23 | "heading": "Fant potensielt skadelige vedlegg", 24 | "body": "Vi fant ett eller flere vedlegg i denne saken som kanskje kan brukes til å spre skadelig programvare." 25 | }, 26 | "secure": "Vedleggene er sikre" 27 | }, 28 | "unsecure_attachments": { 29 | "heading": "Potensielt skadelig(e) vedlegg" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /translations/uk.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "name": "Secure Attachments app", 4 | "description": "This app warns you when attachments with a certain file extension exist.", 5 | "parameters": { 6 | "whitelist": { 7 | "label": "Whitelist", 8 | "helpText": "Define the file formats for attachments that agents and users are allowed to upload. (Separate extensions with a comma. For example: zip, jpg, gif, png, pdf)" 9 | } 10 | } 11 | }, 12 | "global": { 13 | "error": { 14 | "general": "Something went wrong" 15 | }, 16 | "alert": { 17 | "empty_whitelist": "You have not specified a whitelist. All attachments in a ticket will be considered dangerous." 18 | }, 19 | "loading": "Scanning attachments" 20 | }, 21 | "attachment": { 22 | "unsecure": { 23 | "heading": "Potentially malicious attachments detected", 24 | "body": "We have found one or more attachments in this ticket that could be used to spread malware." 25 | }, 26 | "secure": "Attachments are safe" 27 | }, 28 | "unsecure_attachments": { 29 | "heading": "Potentially malicious attachment(s)" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /translations/en-US.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "name": "Secure Attachments app", 4 | "description": "This app warns you when attachments with a certain file extension exist.", 5 | "parameters": { 6 | "whitelist": { 7 | "label": "Whitelist", 8 | "helpText": "Define the file formats for attachments that agents and users are allowed to upload. (Separate extensions with a comma. For example: zip, jpg, gif, png, pdf)" 9 | } 10 | } 11 | }, 12 | "global": { 13 | "error": { 14 | "general": "Something went wrong" 15 | }, 16 | "alert": { 17 | "empty_whitelist": "You have not specified a whitelist. All attachments in a ticket will be considered dangerous." 18 | }, 19 | "loading": "Scanning attachments" 20 | }, 21 | "attachment": { 22 | "unsecure": { 23 | "heading": "Potentially malicious attachments detected", 24 | "body": "We have found one or more attachments in this ticket that could be used to spread malware." 25 | }, 26 | "secure": "Attachments are safe" 27 | }, 28 | "unsecure_attachments": { 29 | "heading": "Potentially malicious attachment(s)" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /translations/en-ca.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "name": "Secure Attachments app", 4 | "description": "This app warns you when attachments with a certain file extension exist.", 5 | "parameters": { 6 | "whitelist": { 7 | "label": "Whitelist", 8 | "helpText": "Define the file formats for attachments that agents and users are allowed to upload. (Separate extensions with a comma. For example: zip, jpg, gif, png, pdf)" 9 | } 10 | } 11 | }, 12 | "global": { 13 | "error": { 14 | "general": "Something went wrong" 15 | }, 16 | "alert": { 17 | "empty_whitelist": "You have not specified a whitelist. All attachments in a ticket will be considered dangerous." 18 | }, 19 | "loading": "Scanning attachments" 20 | }, 21 | "attachment": { 22 | "unsecure": { 23 | "heading": "Potentially malicious attachments detected", 24 | "body": "We have found one or more attachments in this ticket that could be used to spread malware." 25 | }, 26 | "secure": "Attachments are safe" 27 | }, 28 | "unsecure_attachments": { 29 | "heading": "Potentially malicious attachment(s)" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /translations/en-gb.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "name": "Secure Attachments app", 4 | "description": "This app warns you when attachments with a certain file extension exist.", 5 | "parameters": { 6 | "whitelist": { 7 | "label": "Whitelist", 8 | "helpText": "Define the file formats for attachments that agents and users are allowed to upload. (Separate extensions with a comma. For example: zip, jpg, gif, png, pdf)" 9 | } 10 | } 11 | }, 12 | "global": { 13 | "error": { 14 | "general": "Something went wrong" 15 | }, 16 | "alert": { 17 | "empty_whitelist": "You have not specified a whitelist. All attachments in a ticket will be considered dangerous." 18 | }, 19 | "loading": "Scanning attachments" 20 | }, 21 | "attachment": { 22 | "unsecure": { 23 | "heading": "Potentially malicious attachments detected", 24 | "body": "We have found one or more attachments in this ticket that could be used to spread malware." 25 | }, 26 | "secure": "Attachments are safe" 27 | }, 28 | "unsecure_attachments": { 29 | "heading": "Potentially malicious attachment(s)" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /translations/nl.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "name": "Secure Attachments app", 4 | "description": "Deze app waarschuwt u als er bijlagen met een bepaalde bestandsextensie bestaan.", 5 | "parameters": { 6 | "whitelist": { 7 | "label": "Witte lijst", 8 | "helpText": "Geef de bestandsindelingen op voor bijlagen die agenten en gebruikers mogen uploaden. (Scheid extensies met een komma. Bijvoorbeeld: zip, jpg, gif, png, pdf)" 9 | } 10 | } 11 | }, 12 | "global": { 13 | "error": { 14 | "general": "Er is iets fout gegaan" 15 | }, 16 | "alert": { 17 | "empty_whitelist": "U hebt geen witte lijst opgegeven. Alle bijlagen in een ticket worden als gevaarlijk beschouwd." 18 | }, 19 | "loading": "Bijlagen scannen" 20 | }, 21 | "attachment": { 22 | "unsecure": { 23 | "heading": "Mogelijk schadelijke bijlagen gedetecteerd", 24 | "body": "Wij hebben een of meer bijlagen in dit ticket ontdekt waarmee malware kan worden verspreid." 25 | }, 26 | "secure": "Bijlagen zijn veilig" 27 | }, 28 | "unsecure_attachments": { 29 | "heading": "Mogelijk schadelijke bijlage(n)" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /translations/sv.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "name": "Secure Attachments app", 4 | "description": "Denna app varnar dig när det finns bilagor med ett visst filnamnstillägg.", 5 | "parameters": { 6 | "whitelist": { 7 | "label": "Vitlista", 8 | "helpText": "Definiera filformat för bilagor som agenter och användare har rätt att överföra. (Åtskilj filnamnstilläggen med kommatecken. Exempel: zip, jpg, gif, png, pdf.)" 9 | } 10 | } 11 | }, 12 | "global": { 13 | "error": { 14 | "general": "Ett fel inträffade" 15 | }, 16 | "alert": { 17 | "empty_whitelist": "Du har inte specificerat en vitlista. Alla ärendebilagor kommer att anses vara riskfyllda." 18 | }, 19 | "loading": "Bilagor skannas" 20 | }, 21 | "attachment": { 22 | "unsecure": { 23 | "heading": "Potentiellt skadliga bilagor identifierade", 24 | "body": "Vi har påträffat en eller flera bilagor till detta ärende som kan användas för att sprida skadliga program." 25 | }, 26 | "secure": "Bilagorna är säkra" 27 | }, 28 | "unsecure_attachments": { 29 | "heading": "Potentiellt skadliga bifogade filer" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /translations/de.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "name": "Secure Attachments app", 4 | "description": "Diese App warnt Sie, wenn Anhänge mit einer bestimmten Dateierweiterung vorhanden sind.", 5 | "parameters": { 6 | "whitelist": { 7 | "label": "Whitelist", 8 | "helpText": "Geben Sie die Dateiformate für Anhänge an, die Agenten und Benutzer hochladen dürfen. (Trennen Sie Erweiterungen durch ein Komma, z. B. zip, jpg, gif, png, pdf.)" 9 | } 10 | } 11 | }, 12 | "global": { 13 | "error": { 14 | "general": "Fehler aufgetreten" 15 | }, 16 | "alert": { 17 | "empty_whitelist": "Sie haben keine Whitelist angegeben. Alle Anhänge in einem Ticket werden als gefährlich betrachtet." 18 | }, 19 | "loading": "Anhänge werden überprüft" 20 | }, 21 | "attachment": { 22 | "unsecure": { 23 | "heading": "Potenziell bösartige Anhänge entdeckt", 24 | "body": "Wir haben mindestens einen Anhang in diesem Ticket gefunden, durch den Malware verbreitet werden könnte." 25 | }, 26 | "secure": "Anhänge sind sicher" 27 | }, 28 | "unsecure_attachments": { 29 | "heading": "Potenziell bösartiger Anhang" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /translations/fi.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "name": "Secure Attachments app", 4 | "description": "Tämä sovellus varoittaa, että on olemassa liitteitä, joilla on tietty tiedostotunniste.", 5 | "parameters": { 6 | "whitelist": { 7 | "label": "Valkoinen lista", 8 | "helpText": "Määritä liitteiden tiedostomuodot, joita tukihenkilöt ja käyttäjät voivat ladata. (Erota tunnisteet pilkulla. Esimerkiksi: zip, jpg, gif, png, pdf)" 9 | } 10 | } 11 | }, 12 | "global": { 13 | "error": { 14 | "general": "Jotain meni pieleen." 15 | }, 16 | "alert": { 17 | "empty_whitelist": "Et ole määrittänyt valkoista listaa. Kaikkien tiketin liitteiden katsotaan olevan vaarallisia." 18 | }, 19 | "loading": "Skannaa liitteitä" 20 | }, 21 | "attachment": { 22 | "unsecure": { 23 | "heading": "Mahdollisesti haitallisia liitteitä havaittu", 24 | "body": "Löysimme tästä tiketistä yhden tai useampia liitteitä, joita voidaan käyttää haittaohjelmien levittämiseen." 25 | }, 26 | "secure": "Liitteet ovat turvallisia" 27 | }, 28 | "unsecure_attachments": { 29 | "heading": "Mahdollisesti haitalliset liitteet" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /translations/it.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "name": "Secure Attachments app", 4 | "description": "L’app avvisa quando esistono allegati con una data estensione.", 5 | "parameters": { 6 | "whitelist": { 7 | "label": "Whitelist", 8 | "helpText": "Definisce i formati dei file degli allegati che possono essere caricati dagli agenti e dagli utenti. (Separare le estensioni con una virgola. Per esempio: zip, jpg, gif, png, pdf)" 9 | } 10 | } 11 | }, 12 | "global": { 13 | "error": { 14 | "general": "Si è verificato un problema" 15 | }, 16 | "alert": { 17 | "empty_whitelist": "Non avete specificato una whitelist. Tutti gli allegati ad un ticket verranno considerati come pericolosi." 18 | }, 19 | "loading": "Scansione allegati" 20 | }, 21 | "attachment": { 22 | "unsecure": { 23 | "heading": "Rilevato un allegato potenzialmente malevolo", 24 | "body": "Questo ticket ha almeno un allegato che potrebbe essere usato per diffondere malware." 25 | }, 26 | "secure": "Gli allegati sono sicuri" 27 | }, 28 | "unsecure_attachments": { 29 | "heading": "Allegati potenzialmente pericolosi" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /translations/pt-br.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "name": "Secure Attachments app", 4 | "description": "Esse aplicativo o avisa da existência de anexos com uma determinada extensão de arquivo.", 5 | "parameters": { 6 | "whitelist": { 7 | "label": "Lista de aceitação", 8 | "helpText": "Defina os formatos de arquivos para os anexos que os agentes e usuários têm permissão para enviar. (Separe as extensões com uma vírgula. Por exemplo: zip, jpg, gif, png, pdf)" 9 | } 10 | } 11 | }, 12 | "global": { 13 | "error": { 14 | "general": "Erro" 15 | }, 16 | "alert": { 17 | "empty_whitelist": "Você não especificou uma lista de aceitação. Todos os anexos em um ticket serão considerados perigosos." 18 | }, 19 | "loading": "Analisando anexos" 20 | }, 21 | "attachment": { 22 | "unsecure": { 23 | "heading": "Anexos potencialmente maliciosos detectados", 24 | "body": "Encontramos um ou mais anexos nesse ticket que podem ser usados para propagar malwares." 25 | }, 26 | "secure": "Os anexos são seguros" 27 | }, 28 | "unsecure_attachments": { 29 | "heading": "Anexo(s) potencialmente malicioso(s)" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /translations/pt.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "name": "Secure Attachments app", 4 | "description": "Esse aplicativo o avisa da existência de anexos com uma determinada extensão de arquivo.", 5 | "parameters": { 6 | "whitelist": { 7 | "label": "Lista de aceitação", 8 | "helpText": "Defina os formatos de arquivos para os anexos que os agentes e usuários têm permissão para enviar. (Separe as extensões com uma vírgula. Por exemplo: zip, jpg, gif, png, pdf)" 9 | } 10 | } 11 | }, 12 | "global": { 13 | "error": { 14 | "general": "Erro" 15 | }, 16 | "alert": { 17 | "empty_whitelist": "Você não especificou uma lista de aceitação. Todos os anexos em um ticket serão considerados perigosos." 18 | }, 19 | "loading": "Analisando anexos" 20 | }, 21 | "attachment": { 22 | "unsecure": { 23 | "heading": "Anexos potencialmente maliciosos detectados", 24 | "body": "Encontramos um ou mais anexos nesse ticket que podem ser usados para propagar malwares." 25 | }, 26 | "secure": "Os anexos são seguros" 27 | }, 28 | "unsecure_attachments": { 29 | "heading": "Anexo(s) potencialmente malicioso(s)" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /translations/tr.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "name": "Secure Attachments app", 4 | "description": "Bu uygulama ekleriniz belli bir dosya uzantısına sahip olduğunda sizi uyarır.", 5 | "parameters": { 6 | "whitelist": { 7 | "label": "Beyaz liste", 8 | "helpText": "Temsilcilerin ve kullanıcıların hangi dosya biçimlerindeki ekleri yükleyebileceklerini tanımlayın. (Uzantıları virgülle ayırın.) Örneğin: zip, jpg, gif, png, pdf)" 9 | } 10 | } 11 | }, 12 | "global": { 13 | "error": { 14 | "general": "Bir sorun oluştu" 15 | }, 16 | "alert": { 17 | "empty_whitelist": "Bir beyaz liste belirlemediniz. Kayıtta ekli olan tüm ekler tehlikeli olarak kabul edilecektir." 18 | }, 19 | "loading": "Ek taranıyor" 20 | }, 21 | "attachment": { 22 | "unsecure": { 23 | "heading": "Kötü amaçlı yazılım içerme potansiyeli taşıyan ekler algılandı", 24 | "body": "Bu kayıtta, kötü amaçlı yazılım yaymak için kullanılabilecek bir veya birden fazla ek bulduk. " 25 | }, 26 | "secure": "Ekler güvenli" 27 | }, 28 | "unsecure_attachments": { 29 | "heading": "Kötü amaçlı yazılım içerme potansiyeli taşıyan ek(ler)" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /translations/es-es.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "name": "Secure Attachments app", 4 | "description": "Esta aplicación le advierte si existen adjuntos con una cierta extensión de archivo.", 5 | "parameters": { 6 | "whitelist": { 7 | "label": "Lista blanca", 8 | "helpText": "Defina los formatos de archivo para los adjuntos que los agentes y los usuarios pueden cargar. (Separe las extensiones con una coma. Por ejemplo: zip, jpg, gif, png, pdf)" 9 | } 10 | } 11 | }, 12 | "global": { 13 | "error": { 14 | "general": "Algo salió mal" 15 | }, 16 | "alert": { 17 | "empty_whitelist": "No ha especificado una lista blanca. Todos los adjuntos en un ticket serán considerados peligrosos." 18 | }, 19 | "loading": "Examinando adjuntos" 20 | }, 21 | "attachment": { 22 | "unsecure": { 23 | "heading": "Se han detectado adjuntos potencialmente maliciosos", 24 | "body": "Hemos encontrado uno o varios adjuntos en este ticket que podrían usarse para propagar malware." 25 | }, 26 | "secure": "Los adjuntos son seguros" 27 | }, 28 | "unsecure_attachments": { 29 | "heading": "Adjuntos potencialmente maliciosos" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /translations/es.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "name": "Secure Attachments app", 4 | "description": "Esta aplicación le advierte si existen adjuntos con una cierta extensión de archivo.", 5 | "parameters": { 6 | "whitelist": { 7 | "label": "Lista blanca", 8 | "helpText": "Defina los formatos de archivo para los adjuntos que los agentes y los usuarios pueden cargar. (Separe las extensiones con una coma. Por ejemplo: zip, jpg, gif, png, pdf)" 9 | } 10 | } 11 | }, 12 | "global": { 13 | "error": { 14 | "general": "Algo salió mal" 15 | }, 16 | "alert": { 17 | "empty_whitelist": "No ha especificado una lista blanca. Todos los adjuntos en un ticket serán considerados peligrosos." 18 | }, 19 | "loading": "Examinando adjuntos" 20 | }, 21 | "attachment": { 22 | "unsecure": { 23 | "heading": "Se han detectado adjuntos potencialmente maliciosos", 24 | "body": "Hemos encontrado uno o varios adjuntos en este ticket que podrían usarse para propagar malware." 25 | }, 26 | "secure": "Los adjuntos son seguros" 27 | }, 28 | "unsecure_attachments": { 29 | "heading": "Adjuntos potencialmente maliciosos" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /translations/es-419.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "name": "Secure Attachments app", 4 | "description": "Esta aplicación le advierte si existen adjuntos con una cierta extensión de archivo.", 5 | "parameters": { 6 | "whitelist": { 7 | "label": "Lista blanca", 8 | "helpText": "Defina los formatos de archivo para los adjuntos que los agentes y los usuarios pueden cargar. (Separe las extensiones con una coma. Por ejemplo: zip, jpg, gif, png, pdf)" 9 | } 10 | } 11 | }, 12 | "global": { 13 | "error": { 14 | "general": "Algo salió mal" 15 | }, 16 | "alert": { 17 | "empty_whitelist": "No ha especificado una lista blanca. Todos los adjuntos en un ticket serán considerados peligrosos." 18 | }, 19 | "loading": "Examinando adjuntos" 20 | }, 21 | "attachment": { 22 | "unsecure": { 23 | "heading": "Se han detectado adjuntos potencialmente maliciosos", 24 | "body": "Hemos encontrado uno o varios adjuntos en este ticket que podrían usarse para propagar malware." 25 | }, 26 | "secure": "Los adjuntos son seguros" 27 | }, 28 | "unsecure_attachments": { 29 | "heading": "Adjuntos potencialmente maliciosos" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /translations/pl.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "name": "Secure Attachments app", 4 | "description": "Aplikacja ta ostrzega o załącznikach z pewnymi rozszerzeniami pliku.", 5 | "parameters": { 6 | "whitelist": { 7 | "label": "Lista dozwolonych", 8 | "helpText": "Zdefiniuj formaty plików załączników, które mogą przesyłać agenci i użytkownicy. (Rozdziel rozszerzenia przecinkami, na przykład: zip, jpg, gif, png, pdf)." 9 | } 10 | } 11 | }, 12 | "global": { 13 | "error": { 14 | "general": "Wystąpił jakiś problem" 15 | }, 16 | "alert": { 17 | "empty_whitelist": "Nie zdefiniowano listy dozwolonych. Wszelkie załączniki w zgłoszeniu będą uznawane za niebezpieczne." 18 | }, 19 | "loading": "Skanowanie załączników" 20 | }, 21 | "attachment": { 22 | "unsecure": { 23 | "heading": "Wykryto potencjalnie szkodliwe załączniki", 24 | "body": "Wykryliśmy w tym zgłoszeniu co najmniej jeden załącznik, który może służyć do rozprzestrzeniania szkodliwego oprogramowania." 25 | }, 26 | "secure": "Załączniki są bezpieczne" 27 | }, 28 | "unsecure_attachments": { 29 | "heading": "Potencjalnie szkodliwe załączniki" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /translations/da.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "name": "Secure Attachments app", 4 | "description": "Denne app advarer dig, når der eksisterer vedhæftede filer med et bestemt filtypenavn.", 5 | "parameters": { 6 | "whitelist": { 7 | "label": "Whitelist", 8 | "helpText": "Definer filformaterne for vedhæftede filer, som agenter og brugere kan uploade. (Separer filtypenavne med et komma. For eksempel: zip, jpg, gif, png, pdf)" 9 | } 10 | } 11 | }, 12 | "global": { 13 | "error": { 14 | "general": "Der er noget galt" 15 | }, 16 | "alert": { 17 | "empty_whitelist": "Du har ikke angivet en whitelist. Alle vedhæftede filer i en ticket vil blive anset for at være skadelige." 18 | }, 19 | "loading": "Scanner vedhæftede filer" 20 | }, 21 | "attachment": { 22 | "unsecure": { 23 | "heading": "En potentiel skadelig vedhæftet fil blev detekteret", 24 | "body": "Vi fandt en eller flere vedhæftede filer i denne ticket, som kan bruges til at sprede malware." 25 | }, 26 | "secure": "Vedhæftede filer er sikre" 27 | }, 28 | "unsecure_attachments": { 29 | "heading": "Potentielt skadelig(e) vedhæfte(t)(de) fil(er)" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /translations/ru.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "name": "Secure Attachments app", 4 | "description": "Это приложение предупреждает о наличии прикрепленных файлов с определенным расширением.", 5 | "parameters": { 6 | "whitelist": { 7 | "label": "Белый список", 8 | "helpText": "Определите форматы прикрепленных файлов, которые разрешено загружать агентам и пользователям. (Укажите расширения через запятую, например: zip, jpg, gif, png, pdf)" 9 | } 10 | } 11 | }, 12 | "global": { 13 | "error": { 14 | "general": "Какая-то неполадка" 15 | }, 16 | "alert": { 17 | "empty_whitelist": "Вы не указали белый список. Все прикрепленные файлы в тикете будут считаться опасными." 18 | }, 19 | "loading": "Сканирование прикрепленных файлов" 20 | }, 21 | "attachment": { 22 | "unsecure": { 23 | "heading": "Обнаружены потенциально опасные прикрепленные файлы", 24 | "body": "В этом тикете обнаружены один или несколько прикрепленных файлов, которые могут содержать вредоносное ПО." 25 | }, 26 | "secure": "Прикрепленные файлы безопасны" 27 | }, 28 | "unsecure_attachments": { 29 | "heading": "Потенциально опасные прикрепленные файлы" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /translations/hu.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "name": "Biztonságos Csatolmányok alkalmazás", 4 | "description": "Ez az alkalmazás figyelmeztet, amikor egy bizonyos kiterjesztésű csatolmány jelen van.", 5 | "parameters": { 6 | "whitelist": { 7 | "label": "Fehérlista", 8 | "helpText": "Határozza meg a fájltípusokat, amelyeket a munkatársak és a felhasználók mellékletként feltölthetnek.(Válassza le a kiterjesztéseket vesszővel. Pl.: zip, jpg, gif, png, pdf)" 9 | } 10 | } 11 | }, 12 | "global": { 13 | "error": { 14 | "general": "Valami hiba történt" 15 | }, 16 | "alert": { 17 | "empty_whitelist": "Még nem hozott létre fehérlistát. Minden csatolmány ebben a jegyben veszélyesként lesz nyilvántartva." 18 | }, 19 | "loading": "Csatolmányok vizsgálata" 20 | }, 21 | "attachment": { 22 | "unsecure": { 23 | "heading": "Potenciálisan rosszindulatú melléklet észlelve", 24 | "body": "Egy, vagy több csatolmányt találtunk ebben a jegyben, ami malware terjesztésére használható." 25 | }, 26 | "secure": "Csatolmányok biztonságosak" 27 | }, 28 | "unsecure_attachments": { 29 | "heading": "Potenciálisan rosszindulatú melléklet(ek)" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /translations/ro.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "name": "Aplicaţie Fişiere ataşate securizate", 4 | "description": "Această aplicaţie vă avertizează atunci când există fişiere ataşate cu o anumită extensie de fişier.", 5 | "parameters": { 6 | "whitelist": { 7 | "label": "Listă albă", 8 | "helpText": "Definiţi formatul fişierelor pentru fişierele ataşate pe care agenţii şi utilizatorii le pot încărca. (Separaţi extensiile prin virgulă. De exemplu: zip, jpg, gif, png, pdf)" 9 | } 10 | } 11 | }, 12 | "global": { 13 | "error": { 14 | "general": "A apărut o problemă" 15 | }, 16 | "alert": { 17 | "empty_whitelist": "Nu aţi specificat o listă albă. Toate fişierele ataşate dintr-un tichet vor fi considerate periculoase." 18 | }, 19 | "loading": "Se scanează fişierele ataşate" 20 | }, 21 | "attachment": { 22 | "unsecure": { 23 | "heading": "Au fost detectate fişiere ataşate potenţial rău intenţionate", 24 | "body": "În acest tichet, am găsit unul sau mai multe fişiere ataşate care ar putea fi utilizate pentru a răspândi software maliţios." 25 | }, 26 | "secure": "Fişierele ataşate sunt sigure" 27 | }, 28 | "unsecure_attachments": { 29 | "heading": "Fişier(e) ataşat(e) potenţial maliţios(oase)" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /translations/fr-ca.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "name": "Secure Attachments app", 4 | "description": "Cette application vous avertit quand il existe des pièces jointes avec une extension de fichier donnée.", 5 | "parameters": { 6 | "whitelist": { 7 | "label": "Ajouter à la liste blanche", 8 | "helpText": "Définissez les formats de fichiers que les agents et les utilisateurs peuvent charger en tant que pièces jointes. (Séparez les extensions par des virgules. Exemple : zip, jpg, gif, png, pdf.)" 9 | } 10 | } 11 | }, 12 | "global": { 13 | "error": { 14 | "general": "Un problème est survenu." 15 | }, 16 | "alert": { 17 | "empty_whitelist": "Vous n’avez pas spécifié de liste blanche. Toutes les pièces jointes à un billet seront considérées dangereuses." 18 | }, 19 | "loading": "Analyse des pièces jointes en cours" 20 | }, 21 | "attachment": { 22 | "unsecure": { 23 | "heading": "Pièces jointes potentiellement malveillantes détectées", 24 | "body": "Nous avons trouvé dans ce billet une ou plusieurs pièces jointes qui pourraient être utilisées pour diffuser des logiciels malveillants." 25 | }, 26 | "secure": "Les pièces jointes sont sûres." 27 | }, 28 | "unsecure_attachments": { 29 | "heading": "Pièce(s) jointe(s) potentiellement malveillante(s)" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /translations/fr.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "name": "Secure Attachments app", 4 | "description": "Cette application vous avertit quand il existe des pièces jointes avec une extension de fichier donnée.", 5 | "parameters": { 6 | "whitelist": { 7 | "label": "Ajouter à la liste blanche", 8 | "helpText": "Définissez les formats de fichiers que les agents et les utilisateurs peuvent charger en tant que pièces jointes. (Séparez les extensions par des virgules. Exemple : zip, jpg, gif, png, pdf.)" 9 | } 10 | } 11 | }, 12 | "global": { 13 | "error": { 14 | "general": "Un problème est survenu." 15 | }, 16 | "alert": { 17 | "empty_whitelist": "Vous n’avez pas spécifié de liste blanche. Toutes les pièces jointes à un ticket seront considérées dangereuses." 18 | }, 19 | "loading": "Analyse des pièces jointes en cours" 20 | }, 21 | "attachment": { 22 | "unsecure": { 23 | "heading": "Pièces jointes potentiellement malveillantes détectées", 24 | "body": "Nous avons trouvé dans ce ticket une ou plusieurs pièces jointes qui pourraient être utilisées pour diffuser des logiciels malveillants." 25 | }, 26 | "secure": "Les pièces jointes sont sûres." 27 | }, 28 | "unsecure_attachments": { 29 | "heading": "Pièce(s) jointe(s) potentiellement malveillante(s)" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app.css: -------------------------------------------------------------------------------- 1 | .secure { 2 | font-size: 14px; 3 | } 4 | 5 | .app_main { 6 | text-align: left; 7 | } 8 | 9 | .unsecure_attachments { 10 | padding-top: 10px; 11 | text-align: left; 12 | 13 | .attachment_list ul { 14 | margin: auto; 15 | } 16 | } 17 | 18 | .loading_message { 19 | font-size: 15px; 20 | } 21 | 22 | .spinner.dotted { 23 | width: 40px; 24 | } 25 | 26 | .spinner.dotted, 27 | .secure_message .img { 28 | margin: auto; 29 | padding-left: 10px; 30 | padding-right: 10px; 31 | } 32 | 33 | .toggle_attachments { 34 | display: block; 35 | float: right; 36 | } 37 | 38 | .loading, 39 | .secure_message { 40 | border: 1px solid #D5D5D5; 41 | border-radius: 6px; 42 | display: block; 43 | 44 | div { 45 | display: inline-block; 46 | padding-top: 10px; 47 | padding-bottom: 10px; 48 | vertical-align: middle; 49 | } 50 | } 51 | 52 | .unsecure_message { 53 | display: block; 54 | border: 1px solid #CA2B25; 55 | border-radius: 6px; 56 | position: relative; 57 | padding-bottom: 20px; 58 | padding-top: 5px; 59 | 60 | .img { 61 | display: block; 62 | left: 13px; 63 | padding: 8px; 64 | position: absolute; 65 | margin-top: 5px; 66 | } 67 | 68 | .unsecure { 69 | position: relative; 70 | margin-left: 60px; 71 | display: block; 72 | width: 245px; 73 | 74 | span { 75 | margin-top: 15px; 76 | margin-bottom: 15px; 77 | display: block; 78 | font-size: 14px; 79 | } 80 | 81 | p { 82 | font-size: 12px; 83 | } 84 | } 85 | } 86 | 87 | .hide { 88 | display: none; 89 | } 90 | -------------------------------------------------------------------------------- /translations/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "name": { 4 | "title": "Name of the app", 5 | "value": "Secure Attachments app" 6 | }, 7 | "description": { 8 | "title": "Description of what the app does", 9 | "value": "This app warns you when attachments with a certain file extension exist." 10 | }, 11 | "parameters": { 12 | "whitelist": { 13 | "label": { 14 | "title": "Label message for the whitelist setting field.", 15 | "value": "Whitelist" 16 | }, 17 | "helpText": { 18 | "title": "A brief description on what the whitelist setting is for, below the whitelist field.", 19 | "value": "Define the file formats for attachments that agents and users are allowed to upload. (Separate extensions with a comma. For example: zip, jpg, gif, png, pdf)" 20 | } 21 | } 22 | }, 23 | "package": "secure_attachments" 24 | }, 25 | "global": { 26 | "error": { 27 | "general": { 28 | "title": "Letting the user know that something went wrong with the interface", 29 | "value": "Something went wrong" 30 | } 31 | }, 32 | "alert": { 33 | "empty_whitelist": { 34 | "title": "Letting the user know that a whitelist is empty, and its consequences.", 35 | "value": "You have not specified a whitelist. All attachments in a ticket will be considered dangerous." 36 | } 37 | }, 38 | "loading": { 39 | "title": "A message displayed next to the spinner saying 'scanning for attachments'.", 40 | "value": "Scanning attachments" 41 | } 42 | }, 43 | "attachment": { 44 | "unsecure": { 45 | "heading": { 46 | "title": "Warning that there could be unsafe attachments", 47 | "value": "Potentially malicious attachments detected" 48 | }, 49 | "body": { 50 | "title": "Warning that there could be unsafe attachments", 51 | "value": "We have found one or more attachments in this ticket that could be used to spread malware." 52 | } 53 | }, 54 | "secure": { 55 | "title": "Positive message that we didn't find a match", 56 | "value": "Attachments are safe" 57 | } 58 | }, 59 | "unsecure_attachments": { 60 | "heading": { 61 | "title": "Header Message displayed above the unsecure attachments", 62 | "value": "Potentially malicious attachment(s)" 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /translations/en.yml: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Attachment Restrictions" 3 | packages: 4 | - default 5 | - app_secure_attachments 6 | 7 | parts: 8 | - translation: 9 | key: "txt.apps.secure_attachments.app.name" 10 | title: "Name of the app" 11 | value: "Secure Attachments app" 12 | - translation: 13 | key: "txt.apps.secure_attachments.app.description" 14 | title: "Description of what the app does" 15 | value: "This app warns you when attachments with a certain file extension exist." 16 | - translation: 17 | key: "txt.apps.secure_attachments.app.parameters.whitelist.label" 18 | title: "Label message for the whitelist setting field." 19 | value: "Whitelist" 20 | - translation: 21 | key: "txt.apps.secure_attachments.app.parameters.whitelist.helpText" 22 | title: "A brief description on what the whitelist setting is for, below the whitelist field." 23 | value: "Define the file formats for attachments that agents and users are allowed to upload. (Separate extensions with a comma. For example: zip, jpg, gif, png, pdf)" 24 | - translation: 25 | key: "txt.apps.secure_attachments.global.error.general" 26 | title: "Letting the user know that something went wrong with the interface" 27 | value: "Something went wrong" 28 | - translation: 29 | key: "txt.apps.secure_attachments.global.alert.empty_whitelist" 30 | title: "Letting the user know that a whitelist is empty, and its consequences." 31 | value: "You have not specified a whitelist. All attachments in a ticket will be considered dangerous." 32 | - translation: 33 | key: "txt.apps.secure_attachments.global.loading" 34 | title: "A message displayed next to the spinner saying 'scanning for attachments'." 35 | value: "Scanning attachments" 36 | - translation: 37 | key: "txt.apps.secure_attachments.attachment.unsecure.heading" 38 | title: "Warning that there could be unsafe attachments" 39 | value: "Potentially malicious attachments detected" 40 | - translation: 41 | key: "txt.apps.secure_attachments.attachment.unsecure.body" 42 | title: "Warning that there could be unsafe attachments" 43 | value: "We have found one or more attachments in this ticket that could be used to spread malware." 44 | - translation: 45 | key: "txt.apps.secure_attachments.attachment.secure" 46 | title: "Positive message that we didn't find a match" 47 | value: "Attachments are safe" 48 | - translation: 49 | key: "txt.apps.secure_attachments.unsecure_attachments.heading" 50 | title: "Header Message displayed above the unsecure attachments" 51 | value: "Potentially malicious attachment(s)" 52 | -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | 3 | return { 4 | 5 | acceptedExtensions: [], 6 | 7 | events: { 8 | 'app.activated': 'initialize', 9 | 'getAudits.done': 'findAttachments', 10 | 'getAudits.fail': 'handleFail', 11 | 'click .toggle_attachments': 'toggleAttachmentList' 12 | }, 13 | 14 | requests: { 15 | // Attachments come from our audits API 16 | 'getAudits': function(ticketId) { 17 | return { 18 | url: helpers.fmt('/api/v2/tickets/%@/audits.json', ticketId), 19 | type: 'GET', 20 | dataType : 'json' 21 | }; 22 | } 23 | }, 24 | 25 | initialize: function() { 26 | var whitelistStr = this.setting('whitelist') || ''; 27 | if (whitelistStr === '') { 28 | services.notify(this.I18n.t('global.alert.empty_whitelist'), 'alert'); 29 | } 30 | this.acceptedExtensions = whitelistStr.replace(/(\r\n|\n|\r|\s)/gm,'') 31 | .replace(/(,+$|^,+)/gm, '') 32 | .split(','); 33 | this.ajax('getAudits', this.ticket().id()); 34 | this.switchTo('loading_screen'); 35 | }, 36 | 37 | // Go through all the audits and find attachments 38 | findAttachments: function(audits) { 39 | var attachments = []; 40 | 41 | _.each(audits.audits, function(audit){ 42 | var commentEvents = _.filter(audit.events, function(auditEvent){ 43 | return auditEvent.type == 'Comment'; 44 | }); 45 | _.each(commentEvents, function(commentEvent){ 46 | attachments = _.union(attachments, commentEvent.attachments); 47 | }); 48 | }); 49 | 50 | this.processAttachments(attachments); 51 | }, 52 | 53 | // Work out if the attachments are secure or not 54 | processAttachments: function(attachments) { 55 | var invalidAttachments = _.filter(attachments, function(attachment){ 56 | var extension = this._extractExtension(attachment.file_name); 57 | return _.indexOf(this.acceptedExtensions, extension) < 0; 58 | }.bind(this)); 59 | 60 | this.isSecure = _.isEmpty(invalidAttachments); 61 | 62 | if (this.isSecure) { 63 | this.switchTo('secure'); 64 | } else { 65 | this.switchTo('unsecure', { attachments: invalidAttachments }); 66 | this.isHidden = true; 67 | } 68 | }, 69 | 70 | _extractExtension: function(file_name) { 71 | return file_name.substring( file_name.lastIndexOf('.') + 1 ); 72 | }, 73 | 74 | handleFail: function() { 75 | this.switchTo('error', { 76 | message: this.I18n.t('global.error.general') 77 | }); 78 | }, 79 | 80 | toggleAttachmentList: function(event) { 81 | event.preventDefault(); 82 | var $icon = this.$(event.currentTarget).children('i').eq(0), 83 | $attachmentList = this.$('.attachment_list'); 84 | 85 | if (this.isHidden) { 86 | $icon.removeClass('icon-chevron-down') 87 | .addClass('icon-chevron-up'); 88 | $attachmentList.removeClass('hide'); 89 | } else { 90 | $icon.removeClass('icon-chevron-up') 91 | .addClass('icon-chevron-down'); 92 | $attachmentList.addClass('hide'); 93 | } 94 | this.isHidden = !this.isHidden; 95 | } 96 | }; 97 | 98 | }()); 99 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2013 Zendesk 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Capitalized terms used herein have the meaning set forth in the Zendesk, Inc. 16 | (“Zendesk”) Terms of Service (available at www.zendesk.com/company/terms) (the “Terms”). 17 | The software made available herein constitutes “ZendeskLabs Software” which may be 18 | implemented to enable features or functionality to be utilized in connection with a 19 | subscription to the Service. 20 | Notwithstanding anything to the contrary set forth in the Terms or any other 21 | agreement by and between you and Zendesk, ZendeskLabs Software is provided 22 | “AS IS” and on an “AS AVAILABLE” basis, and that Zendesk makes no warranty 23 | as to the ZendeskLabs Software. 24 | 25 | ZENDESK DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 26 | TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, 27 | NONINFRINGEMENT AND THOSE ARISING FROM A COURSE OF DEALING OR USAGE OF TRADE 28 | RELATED TO THE ZENDESKLABS SOFTWARE, ITS USE OR ANY INABILITY TO USE IT OR 29 | THE RESULTS OF ITS USE. 30 | 31 | Use of ZendeskLabs Software is subject to the following risks and conditions: 32 | (i) the ZendeskLabs Software is not an component of the Service that 33 | has been designed for commercial release for by Zendesk; 34 | 35 | (ii) the ZendeskLabs Software may not be in final form and may contain errors, 36 | design flaws or other problems; (iii) the ZendeskLabs Software is not expected to 37 | function fully or adequately upon installation, and it is expected and anticipated that 38 | further testing, modification and development may be necessary to make the 39 | ZendeskLabs Software functional; 40 | 41 | (iv) it may not be possible to make the ZendeskLabs Software functional; 42 | 43 | (v) use of the ZendeskLabs Software may result in unexpected results, loss of data, 44 | project delays or other unpredictable damage or loss; and 45 | 46 | (vi) Zendesk is under no obligation to release and/or offer for sale commercial 47 | versions of the ZendeskLabs Software, and Zendesk has the right to unilaterally 48 | abandon development or availability of the ZendeskLabs Software at any time and 49 | without any obligation or liability to You. You further agree that Zendesk shall 50 | have no obligation to correct any bugs, defects or errors in the ZendeskLabs Software 51 | or otherwise to support or maintain the ZendeskLabs Software. 52 | 53 | If you elect to utilize any ZendeskLabs Software, you are agreeing to release Zendesk 54 | from any claim with regard to the ZendeskLabs Software, its operation, availability or 55 | its failure to operate or be available. Without limiting the generality of the foregoing, 56 | 57 | You acknowledge and agree that neither the use, availability nor operation of any 58 | ZendeskLabs Software shall be subject to any service level commitment applicable to the Service. --------------------------------------------------------------------------------