Closed distributedstatemachine closed 1 year ago
Hi @samtvlabs, thanks for the report! Judging by the project structure you posted, you likely want to set target: "solidity/khalani-core"
to make the slither action build and analyze your project using one of hardhat or foundry (you can force one or the other using the compile_force_framework
option in the config file)
If you pass another folder (e.g. src
) it must have solidity files in there (i.e. not on sub-folders) and you'll have to deal with any potential remappings manually. If there's no solidity files you'll get the "does not exist" error.
Thanks this worked, but back to the original error that sent me down the rabbit hole. I have also tried setting the node version to 16 in the pipeline
[-] Slither config provided: solidity/khalani-core/slither.config.json
'npx hardhat compile --force' running
npm WARN exec The following package was not found and will be installed: hardhat@2.12.4
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'hardhat@2.12.4',
npm WARN EBADENGINE required: { node: '^14.0.0 || ^16.0.0 || ^18.0.0' },
npm WARN EBADENGINE current: { node: 'v19.3.0', npm: '9.2.0' }
npm WARN EBADENGINE }
You are using a version of Node.js that is not supported by Hardhat, and it may work incorrectly, or not work at all.
Please, make sure you are using a supported version of Node.js.
To learn more about which versions of Node.js are supported go to https://hardhat.org/nodejs-versions
Error HH12: Trying to use a non-local installation of Hardhat, which is not supported.
Please install Hardhat locally using npm or Yarn, and try again.
HardhatError: HH12: Trying to use a non-local installation of Hardhat, which is not supported.
Please install Hardhat locally using npm or Yarn, and try again.
at main (/github/home/.npm/_npx/ef9ef3f50c7d7dc1/node_modules/hardhat/src/internal/cli/cli.ts:175:13)
Here is a copy of my slither.config.json
{
"filter_paths": "lib, lib/openzeppelin-contracts/,",
"detectors_to_exclude": "timestamp,naming-convention,pragma,solc-version,uninitialized-local,constable-states,unused-return",
"solc_remaps": [
"@ensdomains/=node_modules/@ensdomains/",
"@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
"@openzeppelin/contracts/-upgradeable=lib/openzeppelin-contracts-upgradeable/contracts/",
"hardhat/=node_modules/hardhat/",
"@balancer-labs/=node_modules/@balancer-labs/",
"ds-test/=lib/forge-std/lib/ds-test/src/",
"forge-std/=lib/forge-std/src/",
"hardhat/=node_modules/hardhat/",
"@hyperlane-xyz/core=lib/hyperlane-monorepo/solidity/",
"@sgn-v2-contracts=lib/sgn-v2-contracts/contracts/"
]
}
I had a hardhat config file in in the folder. Thanks for your help and happy holidays!
Slither keeps error even though I am pointing it to the right directory
Here is what my project lay out is :
Here is what my yaml looks like:
and the error: