Skip to content

Find the holes before someone else does. A fast, 100% Rust vulnerability scanner: XSS, SQL injection, leaked secrets, dependency CVEs and AI agent setups.

Add a classic yarn.lock fixture to the dependency test (#75)

Prashanta2069dedcec6
diff --git a/tests/fixtures/deps/EXPECTED b/tests/fixtures/deps/EXPECTED
index 59b36f0..ee6586a 100644
--- a/tests/fixtures/deps/EXPECTED
+++ b/tests/fixtures/deps/EXPECTED
@@ -7,3 +7,4 @@ php/composer.lock:5 dependency.known-vulnerability
pnpm/pnpm-lock.yaml:29 dependency.known-vulnerability
uv/uv.lock:6 dependency.known-vulnerability
dart/pubspec.lock:24 dependency.known-vulnerability
+yarn/yarn.lock:6 dependency.known-vulnerability
diff --git a/tests/fixtures/deps/yarn/yarn.lock b/tests/fixtures/deps/yarn/yarn.lock
new file mode 100644
index 0000000..8c73ebd
--- /dev/null
+++ b/tests/fixtures/deps/yarn/yarn.lock
@@ -0,0 +1,12 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+# yarn lockfile v1
+
+
+lodash@^4.17.20:
+ version "4.17.20"
+ resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz"
+
+ms@^2.1.3:
+ version "2.1.3"
+ resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz"
+
\ No newline at end of file
diff --git a/tests/scan.rs b/tests/scan.rs
index 0ea991b..781e772 100644
--- a/tests/scan.rs
+++ b/tests/scan.rs
@@ -146,6 +146,6 @@ fn deps() {
include_tests: false,
};
// The web/yarn.lock fixture contains a `my-app@workspace:.` entry that must be
- // skipped (not counted as a dependency). The expected package count stays 20.
- check_with("deps", options, Some(20));
+ // skipped (not counted as a dependency). The expected package count stays 22.
+ check_with("deps", options, Some(22));
}