crazy-max / ghaction-virustotal

GitHub Action to upload and scan files with VirusTotal
https://github.com/marketplace/actions/virustotal-github-action
MIT License
161 stars 20 forks source link

Axios limits max file size with VirusTotal Monitor #133

Open grctest opened 2 years ago

grctest commented 2 years ago

Behaviour

Unable to upload a large file to virustotal with action.

Steps to reproduce this issue

  1. Create a file with size 140MB (React + Electron app)
  2. Attempt to upload via action
  3. Get error

Expected behaviour

File is uploaded to virustotal via upload url, well within larger file size limits.

Actual behaviour

The following error is output: AxiosError: Request failed with status code 413

Configuration

    - name: VirusTotal Monitor Scan
      uses: crazy-max/ghaction-virustotal@v3
      with:
        vt_api_key: ${{ secrets.VT_API_KEY }}
        vt_monitor: true
        request_rate: 2
        monitor_path: /home/runner/
        files: |
          /home/runner/nft_viewer.exe
          /home/runner/nft_viewer.deb

Logs

Cannot send nft_viewer.exe to VirusTotal Monitor at /home/runner/nft_viewer.exe: AxiosError: Request failed with status code 413
grctest commented 2 years ago

The API reference for nodejs is just the following:

const sdk = require('api')('@virustotal/v3.0#1mk70h3zl6yyhea6');

sdk.filesUploadUrl()
  .then(res => console.log(res))
  .catch(err => console.error(err));

No mention of special config, so must be an axios header issue?

crazy-max commented 1 year ago

Hum that's odd, https://github.com/crazy-max/ghaction-virustotal/pull/127 should have fixed this. Did you check your VirusTotal Monitor bucket is not full? cc @xjin-splunk

crazy-max commented 1 year ago

Nevermind, this is not implemented for VirusTotal Monitor: https://github.com/crazy-max/ghaction-virustotal/blob/c61a849af78fb8f96d9813dd35ca6ee78c3dde79/src/virustotal.ts#L66-L92

smashedr commented 5 months ago

Any updates on this? Or is this a dead project? I instantly ran into 2 open issues. #160 I can work around by listing all the files individually, but this issue makes the project unusable.

crazy-max commented 5 months ago

Any updates on this? Or is this a dead project? I instantly ran into 2 open issues. #160 I can work around by listing all the files individually, but this issue makes the project unusable.

Feel free to contribute