av-whitelist.yml 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. name: AntiVirus Whitelisting
  2. on:
  3. workflow_call:
  4. inputs:
  5. url:
  6. description: "Url to the file to upload"
  7. required: true
  8. type: string
  9. workflow_dispatch:
  10. inputs:
  11. url:
  12. description: "Url to the file to upload"
  13. required: true
  14. type: string
  15. avast:
  16. description: "Upload to Avast"
  17. required: false
  18. type: boolean
  19. default: false
  20. kaspersky:
  21. description: "Upload to Kaspersky"
  22. required: false
  23. type: boolean
  24. default: false
  25. jobs:
  26. download-file:
  27. name: Downloads the file into the VM
  28. runs-on: ubuntu-latest
  29. outputs:
  30. fileName: ${{ steps.extractName.outputs.fileName}}
  31. steps:
  32. - name: Extract file name
  33. id: extractName
  34. run: |
  35. url="${{ inputs.url }}"
  36. echo "fileName=${url##*/}" >> $GITHUB_OUTPUT
  37. - name: Download file
  38. run: curl --remote-name ${{ inputs.url }} -L -o ${{steps.extractName.outputs.fileName}}
  39. - name: Upload artifact
  40. uses: actions/upload-artifact@v4
  41. with:
  42. name: ${{ steps.extractName.outputs.fileName }}
  43. path: ${{ steps.extractName.outputs.fileName }}
  44. if-no-files-found: error
  45. allowlist-kaspersky:
  46. name: Anti Virus Allowlisting Kaspersky
  47. runs-on: ubuntu-latest
  48. needs: download-file
  49. if: github.event_name == 'workflow_call' || inputs.kaspersky
  50. steps:
  51. - name: Download artifact
  52. uses: actions/download-artifact@v4
  53. with:
  54. name: ${{ needs.download-file.outputs.fileName }}
  55. path: upload
  56. - name: Upload to Kaspersky
  57. uses: SamKirkland/FTP-Deploy-Action@v4.3.5
  58. with:
  59. protocol: ftps
  60. server: allowlist.kaspersky-labs.com
  61. port: 990
  62. username: ${{ secrets.ALLOWLIST_KASPERSKY_USERNAME }}
  63. password: ${{ secrets.ALLOWLIST_KASPERSKY_PASSWORD }}
  64. local-dir: ./upload/
  65. allowlist-avast:
  66. name: Anti Virus Allowlisting Avast
  67. runs-on: ubuntu-latest
  68. needs: download-file
  69. if: github.event_name == 'workflow_call' || inputs.avast
  70. steps:
  71. - name: Download artifact
  72. uses: actions/download-artifact@v4
  73. with:
  74. name: ${{ needs.download-file.outputs.fileName }}
  75. path: upload
  76. - name: Upload to Avast
  77. uses: wlixcc/SFTP-Deploy-Action@v1.2.5
  78. with:
  79. server: whitelisting.avast.com
  80. port: 22
  81. username: ${{ secrets.ALLOWLIST_AVAST_USERNAME }}
  82. password: ${{ secrets.ALLOWLIST_AVAST_PASSWORD }}
  83. ssh_private_key: ''
  84. sftp_only: true
  85. local_path: './upload/*'
  86. remote_path: '/data'