File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4040 "/^(&\\ s+)?git\\ s+(worktree\\ s+list|remote(\\ s+(-v|show))?|config\\ s+--get)(?!.*[;&|<>])/" : true ,
4141 "/^(&\\ s+)?git\\ s+stash(\\ s+(push|apply|pop|list|show|drop|branch)(\\ s+[^;&|<>]+)*)?(?!.*[;&|<>])/" : true ,
4242
43+ // GitHub CLI read-only operations only
44+ // Explicitly allow read verbs (view/list/status/search) and block chained/redirection patterns.
45+ "/^(&\\ s+)?gh\\ s+(pr|issue|repo|run|release|workflow|label|milestone|project|discussion|gist)\\ s+(view|list|status)\\ b(?!.*[;&|<>])/i" : true ,
46+ "/^(&\\ s+)?gh\\ s+search\\ s+(prs|issues|repos|commits|code)\\ b(?!.*[;&|<>])/i" : true ,
47+ // gh api is approved only when no explicit mutating method is specified.
48+ "/^(&\\ s+)?gh\\ s+api\\ b(?!.*\\ s(-X|--method)\\ s*(POST|PUT|PATCH|DELETE)\\ b)(?!.*[;&|<>])/i" : true ,
49+
4350 // Python/scripting (consolidated)
4451 "/^(&\\ s+)?python\\ s+(scripts\\ /|-m|\\ .github\\ /)(?!.*[;&|<>])/" : true ,
4552 "/^(&\\ s+)?\\ .[\\\\ /]scripts[\\\\ /](?!.*[;&|<>])/" : true ,
Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ function Stop-ConflictingProcesses {
128128function Get-WorktreeMutexName {
129129 param ([Parameter (Mandatory )][string ]$RepoRoot )
130130
131- $normalizedRepoRoot = [System.IO.Path ]::GetFullPath($RepoRoot ).TrimEnd(' \\ ' , ' /' )
131+ $normalizedRepoRoot = [System.IO.Path ]::GetFullPath($RepoRoot ).TrimEnd(' \' , ' /' )
132132 $normalizedRepoRoot = $normalizedRepoRoot.ToLowerInvariant ()
133133
134134 $bytes = [System.Text.Encoding ]::UTF8.GetBytes($normalizedRepoRoot )
@@ -142,7 +142,7 @@ function Get-WorktreeMutexName {
142142
143143 $hash = [System.BitConverter ]::ToString($hashBytes ).Replace(' -' , ' ' )
144144 $shortHash = $hash.Substring (0 , 16 )
145- return " Global\\ FieldWorks.Worktree.$shortHash "
145+ return " Global\FieldWorks.Worktree.$shortHash "
146146}
147147
148148function Enter-WorktreeLock {
@@ -178,7 +178,7 @@ function Enter-WorktreeLock {
178178 $hasHandle = $true
179179 }
180180
181- $lockPath = Join-Path $RepoRoot " Output\\ WorktreeRun.lock.json"
181+ $lockPath = Join-Path $RepoRoot ' Output' | Join-Path - ChildPath ' WorktreeRun.lock.json'
182182
183183 if (-not $hasHandle ) {
184184 $ownerDetails = $null
You can’t perform that action at this time.
0 commit comments