Vendorize Lovart dashboard shell
这个提交包含在:
@@ -34,6 +34,14 @@ REQUIRED_SYSTEM_FIELDS = {
|
||||
"render_policy",
|
||||
}
|
||||
|
||||
FORBIDDEN_RUNTIME_PATTERNS = [
|
||||
"assets-persist.lovart.ai",
|
||||
"cdnjs.cloudflare.com",
|
||||
"remixicon",
|
||||
"fonts.googleapis.com",
|
||||
"fonts.gstatic.com",
|
||||
]
|
||||
|
||||
|
||||
def validate(source_map: Dict[str, Any]) -> List[str]:
|
||||
errors: List[str] = []
|
||||
@@ -82,6 +90,7 @@ def validate(source_map: Dict[str, Any]) -> List[str]:
|
||||
GENERATED_DIR / "latest-ingest.md",
|
||||
GENERATED_DIR / "run-summary.json",
|
||||
GENERATED_DIR / "dashboard" / "index.html",
|
||||
GENERATED_DIR / "dashboard" / "legacy" / "index.html",
|
||||
GENERATED_DIR / "dashboard" / "summary.json",
|
||||
GENERATED_DIR / "dashboard" / "systems.json",
|
||||
GENERATED_DIR / "dashboard" / "runs.json",
|
||||
@@ -89,14 +98,35 @@ def validate(source_map: Dict[str, Any]) -> List[str]:
|
||||
GENERATED_DIR / "dashboard" / "profiles.json",
|
||||
GENERATED_DIR / "dashboard" / "assets" / "app.js",
|
||||
GENERATED_DIR / "dashboard" / "assets" / "styles.css",
|
||||
GENERATED_DIR / "dashboard" / "assets" / "icons.svg",
|
||||
GENERATED_DIR / "dashboard" / "assets" / "design-source.json",
|
||||
GENERATED_DIR / "dashboard" / "legacy" / "assets" / "app.js",
|
||||
GENERATED_DIR / "dashboard" / "legacy" / "assets" / "styles.css",
|
||||
GENERATED_DIR / "dashboard" / "docs" / "project-features.html",
|
||||
GENERATED_DIR / "dashboard" / "docs" / "frontend-dashboard-design.html",
|
||||
GENERATED_DIR / "dashboard" / "docs" / "secure-code-index.html",
|
||||
GENERATED_DIR / "dashboard" / "docs" / "design-source.html",
|
||||
ROOT / "08-threat-intel" / "registry" / "source-confidence.md",
|
||||
]:
|
||||
if not path.exists():
|
||||
errors.append(f"generated artifact missing: {path}")
|
||||
|
||||
runtime_files = [
|
||||
GENERATED_DIR / "dashboard" / "index.html",
|
||||
GENERATED_DIR / "dashboard" / "assets" / "app.js",
|
||||
GENERATED_DIR / "dashboard" / "assets" / "styles.css",
|
||||
GENERATED_DIR / "dashboard" / "legacy" / "index.html",
|
||||
GENERATED_DIR / "dashboard" / "legacy" / "assets" / "app.js",
|
||||
GENERATED_DIR / "dashboard" / "legacy" / "assets" / "styles.css",
|
||||
]
|
||||
for runtime_file in runtime_files:
|
||||
if not runtime_file.exists():
|
||||
continue
|
||||
content = runtime_file.read_text(encoding="utf-8")
|
||||
for pattern in FORBIDDEN_RUNTIME_PATTERNS:
|
||||
if pattern in content:
|
||||
errors.append(f"forbidden runtime dependency in {runtime_file}: {pattern}")
|
||||
|
||||
if not (SECURE_CODE_ROOT / "README.md").exists():
|
||||
errors.append(f"secure-code README missing: {SECURE_CODE_ROOT / 'README.md'}")
|
||||
|
||||
|
||||
在新工单中引用
屏蔽一个用户