保存最小权限初始化防火墙策略与依赖加固检查点

This commit is contained in:
xuans committed 2026-09-16 20:49:26 +08:00
1 parent c98c6050c5
commit 7d374dc10d
19 files changed
+255 -20

No files matched your search

+1
View File
@@ -175,6 +175,7 @@ func renderUnitFile(options Options) (string, error) {
lines = append(lines,
"WorkingDirectory="+quoteUnitValue(normalized.WorkDir),
"ExecStart="+quoteUnitValue(normalized.Executable)+" --config "+quoteUnitValue(normalized.ConfigPath)+" serve",
"Environment=SCERT_BOOTSTRAP_FIREWALL_MODE=external",
"KillSignal=SIGTERM",
"TimeoutStopSec=30",
"Restart=on-failure",
@@ -28,6 +28,7 @@ func TestRenderUnitFileIncludesExecutableConfigurationAndWorkDir(t *testing.T) {
"After=network-online.target",
"RuntimeDirectory=scert",
"RuntimeDirectoryMode=0700",
"Environment=SCERT_BOOTSTRAP_FIREWALL_MODE=external",
"[Service]",
"Type=simple",
"User=Scert",