Skip to content

Commit 458125c

Browse files
ljharbclaude
andcommitted
fix: use exact equality instead of startsWith for URL assertion
Addresses CodeQL "Incomplete URL substring sanitization" warning. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent cd99dfd commit 458125c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

test/lib/commands/publish.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ t.test('publish-registry config does not affect install registry', async t => {
113113
authorization: token,
114114
})
115115
t.equal(npm.config.get('registry'), 'https://registry.npmjs.org/')
116-
t.ok(npm.config.get('publish-registry').startsWith(publishRegistry))
116+
t.equal(npm.config.get('publish-registry'), alternateRegistry + '/')
117117
})
118118

119119
t.test('re-loads publishConfig.registry if added during script process', async t => {

0 commit comments

Comments
 (0)