Skip to content

chore: add local dependencies#11

Open
igorroncevic wants to merge 2 commits intomainfrom
pr-02-local-dev-dependencies
Open

chore: add local dependencies#11
igorroncevic wants to merge 2 commits 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

socket-security Bot commented May 6, 2026

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 Outdated
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 Author

Choose a reason for hiding this comment

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

I'd stick with venv, it'd be a bit cumbersome to also have to run Docker for each of the deps.

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
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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done, I've set the value to 7 days, as the other CoW repos do!

@igorroncevic igorroncevic requested review from fedgiac and kaze-cow May 8, 2026 11:41
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!

@igorroncevic igorroncevic enabled auto-merge (squash) May 8, 2026 14:10
@igorroncevic igorroncevic disabled auto-merge May 8, 2026 14:10
@igorroncevic igorroncevic requested review from anxolin May 8, 2026 14:11
Copy link
Copy Markdown
Contributor

@anxolin anxolin left a comment

Choose a reason for hiding this comment

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

Approved. I reviewed #13 first and commented on some things that came from this PR.

I would not use nowadays pip, can we use uv has many advantages. See https://docs.astral.sh/uv/guides/migration/pip-to-project/#migrating-to-a-uv-project

Please, make sure you select the correct base branch.

@anxolin
Copy link
Copy Markdown
Contributor

anxolin commented May 9, 2026

nit: Just a small comment more. For future PR, I would personally prefer that instead of adding in one PR the "local dependencies" (with slither and solhint), its more common to introduce the binaries in the PR you introduce the tools.

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.

4 participants