Skip to content

Commit e34d380

Browse files
committed
fix(security): complete F-04 sensitive suffix matching
1 parent c7b10fc commit e34d380

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/autopilot-operator.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function Assert-SafeChangeSet {
4040
if (-not $Paths -or $Paths.Count -eq 0) { throw "No changed files found." }
4141
if ($Paths.Count -gt $MaxFiles) { throw "Change set has $($Paths.Count) files; limit is $MaxFiles." }
4242

43-
$sensitive = '(^|/)(\.env($|\.)|credentials($|\.)|secrets?($|\.)|id_[^/]+|[^/]+\.(pem|key|pfx|p12))$'
43+
$sensitive = '(^|/)(\.env($|\.)|credentials?($|\.)|secrets?($|\.)|id_[^/]+$|[^/]+\.(pem|key|pfx|p12)$)'
4444
foreach ($path in $Paths) {
4545
$normalized = $path.Replace('\', '/')
4646
if ($normalized -match $sensitive) { throw "Sensitive path blocked: $path" }

0 commit comments

Comments
 (0)