├── example.nim ├── .github ├── dependabot.yml └── workflows │ ├── scan.yaml │ └── scan_malware.yml ├── README.md └── LICENSE /example.nim: -------------------------------------------------------------------------------- 1 | echo 123 2 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "github-actions" # See documentation for possible values 9 | directory: "/" # Location of package manifests 10 | schedule: 11 | interval: "weekly" 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # virus_checker 2 | 3 | It intends to implement https://github.com/nim-lang/Nim/issues/17820#issuecomment-1208353122 4 | 5 | 6 | ## Finished tasks 7 | 8 | - [x] Scan nightlies release using windows defender 9 | - [x] Upload nightlies release to virusTotal 10 | - [x] Scan open source malwares written in Nim and upload the binaries to virusTotal (https://github.com/penguinite/nimalicious) 11 | 12 | ## Potiential goals 13 | 14 | - [ ] Scan examples and important packages and upload the binaries to virusTotal 15 | 16 | 17 | ## Report false postives 18 | 19 | **Please help us with reporting false postives to anti-virus vendors**, here is [the list](https://github.com/yaronelh/False-Positive-Center) where to report. 20 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 The Nim programming language 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.github/workflows/scan.yaml: -------------------------------------------------------------------------------- 1 | name: Test Nim with Windows Defender 2 | on: 3 | pull_request: 4 | push: 5 | schedule: 6 | - cron: '50 8 * * *' 7 | jobs: 8 | run: 9 | runs-on: windows-latest 10 | steps: 11 | - name: checkout 12 | uses: actions/checkout@v6 13 | - name: start Windows Defender service 14 | shell: powershell 15 | run: 'Set-Service -Name wuauserv -StartupType Manual -Status Running' 16 | - name: update signatures 17 | shell: cmd 18 | run: '"C:\Program Files\Windows Defender\MpCmdRun.exe" -SignatureUpdate' 19 | - name: fetch x64 archive from nightlies 20 | shell: powershell 21 | run: | 22 | Invoke-WebRequest https://github.com/nim-lang/nightlies/releases/download/latest-devel/windows_x64.zip -OutFile nim.zip 23 | 24 | - name: scan x64 archive from nightlies 25 | shell: cmd 26 | run: | 27 | "C:\Program Files\Windows Defender\MpCmdRun.exe" -Scan -ScanType 3 -DisableRemediation -File "%CD%\nim.zip" 28 | 29 | - name: VirusTotal Scan 30 | uses: crazy-max/ghaction-virustotal@v4 31 | with: 32 | vt_api_key: ${{ secrets.VT_API_KEY }} 33 | files: | 34 | nim.zip 35 | -------------------------------------------------------------------------------- /.github/workflows/scan_malware.yml: -------------------------------------------------------------------------------- 1 | name: Scan Nim malware with Windows Defender 2 | on: 3 | pull_request: 4 | push: 5 | schedule: 6 | - cron: '50 8 * * *' 7 | jobs: 8 | run: 9 | runs-on: windows-latest 10 | steps: 11 | - name: checkout 12 | uses: actions/checkout@v6 13 | - uses: jiro4989/setup-nim-action@v2 14 | with: 15 | nim-version: 'stable' 16 | - run: git clone https://github.com/penguinite/nimalicious.git 17 | - run: cd nimalicious && nimble build -d:yesReallyDestroyMyMachine -d:release -Y 18 | - run: powershell Compress-Archive nimalicious\build\ virus.zip 19 | - name: start Windows Defender service 20 | shell: powershell 21 | run: 'Set-Service -Name wuauserv -StartupType Manual -Status Running' 22 | - name: update signatures 23 | shell: cmd 24 | run: '"C:\Program Files\Windows Defender\MpCmdRun.exe" -SignatureUpdate' 25 | - name: scan virus built with Nim stable. 26 | shell: cmd 27 | run: | 28 | "C:\Program Files\Windows Defender\MpCmdRun.exe" -Scan -ScanType 3 -DisableRemediation -File "%CD%\virus.zip" 29 | 30 | - name: VirusTotal Scan 31 | uses: crazy-max/ghaction-virustotal@v4 32 | with: 33 | vt_api_key: ${{ secrets.VT_API_KEY }} 34 | files: | 35 | virus.zip 36 | --------------------------------------------------------------------------------