Skip to content

Conversation

@NicholasEllul
Copy link
Contributor

@NicholasEllul NicholasEllul commented Sep 12, 2025

Summary

This pull request adds a semgrep rule that flags usage of npx to install dependencies. Instead, it suggests installing the dependency to the project, and invoking it using the project's package manager. At this point in time, we are not intending to flag npx usage found in README files to focus developer efforts on the highest priority items (npx usage in code).

For reviewers

To rest this rule against a local repo or file, check out this branch and run the following:

./bin/scan <path to folder to scan>

Please let me know if there are any other test cases or scenarios that I am missing in the semgrep tests. These tests can be run by executing ./bin/test

Visit this page for a reminder regarding how these rules get rendered in GitHub's UI.

@NicholasEllul NicholasEllul requested a review from a team as a code owner September 12, 2025 15:54
@NicholasEllul NicholasEllul merged commit 05d2bc4 into main Sep 15, 2025
4 checks passed
@NicholasEllul NicholasEllul deleted the ellul/npx branch September 15, 2025 14:04
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