File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
.claude/hooks/setup-security-tools Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ async function setupZizmor(): Promise<boolean> {
127127 throw new Error ( `Unsupported platform: ${ platformKey } ` )
128128 }
129129 const { asset, sha256 : expectedSha } = platformEntry
130- const repo = ZIZMOR . repository ?. replace ( / ^ g i t h u b : / , '' ) ?? ''
130+ const repo = ZIZMOR . repository ?. replace ( / ^ [ ^ : ] + : / , '' ) ?? ''
131131 const url = `https://github.com/${ repo } /releases/download/v${ ZIZMOR . version } /${ asset } `
132132
133133 logger . log ( `Downloading zizmor v${ ZIZMOR . version } (${ asset } )...` )
@@ -184,7 +184,7 @@ async function setupSfw(apiKey: string | undefined): Promise<boolean> {
184184
185185 // Checksum + asset.
186186 const { asset , sha256 } = platformEntry
187- const repo = sfwConfig . repository ?. replace ( / ^ g i t h u b : / , '' ) ?? ''
187+ const repo = sfwConfig . repository ?. replace ( / ^ [ ^ : ] + : / , '' ) ?? ''
188188 const url = `https://github.com/${ repo } /releases/download/${ sfwConfig . version } /${ asset } `
189189 const binaryName = isEnterprise ? 'sfw' : 'sfw-free'
190190
Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ async function updateZizmor(config: Config): Promise<UpdateResult> {
146146 return { tool, skipped : true , updated : false , reason : 'not in config' }
147147 }
148148
149- const repo = toolConfig . repository ?. replace ( / ^ g i t h u b : / , '' ) ?? 'zizmorcore/zizmor'
149+ const repo = toolConfig . repository ?. replace ( / ^ [ ^ : ] + : / , '' ) ?? 'zizmorcore/zizmor'
150150
151151 let release : GhRelease
152152 try {
@@ -265,7 +265,7 @@ async function updateSfwTool(
265265 return { tool : toolName , skipped : true , updated : false , reason : 'not in config' }
266266 }
267267
268- const repo = toolConfig . repository ?. replace ( / ^ g i t h u b : / , '' )
268+ const repo = toolConfig . repository ?. replace ( / ^ [ ^ : ] + : / , '' )
269269 if ( ! repo ) {
270270 return { tool : toolName , skipped : true , updated : false , reason : 'no repository' }
271271 }
You can’t perform that action at this time.
0 commit comments