Skip to content

Commit efadd20

Browse files
committed
fix(hooks): repair @socketsecurityhook- regression in package names + sync canonical formatting
A botched perl rename had corrupted hook package.json names from '@socketsecurity/hook-path-guard' to '@socketsecurityhook-path-guard' (missing trailing slash), and a second pass converted that to '@socketsecurityhookhook-pathhook-guard' with the test script mangled to 'node hook-hook-test'. README and test-file references inherited the same broken substring. This commit overwrites all hook package.json files with canonical contents, scrubs '@socketsecurityhook-' from README/test refs, and syncs scripts/check-paths.mts and the path-guard skill reference template to the formatted version. Verified: gate passes + 29/29 path-guard tests pass on all 7 fleet primaries; every path-guard canonical file is now byte-identical across the fleet.
1 parent 7b05a28 commit efadd20

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

.claude/hooks/check-new-deps/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@socketsecurityhook-check-new-deps",
2+
"name": "hook-check-new-deps",
33
"private": true,
44
"type": "module",
55
"main": "./index.mts",
@@ -11,7 +11,7 @@
1111
},
1212
"dependencies": {
1313
"@socketregistry/packageurl-js": "1.4.2",
14-
"@socketsecurity/lib": "5.24.0",
14+
"@socketsecurity/lib": "catalog:",
1515
"@socketsecurity/sdk": "4.0.1"
1616
},
1717
"devDependencies": {

.claude/skills/path-guard/reference/check-paths.mts.tmpl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,8 @@ const loadAllowlist = (): AllowlistEntry[] => {
229229
blockLines = []
230230
return
231231
}
232-
;(current as any)[key] = key === 'line' ? Number(unquote(trimmed)) : unquote(trimmed)
232+
;(current as any)[key] =
233+
key === 'line' ? Number(unquote(trimmed)) : unquote(trimmed)
233234
}
234235
if (line.startsWith('- ')) {
235236
if (current && current.reason) {
@@ -317,8 +318,7 @@ const isAllowlisted = (finding: Finding): boolean =>
317318
const hashProvided =
318319
typeof entry.snippet_hash === 'string' && entry.snippet_hash.length > 0
319320
if (lineProvided || hashProvided) {
320-
const lineMatches =
321-
lineProvided && entry.line === finding.line
321+
const lineMatches = lineProvided && entry.line === finding.line
322322
const hashMatches =
323323
hashProvided && entry.snippet_hash === snippetHash(finding.snippet)
324324
if (!(lineMatches || hashMatches)) {
@@ -382,7 +382,8 @@ const STRING_LITERAL_RE = /(['"])((?:\\.|(?!\1)[^\\])*)\1/g
382382
// (including those with `${...}` placeholders) so Rule A also catches
383383
// path construction via template literals like
384384
// `${buildDir}/out/Final/${binary}` or `build/${mode}/out/Final`.
385-
const TEMPLATE_LITERAL_RE = /`((?:\\.|(?:\$\{(?:[^{}]|\{[^{}]*\})*\})|(?!`)[^\\])*)`/g
385+
const TEMPLATE_LITERAL_RE =
386+
/`((?:\\.|(?:\$\{(?:[^{}]|\{[^{}]*\})*\})|(?!`)[^\\])*)`/g
386387
387388
/**
388389
* Convert a template-literal body into a synthetic forward-slash path

0 commit comments

Comments
 (0)