1
0
Fork 0
mirror of https://github.com/crazy-max/ghaction-virustotal.git synced 2026-04-15 01:54:03 -07:00
GitHub Action to upload and scan files with VirusTotal https://github.com/marketplace/actions/virustotal-github-action
  • TypeScript 82%
  • Dockerfile 8.9%
  • HCL 5.1%
  • JavaScript 4%
Find a file
2026-03-27 23:13:26 +01:00
.github fix zizmor findings 2026-03-27 23:11:55 +01:00
dist chore: update generated content 2026-03-03 13:09:05 +01:00
src fix mime import 2026-03-03 12:36:26 +01:00
tests test: make virustotal upload fixtures unique per run 2026-03-03 12:48:53 +01:00
.dockerignore Update to Yarn 3.2.4 2022-10-22 04:51:03 +02:00
.editorconfig Initial commit 2020-04-27 18:45:04 +02:00
.gitattributes Update to Yarn 3.2.4 2022-10-22 04:51:03 +02:00
.gitignore Update to Yarn 3.2.4 2022-10-22 04:51:03 +02:00
.prettierignore Update to Yarn 3.2.4 2022-10-22 04:51:03 +02:00
.prettierrc.json switch to ESM and update config/test wiring 2026-03-03 02:58:01 +01:00
.yarnrc.yml update yarn to 4.12.0 2026-02-15 21:47:00 +01:00
action.yml node 24 as default runtime 2026-03-03 13:12:03 +01:00
codecov.yml update codecov config 2026-03-03 11:31:24 +01:00
dev.Dockerfile node 24 as default runtime 2026-03-03 13:12:03 +01:00
docker-bake.hcl ci: update bake-action to v6 2025-03-30 10:32:30 +02:00
eslint.config.mjs switch to ESM and update config/test wiring 2026-03-03 02:58:01 +01:00
LICENSE new year 2026-02-15 22:38:14 +01:00
package.json node 24 as default runtime 2026-03-03 13:12:03 +01:00
README.md readme: update to v5 2026-03-03 13:24:38 +01:00
tsconfig.json switch to ESM and update config/test wiring 2026-03-03 02:58:01 +01:00
vitest.config.ts switch from jest to vitest and align tests 2026-03-03 02:58:01 +01:00
vitest.setup.ts switch from jest to vitest and align tests 2026-03-03 02:58:01 +01:00
yarn.lock node 24 as default runtime 2026-03-03 13:12:03 +01:00

GitHub release GitHub marketplace CI workflow Test workflow Codecov
Become a sponsor Donate Paypal

About

GitHub Action to upload and scan files with VirusTotal.


Usage

Scan local files

This action can be used to scan local files with VirusTotal:

VirusTotal GitHub Action

- name: VirusTotal Scan
  uses: crazy-max/ghaction-virustotal@v5
  with:
    vt_api_key: ${{ secrets.VT_API_KEY }}
    files: |
      ./foo-win32.exe
      ./foo-win64.exe

Scan through VirusTotal Monitor

To scan your assets through VirusTotal Monitor you can use the following workflow:

- name: VirusTotal Scan
  uses: crazy-max/ghaction-virustotal@v5
  with:
    vt_api_key: ${{ secrets.VT_API_KEY }}
    vt_monitor: true
    monitor_path: /ghaction-virustotal
    files: |
      ./foo-win32.exe
      ./foo-win64.exe

Scan assets of a published release

You can also use this action to scan assets of a published release on GitHub when a release event is triggered:

name: released

permissions:
  contents: read

on:
  release:
    types:
      - published

jobs:
  virustotal:
    runs-on: ubuntu-latest
    steps:
      -
        name: VirusTotal Scan
        uses: crazy-max/ghaction-virustotal@v5
        with:
          vt_api_key: ${{ secrets.VT_API_KEY }}
          files: |
            .exe$

If you set update_release_body: true input, analysis link(s) will be appended to the release body:

name: released

permissions:
  contents: read

on:
  release:
    types:
      - published

jobs:
  virustotal:
    runs-on: ubuntu-latest
    permissions:
      # required to write GitHub Release body
      contents: write
    steps:
      -
        name: VirusTotal Scan
        uses: crazy-max/ghaction-virustotal@v5
        with:
          vt_api_key: ${{ secrets.VT_API_KEY }}
          update_release_body: true
          files: |
            .exe$

And will look like this:

VirusTotal GitHub Action update release body

Customizing

inputs

Following inputs can be used as step.with keys

Name Type Default Description
vt_api_key String VirusTotal API key to upload assets (required)
files String Newline-delimited list of path globs/patterns for asset files to upload for analysis (required)
vt_monitor Bool false If enabled, files will be uploaded to VirusTotal Monitor endpoint
monitor_path¹ String / A path relative to current monitor user root folder to upload files
update_release_body² Bool false If enabled, analysis link(s) will be appended to the release body
github_token³ String GitHub Token used to create an authenticated client for GitHub API as provided by secrets
request_rate Number 0 API request-rate in requests/minute. Set to 4 or lower when using the standard free public API. 0 to disable rate-limit.

Note

outputs

The following outputs are available

Name Type Description
analysis String Analysis results formatted as <filename>=<analysisURL> (comma separated)

Contributing

Want to contribute? Awesome! The most basic way to show your support is to star the project, or to raise issues. You can also support this project by becoming a sponsor on GitHub or by making a PayPal donation to ensure this journey continues indefinitely!

Thanks again for your support, it is much appreciated! 🙏

License

MIT. See LICENSE for more details.