初始化询价智能体新仓:同步本地工程并排除密钥与 .env。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
linmianxun
2026-09-13 14:30:44 +08:00
co-authored by Cursor
commit 2a14def882
2621 changed files with 393165 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
$ErrorActionPreference = 'Stop'
$path = 'C:\yutongda\secure\application-database-credentials.json'
if (-not (Test-Path -LiteralPath $path)) { throw 'Application database credential file missing' }
$acl = New-Object System.Security.AccessControl.FileSecurity
$acl.SetAccessRuleProtection($true, $false)
foreach ($identity in @('BUILTIN\Administrators', 'NT AUTHORITY\SYSTEM')) {
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule($identity, 'FullControl', 'Allow')
$acl.AddAccessRule($rule)
}
Set-Acl -LiteralPath $path -AclObject $acl
$json = Get-Content -Raw -LiteralPath $path | ConvertFrom-Json
[ordered]@{
status = 'PASS'
path = $path
sha256 = (Get-FileHash -LiteralPath $path -Algorithm SHA256).Hash
keys = @($json.PSObject.Properties.Name)
contains_admin_credentials = ($json.PSObject.Properties.Name -contains 'mysql_root' -or $json.PSObject.Properties.Name -contains 'postgres_admin')
secrets_in_output = $false
} | ConvertTo-Json -Compress