-
Notifications
You must be signed in to change notification settings - Fork 0
oscal presence gate.stub
id: oscal-presence-gate name: OSCAL Presence Gate repo_path: ~/Documents/sw30labs/repos/oscal-presence-gate remote_url: https://github.com/sw30labs/oscal-presence-gate.git primary_language: Python framework: jsonschema + optional LangGraph StateGraph category: oscal-compliance stacks: [oscal, compliance, agentic, langgraph, cli] ingested: 2026-07-29 last_commit_date: 2026-07-28
OSCAL as the policy brain for WHERE, not just WHAT. Presence-aware guardrails for delegated AI-agent traffic under EO 14117 / DOJ Data Security Program (28 CFR Part 202) and the CISA Security Requirements for Restricted Transactions. Sibling of oscal-skills-guardrails: that repo gates what an agent may load; this one gates where the human it serves is standing. Motivating scenario: an analyst's still-valid delegated token lets an agent in a Virginia datacenter render covered US customer data to a Slack thread in Shanghai — every identity control passes, the outcome is still the one the controls exist to prevent. OAuth propagates identity through every hop (act, RFC 8693); nothing propagates presence. v0.2, Apache-2.0, "From Article to Artefacts, Vol 3" — companion code to the OAuth/presence article.
Pipeline: User Intent → Planner → Presence Verifier → Policy Enforcer → (maybe) Tool → Responder — same chassis as oscal-agent-guardrails plus one node; the tool is never invoked unless explicitly allowed. The presence verifier runs ahead of the enforcer: stale, absent, unsigned, or integrity-failed assertions all collapse to unknown, and unknown fails closed for covered data. Six-row decision table (unknown tool → deny; non-covered tool → allow; autonomous pipeline → allow flagged pres-4; unknown presence → deny fail-closed; blocked country (CN incl. HK/MO, RU, IR, KP, CU, VE) → deny; fresh attestation + allowed country → allow). Every decision is emitted as an OSCAL assessment-results observation with the full delegation-custody record embedded — anti-phantom-control by construction. Runtime policy (blocked countries, PT1H attestation window, PT8H delegation TTL, P12M retention) is loaded from OSCAL files, not code. opg CLI (demo, validate); optional [graph] extra re-expresses the pipeline as a LangGraph StateGraph; 18 tests including the Shanghai scenario end-to-end.
jsonschema (validation against vendored official NIST OSCAL v1.1.3 schemas — offline), regex; extras: [graph] langgraph>=0.2, [test] pytest>=8. Python 3.10+, hatchling build.
No workflow files in-repo; validation runs via opg validate and pytest (README badge: 18 passing). All OSCAL content and generated evidence validated against the vendored NIST v1.1.3 schemas.
-
dsp-cisa-security-requirements-catalog.json— unofficial OSCAL encoding of the CISA Security Requirements (Sections I–II, 20 controls, verbatim against rendered page images; draft SP 800-53 rev 5 mappings as props) — to the author's knowledge the first public one. -
presence-propagation-overlay-catalog.json— five PRES controls (presence as attested claim, enforcement at initiation and delivery, bounded delegation lifetimes, principal-based traffic classification, custody logging). -
profiles/restricted-transaction-baseline.json— imports both catalogs, pins runtime parameters. -
presence-gate-component-definition.json— presence-attestation-service, location-gate-middleware (FastAPI-targeted), delivery-surface-gate.
- oscal-skills-guardrails — admission-time sibling (what may load vs where the human stands)
- oscal-agent-guardrails — same pipeline chassis, one node fewer
- driftlab — runtime observation side of the OSCAL-as-policy family
- Tags: [oscal, nist, compliance, security, zero-trust, python, cli, langgraph]