lirantal / lockfile-lint

Lint an npm or yarn lockfile to analyze and detect security issues
Apache License 2.0
781 stars 35 forks source link

feat: allowed package name aliases #176

Closed lirantal closed 1 year ago

lirantal commented 1 year ago

Description

Fix #175

Types of changes

Package name aliases such as depicted in #175 would cause the --validate-package-names flag to trigger an issue. This PR creates a new trusted policy allow-list to match package names with their alias as pairs.

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 69.56% and project coverage change: +0.08% :tada:

Comparison is base (e76cce1) 97.87% compared to head (ffc5ac7) 97.96%. Report is 2 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #176 +/- ## ========================================== + Coverage 97.87% 97.96% +0.08% ========================================== Files 13 13 Lines 377 393 +16 Branches 85 88 +3 ========================================== + Hits 369 385 +16 Misses 8 8 ``` | [Files Changed](https://app.codecov.io/gh/lirantal/lockfile-lint/pull/176?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Liran+Tal) | Coverage Δ | | |---|---|---| | [packages/lockfile-lint/src/config.js](https://app.codecov.io/gh/lirantal/lockfile-lint/pull/176?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Liran+Tal#diff-cGFja2FnZXMvbG9ja2ZpbGUtbGludC9zcmMvY29uZmlnLmpz) | `100.00% <ø> (ø)` | | | [...le-lint-api/src/validators/ValidatePackageNames.js](https://app.codecov.io/gh/lirantal/lockfile-lint/pull/176?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Liran+Tal#diff-cGFja2FnZXMvbG9ja2ZpbGUtbGludC1hcGkvc3JjL3ZhbGlkYXRvcnMvVmFsaWRhdGVQYWNrYWdlTmFtZXMuanM=) | `84.09% <65.00%> (-15.91%)` | :arrow_down: | | [packages/lockfile-lint/src/validators/index.js](https://app.codecov.io/gh/lirantal/lockfile-lint/pull/176?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Liran+Tal#diff-cGFja2FnZXMvbG9ja2ZpbGUtbGludC9zcmMvdmFsaWRhdG9ycy9pbmRleC5qcw==) | `100.00% <100.00%> (+13.46%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.