chore: pre-migration snapshot
Layer0, MCP servers, Terraform consolidation
This commit is contained in:
@@ -10,6 +10,7 @@ from typing import Any, Dict, List
|
||||
from layer0 import layer0_entry
|
||||
from layer0.shadow_classifier import ShadowEvalResult
|
||||
|
||||
from . import __version__ as WAF_INTEL_VERSION
|
||||
from .orchestrator import WAFInsight, WAFIntelligence
|
||||
|
||||
|
||||
@@ -56,11 +57,18 @@ def run_cli(argv: List[str] | None = None) -> int:
|
||||
action="store_true",
|
||||
help="Exit with non-zero code if any error-severity violations are found.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--version",
|
||||
action="version",
|
||||
version=f"%(prog)s {WAF_INTEL_VERSION}",
|
||||
)
|
||||
|
||||
args = parser.parse_args(argv)
|
||||
|
||||
# Layer 0: pre-boot Shadow Eval gate.
|
||||
routing_action, shadow = layer0_entry(f"waf_intel_cli file={args.file} limit={args.limit}")
|
||||
routing_action, shadow = layer0_entry(
|
||||
f"waf_intel_cli file={args.file} limit={args.limit}"
|
||||
)
|
||||
if routing_action != "HANDOFF_TO_LAYER1":
|
||||
_render_layer0_block(routing_action, shadow)
|
||||
return 1
|
||||
@@ -90,7 +98,9 @@ def run_cli(argv: List[str] | None = None) -> int:
|
||||
print(f"\nWAF Intelligence Report for: {path}\n{'-' * 72}")
|
||||
|
||||
if not insights:
|
||||
print("No high-severity, high-confidence issues detected based on current heuristics.")
|
||||
print(
|
||||
"No high-severity, high-confidence issues detected based on current heuristics."
|
||||
)
|
||||
return 0
|
||||
|
||||
for idx, insight in enumerate(insights, start=1):
|
||||
@@ -119,7 +129,9 @@ def run_cli(argv: List[str] | None = None) -> int:
|
||||
if insight.mappings:
|
||||
print("\nCompliance Mapping:")
|
||||
for mapping in insight.mappings:
|
||||
print(f" - {mapping.framework} {mapping.control_id}: {mapping.description}")
|
||||
print(
|
||||
f" - {mapping.framework} {mapping.control_id}: {mapping.description}"
|
||||
)
|
||||
|
||||
print()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user