crytic / slither-action

GNU Affero General Public License v3.0
128 stars 20 forks source link

Cannot make node-version parameter work #41

Closed marcosmartinez7 closed 1 year ago

marcosmartinez7 commented 1 year ago

Im trying to run a the following pipeline:

name: Slither Analysis
on:
  pull_request:
    branches:
      - "main"
      - "develop"
      - /^feature.*/
      - /^hotfix.*/
      - /^fix.*/
jobs:
  analyze:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: crytic/slither-action@v0.2.0
        with:
          fail-on: medium
          node-version: 18.12.1

Since by default it uses the latest version of node and hardhat seems to not support it I have specified node-version

Anyway, it uses node 19, any ideas? Stack trace here:

Run crytic/slither-action@v0.2.0
[7](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:8)
/usr/bin/docker run --name d5581dd9ef559cabd4244aae99b8b6f8cd0a9_31ae8c --label 8d5581 --workdir /github/workspace --rm -e "INPUT_FAIL-ON" -e "INPUT_SOLC-VERSION" -e "INPUT_NODE-VERSION" -e "INPUT_TARGET" -e "INPUT_SARIF" -e "INPUT_SLITHER-ARGS" -e "INPUT_SLITHER-CONFIG" -e "INPUT_SLITHER-VERSION" -e "INPUT_IGNORE-COMPILE" -e "INPUT_INTERNAL-GITHUB-WORKSPACE" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/crowdfunding-contracts/crowdfunding-contracts":"/github/workspace" 8d5581:dd9ef559cabd4244aae99b8b6f8cd0a9  "." "" "" "" ""
[8](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:9)
Collecting wheel
[9](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:10)
  Downloading wheel-0.38.4-py3-none-any.whl (36 kB)
[10](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:11)
Installing collected packages: wheel
[11](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:12)
Successfully installed wheel-0.38.4
[12](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:13)
Collecting slither-analyzer
[13](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:14)
  Downloading slither_analyzer-0.9.1-py3-none-any.whl (615 kB)
[14](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:15)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 615.0/615.0 KB 24.0 MB/s eta 0:00:00
[15](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:16)
Collecting prettytable>=0.7.2
[16](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:17)
  Downloading prettytable-3.5.0-py3-none-any.whl (26 kB)
[17](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:18)
Collecting crytic-compile>=0.2.4
[18](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:19)
  Downloading crytic_compile-0.2.4-py3-none-any.whl (87 kB)
[19](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:20)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 87.7/87.7 KB 218.1 MB/s eta 0:00:00
[20](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:21)
Collecting pysha3>=1.0.2
[21](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:22)
  Downloading pysha3-1.0.2.tar.gz (829 kB)
[22](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:23)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 829.2/829.2 KB 156.7 MB/s eta 0:00:00
[23](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:24)
  Preparing metadata (setup.py): started
[24](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:25)
  Preparing metadata (setup.py): finished with status 'done'
[25](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:26)
Collecting wcwidth
[26](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:27)
  Downloading wcwidth-0.2.5-py2.py3-none-any.whl (30 kB)
[27](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:28)
Building wheels for collected packages: pysha3
[28](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:29)
  Building wheel for pysha3 (setup.py): started
[29](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:30)
  Building wheel for pysha3 (setup.py): finished with status 'done'
[30](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:31)
  Created wheel for pysha3: filename=pysha3-1.0.2-cp39-cp39-linux_x86_64.whl size=146821 sha256=9c5c28de341743c3c9a92bc26c85f18e1fe3ca89f25774163e97fe3da9d70d4f
[31](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:32)
  Stored in directory: /tmp/pip-ephem-wheel-cache-kj2s1gbz/wheels/17/9d/00/86e22a32b0109bd3c8797adf13a74427aa38e6ad1135633d50
[32](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:33)
Successfully built pysha3
[33](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:34)
Installing collected packages: wcwidth, pysha3, prettytable, crytic-compile, slither-analyzer
[34](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:35)
Successfully installed crytic-compile-0.2.4 prettytable-3.5.0 pysha3-1.0.2 slither-analyzer-0.9.1 wcwidth-0.2.5
[35](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:36)
[-] SOLCVER was not set; guessing.
[36](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:37)
[-] Guessed 0.8.7.
[37](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:38)
Installing '0.8.7'...
[38](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:39)
Version '0.8.7' installed.
[39](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:40)
Switched global version to 0.8.7
[40](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:41)
[-] NODEVER was not set, using the latest version.
[41](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:42)
=> Downloading nvm from git to '/github/home/.nvm'
[42](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:43)

[43](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:44)
Cloning into '/github/home/.nvm'...
[44](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:45)
=> * (HEAD detached at FETCH_HEAD)
[45](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:46)
  master
[46](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:47)
=> Compressing and cleaning up git repository
[47](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:48)

[48](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:49)
=> Profile not found. Tried ~/.bashrc, ~/.bash_profile, ~/.zshrc, and ~/.profile.
[49](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:50)
=> Create one of them and run this script again
[50](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:51)
   OR
[51](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:52)
=> Append the following lines to the correct file yourself:
[52](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:53)

[53](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:54)
export NVM_DIR="$HOME/.nvm"
[54](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:55)
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[55](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:56)

[56](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:57)
=> Close and reopen your terminal to start using nvm or run the following to use it now:
[57](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:58)

[58](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:59)
export NVM_DIR="$HOME/.nvm"
[59](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:60)
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[60](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:61)
Downloading and installing node v19.0.1...
[61](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:62)
Downloading https://nodejs.org/dist/v19.0.1/node-v19.0.1-linux-x64.tar.xz...
[62](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:63)

[63](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:64)
#                                                                          1.4%
[64](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:65)
#######                                                                    9.8%
[65](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:66)
############                                                              17.9%
[66](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:67)
###################                                                       26.8%
[67](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:68)
########################                                                  34.1%
[68](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:69)
############################                                              39.0%
[69](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:70)
##################################                                        48.0%
[70](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:71)
########################################                                  55.7%
[71](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:72)
##############################################                            65.0%
[72](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:73)
####################################################################      95.7%
[73](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:74)
######################################################################## 100.0%
[74](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:75)
Computing checksum with sha256sum
[75](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:76)
Checksums matched!
[76](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:77)
Now using node v19.0.1 (npm v8.19.2)
[77](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:78)
Creating default alias: default -> node (-> v19.0.1 *)
[78](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:79)
[-] Installing dependencies from yarn.lock
[79](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:80)

[80](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:81)
added 1 package, and audited 2 packages in 983ms
[81](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:82)

[82](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:83)
found 0 vulnerabilities
[83](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:84)
yarn install v1.22.19
[84](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:85)
warning package.json: No license field
[85](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:86)
warning hardhat-boilerplate: No license field
[86](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:87)
[1/4] Resolving packages...
[87](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:88)
[2/4] Fetching packages...
[88](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:89)
error hardhat@2.12.2: The engine "node" is incompatible with this module. Expected version "^14.0.0 || ^16.0.0 || ^18.0.0". Got "19.0.1"
[89](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:90)
error Found incompatible module.
[90](https://github.com/loopstudio/crowdfunding-contracts/actions/runs/3448007600/jobs/5756017103#step:4:91)
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
marcosmartinez7 commented 1 year ago

My mistake, I was running an old pipeline. Configuration was correct and it works fine