Skip to content

chore: add local dependencies#11

Open
igorroncevic wants to merge 1 commit intomainfrom
pr-02-local-dev-dependencies
Open

chore: add local dependencies#11
igorroncevic wants to merge 1 commit intomainfrom
pr-02-local-dev-dependencies

Conversation

@igorroncevic
Copy link
Copy Markdown
Contributor

@igorroncevic igorroncevic commented May 6, 2026

Description

Add local pinned JS and Python dependencies under dev/.

Context

This gives the template local tool versions instead of asking developers to install Solhint or Slither globally.

Out of Scope

This PR only adds the dependency setup. It does not add Solhint config, Slither config, Justfile commands, CI, or hooks.

Testing Instructions

  • Run npm install --prefix dev.
  • Run python -m venv dev/.venv.
  • Run dev/.venv/bin/pip install -r dev/requirements.txt.
  • Run dev/node_modules/.bin/solhint --version.
  • Run dev/.venv/bin/slither --version.

@socket-security
Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedpypi/​slither-analyzer@​0.11.59410010010070
Addednpm/​solhint@​6.0.39710010088100

View full report

@igorroncevic igorroncevic marked this pull request as ready for review May 6, 2026 15:25
@igorroncevic igorroncevic requested a review from a team as a code owner May 6, 2026 15:25
Comment thread dev/package-lock.json
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CoW DAO has been using pnpm for most modern repos. Examples:

(having used both pnpm and npm myself and migrated, I can confirm pnpm is the superior manager 😆 )

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't particularly mind either way but I agree pnpm is nicer.

Comment thread dev/requirements.txt
@@ -0,0 +1 @@
slither-analyzer==0.11.5
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah jeez is slither actually in python? lame.

I'd almost prefer using the docker release (Docker use is widespread in this org) https://github.com/crytic/slither#using-docker to avoid having this repo depend on foundry, node, and python. But I agree we need slither.

Copy link
Copy Markdown
Contributor

@fedgiac fedgiac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!
The local commands are a bit long, but this will be solved with the makefile.

Comment thread README.md
- Unckeck "Allow merge commits" option
- Check "Allow auto-merge" option
- [ ] Run `forge install` to install the dependencies. This will create a new `foundry.lock` file which you should commit to the project
- [ ] Set up [Local tooling](#local-tooling) so Solhint and Slither use the pinned project versions
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to ask here to update the project versions? Ideally we'd be doing it here automatically with some tool like Dependabot, so maybe it's fine to ignore this and bump version numbers automatically later.

Comment thread dev/package.json
"license": "UNLICENSED",
"devDependencies": {
"solhint": "6.0.3"
}
Copy link
Copy Markdown
Contributor

@fedgiac fedgiac May 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just came to my mind: we can reduce the risk of supply-chain attacks by not installing packages that have been released, say, less than 2 days ago. This gives a new package 2 days to be scrutinized by the community before we install it.
This config parameter has different names based on the chosen NPM manager. For example, for pnpm it's minimumReleaseAge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants