Skip to content

Exclude npm devDependencies by default in verify#688

Open
gyubin02 wants to merge 1 commit intoDataDog:mainfrom
gyubin02:gyubin02/npm-enable-dev-deps-env
Open

Exclude npm devDependencies by default in verify#688
gyubin02 wants to merge 1 commit intoDataDog:mainfrom
gyubin02:gyubin02/npm-enable-dev-deps-env

Conversation

@gyubin02
Copy link
Copy Markdown

Closes #528

Summary

Exclude npm devDependencies from guarddog npm verify by default.

Changes

  • add GUARDDOG_NPM_INCLUDE_DEV_DEPENDENCIES config flag
  • only include devDependencies in the npm project scanner when the env var is true
  • document the env var in the README
  • add tests for the default and opt-in behaviors

Testing

  • poetry run pytest tests/core/test_npm_requirements_scanner.py

This follows the maintainer direction to make excluding devDependencies the default behavior, while allowing opt-in inclusion
via environment variable.

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.

Feature Request: Option to Ignore Dev Dependencies for NPM

1 participant