KSI validation methods
FedRAMP 20x uses automated methods to persistently verify and validate Key Security Indicators. The platform stores method definitions, observations and historical metrics. Recipes run checks in the provider’s environment; the platform does not connect to AWS or Azure.
pretorin ksi methods list --system SYSTEM_ID --framework fedramp-20x-class-c
pretorin --json ksi methods list --system SYSTEM_ID --framework fedramp-20x-class-c --ksi KSI-CNA-IBP
--framework is always explicit. --system defaults to the active system.
--ksi optionally filters one KSI. Reads require read, scan or write;
method registration and result ingestion need scan or write. Organization
access and token system bindings still apply. The MCP tool list_ksi_methods
requires system_id and framework_id, with optional ksi_id.
The returned methods include latest status, cadence, evidence link and 30-day
run/pass/fail/error counts. A method is current when active and its latest
observation is a pass or fail within its cadence plus 25%. This counts a
working verification method, not a successful security outcome. Errors do not
count as verdicts. Class B needs at least one method per KSI and Class C needs
at least two; these two recipes do not cover every KSI or satisfy Class C alone.
Official cloud recipe checks
The cloud-aws-baseline and cloud-azure-baseline recipes (version 0.2.0)
retain their STIG observation output and add an independent provider check when
run in an explicit FedRAMP 20x Class B or C context. Their existing stig_id
parameter is still required. Region/subscription comes from the frozen recipe
parameters or the provider CLI’s configured default. Class A and other frameworks
do not receive these method writes.
| Recipe check | KSI | Verdict rules |
|---|---|---|
| AWS active Security Hub compliance findings | KSI-CNA-IBP — Implementing Best Practices | Nonempty, complete observations updated within 24 hours: all PASSED means pass; FAILED/WARNING means fail; stale, missing, truncated or undecidable observations mean error |
| Azure Policy configuration summary | KSI-MLA-EVC — Evaluating Configurations | Assessed resources with no noncompliance means pass; noncompliance means fail; empty, inconsistent, truncated or undecidable/exempt observations mean error |
Each is one limited method, not a complete verdict on all aspects of its KSI.
The checks do not treat STIG not_reviewed results as passing. Methods use a
stable recipe-prefixed key and a 24-hour cadence. Every observation receives a
timezone-aware timestamp. Optional evidence_id links supporting evidence
already produced on the same system; the platform validates the evidence scope.
Recipe SDK helpers
A recipe’s ctx.register_ksi_method upserts its stable method key; the first call
creates it and later calls update the same method. source_id is the active
recipe’s ID. Both helpers require an active recipe context and explicit system
and framework. A community recipe that produces evidence can attach that
returned ID when posting its observation:
from datetime import datetime, timezone
registered = await ctx.register_ksi_method(
ksi_id="KSI-CNA-IBP",
method_key="provider-check",
name="Provider configuration check",
kind="configuration_check",
cadence_hours=24,
description="Compare the scoped configuration with provider guidance",
)
await ctx.record_ksi_result(
registered["method"]["id"],
status="pass", # Use the check's actual pass, fail, or error result.
observed_at=datetime.now(timezone.utc),
summary="All checked resources matched the declared policy",
metrics={"resources_checked": 12},
evidence_id=produced_evidence_id,
)
Method kinds include configuration_check, policy_as_code, api_probe,
log_query, vulnerability_scan, test_suite, and other. Cadence ranges from
1 through 8,784 hours. Direct client methods are list_ksi_methods,
register_ksi_method, and post_ksi_results.
A result post contains 1–500 runs. Each needs a status and timezone-aware
observed_at; summary, numeric metrics and an evidence UUID are optional.
Metrics allow at most 50 names (letters, digits, _, ., -, maximum 64
characters, starting with a letter or digit), finite numbers with magnitude at most 1e15, and no coerced strings
or booleans. A run at an already recorded timestamp is skipped, so retries
preserve the observation timestamp rather than generating another one.