mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-05-17 22:33:06 +08:00
fix: tighten supply-chain IOC package matching
This commit is contained in:
committed by
Affaan Mustafa
parent
eb59afb590
commit
7420441512
@@ -154,6 +154,30 @@ function run() {
|
||||
});
|
||||
})) passed++; else failed++;
|
||||
|
||||
if (test('does not combine package-name substrings with unrelated versions', () => {
|
||||
withFixture({
|
||||
'package-lock.json': JSON.stringify({
|
||||
packages: {
|
||||
'node_modules/react-remove-scroll': {
|
||||
version: '2.6.3',
|
||||
},
|
||||
'node_modules/@tailwindcss/node': {
|
||||
version: '4.2.1',
|
||||
dependencies: {
|
||||
lightningcss: '1.31.1',
|
||||
},
|
||||
},
|
||||
'node_modules/lightningcss': {
|
||||
version: '1.31.1',
|
||||
},
|
||||
},
|
||||
}, null, 2),
|
||||
}, rootDir => {
|
||||
const result = scanSupplyChainIocs({ rootDir });
|
||||
assert.deepStrictEqual(result.findings, []);
|
||||
});
|
||||
})) passed++; else failed++;
|
||||
|
||||
if (test('does not flag benign substrings in clean package scripts', () => {
|
||||
withFixture({
|
||||
'node_modules/uuid/package.json': JSON.stringify({
|
||||
|
||||
Reference in New Issue
Block a user