Applied AI-Accelerated Government Development

Approved Tools, Approved Endpoints

Updated

Intermediate

What you'll learn

~40 min
  • Obtain a written CUI (Controlled Unclassified Information, the government's category for sensitive-but-unclassified data) determination for your dev environment and turn its conditions into automated checks
  • Look up an AI service by offering in the FedRAMP Marketplace (the government's list of cloud service offerings and their FedRAMP designation and status), read its designation, status and level as the record states them, and check the result against your agency's own list
  • Pin your AI CLI's permissions, deny list, OS sandbox (operating-system confinement of the commands the tool runs) and network egress allowlist (the hosts those commands may call; everything else is refused) in project settings that a repo check can verify
  • Record which tool and endpoint produced a change in commit trailers, so the agency's AI use case inventory can be answered from the history

You are about to point an AI CLI at the code for the case-intake rebuild: a mid-sized agency’s intake office is replacing a 2000s-era app, and the repository holds real field names, real queue names, and real rules. Before the first prompt, two questions need answers on paper: may this repository’s content go to a model at all, and which model endpoint did the agency authorize for it. This lesson gets both answers, then makes the repository enforce them so that a tired afternoon cannot undo them.

Before the detail — Artifact: a small guard kit in the repository (a rules file, a scan script, an endpoint check, a commit-message check) plus the CLI’s project settings. Acceptance test: a planted CUI-shaped marker is blocked and logged, a benign file passes, and an unapproved endpoint in config fails a check, all without calling any live service. Status of what follows: the determination step and the ISOO prohibition are binding on agency personnel; everything else is reusable guidance you adapt to your agency’s list.

Step one is a determination, not a tool

A sanctioned development environment is not a CUI determination. Your agency may have approved a laptop image, a network, and a CLI, and none of that says whether the contents of this repository may be pasted into a prompt. Source code is not exempt from the question, because what a file says matters more than its extension. Examples worth putting to your CUI program manager: configuration for a production network, details of a vulnerability in an information system, and export-controlled software. Whether any of them is CUI for your agency is not a settled category. Confirm each against the CUI Registry (the National Archives’ list of CUI categories) and get the program manager’s answer for your repository.

Ask the people who own the answer: the agency’s CUI program manager or your ISSO (the security officer who signs off on your system’s controls). Ask in writing, and ask for conditions you can check. A usable determination file looks like this:

DETERMINATION (illustrative wording - yours comes from your CUI program manager or ISSO)
Scope: repository intake-rebuild, development environment only
Allowed: source code and tests that contain none of the items below
Excluded: 1. secrets and credentials of any kind
2. production configuration and network detail (addresses, hostnames)
3. export-controlled content
4. any text carrying a CUI marking
Owner: CUI program manager; reviewed on any change of scope

Each excluded line becomes a check. That is the move of this lesson: a condition that lives only in a memo is a hope, and a condition that lives in a pre-commit hook is a control.

Why the stakes are real: ISOO Notice 2026-01 (March 30, 2026) from the National Archives’ Information Security Oversight Office, the executive branch’s CUI oversight office, says that if an AI system is Internet-enabled, connected to infrastructure external to the agency’s control, or otherwise connected to environments that do not meet CUI protection standards, agency personnel are prohibited from inputting CUI on it. The underlying regulation, 32 CFR Part 2002, is silent on AI. The notice also does not say “use only FedRAMP-authorized tools”; do not repeat that as if it were its text. Source: ISOO Notice 2026-01.

Plan the rules with your agent

Open your workspace agent at the project root, switch to Plan mode (Shift+Tab, /plan, or the desktop app’s mode picker), and ask it to plan the rules file from your determination:

Here are the four excluded categories from our CUI determination. Plan a pattern-rules file for detectable lines, and list what still needs human review. Ask anything unclear.

What to check in the plan before you approve

  • policy/cui-rules.json is a JSON array of { id, pattern, why } objects where each regular expression matches one line of text.
  • The patterns use generic marking shapes only and never copy real marking text from your agency’s documents.
  • Every excluded category that cannot be reduced to a regular expression is listed separately with what a human reviewer must check instead.

If the first plan embeds real markings or skips the human-review list, nudge it before approving:

Use generic marking forms only, not real text from our documents, and separate the human-review items from the regex rules.

That distinction matters. A regex catches the shape of a marking or a secret, never the meaning of a paragraph. Export-controlled content in particular is a judgment about what the code does, so the honest output of this step is some rules plus a short list of things only a person can check.

Which tool, which endpoint: the method

You will not find an approved-endpoint list in this lesson, on purpose. Certifications change, and each agency’s approvals differ. What lasts is the lookup, and it has five moves.

  1. Name the offering, not the brand. A vendor sells many services under one name. The one you will call (a specific API, a specific hosted feature) is what gets certified, and its sibling may not be.
  2. Find the listing. Search the FedRAMP Marketplace by provider, then open the product for that offering and note its package ID. The Marketplace’s underlying data is public in the FedRAMP marketplace data repository, which is useful when you want to script the lookup.
  3. Read three fields, as the record states them. First the designation and status. FedRAMP’s Marketplace designations page names two designations: FedRAMP Certified for the Rev5 program (a point-in-time assessment) and FedRAMP Validated for 20x (security posture validated persistently). An offering still working toward one shows a progress status instead, and FedRAMP has defined more than one such stage, so do not collapse the field to “certified or not”: copy the exact value. Second, the program (Rev5 or 20x). Third, the level. FedRAMP is moving from the old Low / Moderate / High categories to a new level scheme, so record the level in the record’s own terms and let your ISSO map it to your data. An offering with no record is simply not listed.
  4. Check the boundary. The exact feature you will call must sit inside the services the listing names as in scope, and only a completed designation (Certified or Validated) counts as evidence; a progress status does not. An add-on outside the boundary is not covered by the parent’s listing.
  5. Match the level to your data, then to your agency. A Marketplace certification is evidence for your agency’s own authorization to operate (the ATO, the signed decision to run a system, which the agency grants itself), not a substitute for it. Your agency’s list of approved tools, and its generative AI use policy (OMB memo M-25-21, April 2025, asks agencies to develop one), decide what you may actually use.

The result is one row you can hand to your ISSO: offering, listing ID, designation and status, level, boundary check, your agency’s approval reference. The determination from the first section tells you whether this repository’s content may go there; the lookup tells you whether the endpoint is acceptable at all. You need both.

Your agent records the approved hostnames and short endpoint IDs in policy/approved-endpoints.json so your repository checks and sandbox settings read one list (reference shape with placeholder values shown):

{
"hosts": ["llm-gateway.agency.example"],
"ids": ["agency-gateway-il4"]
}

Project settings that make the pin real

The CLI runs where you run it, so its configuration is part of the control. Three layers, narrowest wins:

LayerWho owns itWhat goes there
Managed settingsThe agency (IT or security)Endpoint and model pin, telemetry switches, anything you must not be able to override
Project settings, checked into the repoThe teamPermission allowlist, deny list, hook wiring
Personal settingsYouPreferences only

The deny list is the cheap, deterministic floor: paths the agent cannot read or write however it is prompted. For this repository that is the environment files and the infrastructure directory.

REFERENCE CONFIG .claude/settings.json: project permission allowlist and path deny list open reference hide reference Reference pattern for your workspace agent; open to inspect or compare this file. You do not type or paste this by hand.
{
"permissions": {
"allow": [
"Bash(npm run test:*)",
"Bash(npm run lint)"
],
"deny": [
"Read(./.env)",
"Read(./.env.*)",
"Read(./infra/**)",
"Edit(./infra/**)",
"Edit(./policy/**)"
]
}
}

The JSON above is Claude Code’s permissions shape. Each of the four tools spells the same two jobs differently, a deny on a path and a deny on a command, and where the rule lives differs too:

DenyClaude CodeCodexAntigravityCopilot
A pathEdit(./secrets/**), Read(./.env) in permissions.deny[permissions.<name>.filesystem] with "**/*.env" = "deny" (beta)write_file(.env) in permissions.deny--deny-tool='write(.env)'
A commandBash(rm *) in permissions.denyprefix_rule(pattern=["rm"], decision="forbidden") in a .rules filecommand(rm -rf) in permissions.deny--deny-tool='shell(rm:*)'
Precedencedeny, then ask, then allowthe most restrictive rule winsDeny, then Ask, then Allowa denial beats even --allow-all-tools

Two traps are worth a line each. In Claude Code, Write(...), NotebookEdit(...) and Glob(...) rules are accepted and never match anything, so spell file rules with Edit and Read, as above. In Copilot, no persistent project-file form for deny rules was documented in what we read, so the flags belong in a wrapper script or your agency’s managed policy folder. Dated facts for each row are in the status box at the end.

Edit(./policy/**) is in the list so the agent cannot loosen the very rules that guard it. Keys for the model, the endpoint, and telemetry (many agencies turn non-essential traffic off) are also tool-specific. Put them in managed settings where your agency can, and where it cannot, in project settings plus the endpoint check below, which fails the build when a config file names a host that is not on your approved list.

Hooks, project memory (AGENTS.md), and MCP servers are the next layer and have their own lessons: Context Engineering (Module 19, lesson 2), MCP servers (Module 19, lesson 3), and Skills and hooks (Module 19, lesson 4). This lesson only uses one hook, below.

A deny list is not a wall: the OS sandbox and the egress allowlist

A deny rule decides what the tool is allowed to ask for. It does not confine the programs the tool then runs: a test runner or a one-line script started with an allowed command can still read any file you can read and call any host. Claude Code’s own documentation says a deny on a shell command “isn’t a security boundary around the program” and pairs it with the sandbox’s network allowlist. Two controls close that gap, and both belong next to the deny list in the repository’s settings:

  • The OS sandbox confines the commands the tool runs to the project folder, using the operating system’s own isolation (Seatbelt on macOS, bubblewrap on Linux and WSL2).
  • The egress allowlist lets those commands reach only hosts you name. It is the approved-endpoint list again, enforced at the network instead of checked in a config file.

The two together turn “the tool will not read .env” into “no command the tool starts can read it or send it anywhere.”

Plan the sandbox settings with your agent

With policy/approved-endpoints.json created from your lookup above, in Plan mode ask your agent to wire the command sandbox and network allowlist into the repository’s settings:

Read this repository's AI CLI settings and policy/approved-endpoints.json (or create a starter stub first). Plan the settings diff to turn on the command sandbox and lock network egress to those hosts without touching policy/**.

Four tools, one control

TechniqueClaude CodeCodexAntigravityCopilot
OS sandbox on"sandbox": {"enabled": true} or /sandbox--sandbox read-only|workspace-write|danger-full-access; codex sandbox <cmd>--sandbox or "enableTerminalSandbox": true--sandbox or /sandbox enable
Network egress allowlistsandbox.network.allowedDomains (starts empty), deniedDomains[permissions.<name>.network.domains] plus features.network_proxy = true (beta)read_url(domain) allow rules feed the sandbox allowlist--allow-url / --deny-url, url(...) rules; the sandbox’s network policy

Here is the reference shape your agent writes for Claude Code’s project settings:

{
"sandbox": {
"enabled": true,
"network": { "allowedDomains": ["llm-gateway.agency.example"] }
}
}

and the reference shape for Antigravity’s user settings file:

{
"enableTerminalSandbox": true,
"permissions": { "allow": ["read_url(llm-gateway.agency.example)"] }
}

For Codex, the domain rules live in a permission profile and do nothing unless the network proxy feature is on, so a profile without that switch looks protective and is not. Copilot’s sandbox is off until you enable it, and its built-in file edits are not covered by it: the deny rules above are what guard those. On a Windows workstation, work in WSL2 (Lesson 0), because Claude Code’s sandbox does not run on native Windows. Antigravity’s unattended auto mode requires its sandbox and is a hold for agency accounts; the status box says why. Your agency decides which of these four it has approved.

SESSION Egress: the sandbox refuses a host that is not on the list
  1. Typed in the terminal: claude
  2. Mode:Plan mode
  3. You type in the session: Read this repository's AI CLI settings. Turn on the command sandbox and set the network allowlist to exactly the hosts in policy/approved-endpoints.json. Show me the settings diff.
  4. The tool replies: I read policy/approved-endpoints.json: one host, llm-gateway.agency.example. Proposed change to the project settings: sandbox.enabled = true sandbox.network.allowedDomains = ["llm-gateway.agency.example"] I did not touch policy/**. Commands I run will now be confined to this project folder and can reach only that host.
  5. You type in the session: Run npm install and tell me what happens.
  6. The tool replies: The sandbox's proxy refused the connection to the package registry: that host is not on the allowlist. I will not add it myself. Package hosts are an approval decision, and the allowlist is in a reviewed settings file. Options: 1. A pull request that adds the registry host, carrying your ISSO's approval reference. 2. Your agency's internal mirror, if it has one, added the same way. Which do you want?
  7. You type in the session: Show me the evidence: what did the sandbox block, and did anything leave the machine?
  8. The tool replies: One refused outbound connection, to the registry host, from the npm install command. No other network attempt was made by commands I ran this session. Nothing was installed, and git status shows no changed files.

Illustrative session; exact output varies by tool and agency configuration.

Nothing in this transcript is a live call: it shows the shape of the evidence you ask for. In your own repository, the proof is a command that tries a host that is not on the list and fails, as in the Prove it section below.

A guard that blocks and logs which rule fired

The guard has one job: refuse CUI-shaped text, and keep a record of which rule fired. It never writes the matched text anywhere, because a log that copies the marker has become the leak.

Plan the change with your agent

With policy/cui-rules.json (planned in Step one) and policy/approved-endpoints.json in place, switch your agent to Plan mode (Shift+Tab, /plan, or the desktop app’s mode picker) in the project root, and ask it to plan the pattern guard and endpoint checker:

Read policy/cui-rules.json and policy/approved-endpoints.json (or create starter stubs if missing). Plan a Node guard script that scans staged files or stdin for CUI patterns and a second script that checks config files for unapproved hosts.

What to check in the plan before you approve

  • scripts/guard/cui-guard.mjs runs in Node with no external dependencies and supports --staged (reading staged git blobs), --stdin, or explicit file paths.
  • Every match appends one JSON line to .ai-guard/log.jsonl with timestamp, rule ID, file, and line number, prints a BLOCKED line to stderr, exits with code 2, and never records the matched text.
  • scripts/guard/check-endpoints.mjs reads policy/approved-endpoints.json and exits non-zero when any URL in the passed files names an unapproved host.

If the first plan logs the matched string or reads working-tree files on --staged, correct it before approving:

Never write the matched text to the log file, and read staged content from git index blobs rather than disk.

What you get

The rules file starts from the determination. The reference snippet below shows the shape your agent writes to policy/cui-rules.json; the real list comes from your determination and your agency’s marking guidance.

[
{ "id": "cui-banner", "pattern": "\\b(CUI|CONTROLLED)//[A-Z-]+", "why": "CUI marking form named in the determination" },
{ "id": "export-ctrl", "pattern": "\\b(ITAR|ECCN\\s*[0-9][A-E][0-9]{3})\\b", "why": "export-controlled content excluded by the determination" },
{ "id": "private-key", "pattern": "-----BEGIN [A-Z ]*PRIVATE KEY-----", "why": "secret material" },
{ "id": "cloud-key", "pattern": "\\bAKIA[0-9A-Z]{16}\\b", "why": "secret material (a common access-key shape)" },
{ "id": "internal-ip", "pattern": "\\b10\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\b", "why": "production network detail" }
]
REFERENCE CODE scripts/guard/cui-guard.mjs: staged-blob and stdin CUI pattern scanner open reference hide reference Reference pattern for your workspace agent; open to inspect or compare this file. You do not type or paste this by hand.
scripts/guard/cui-guard.mjs
// usage: cui-guard.mjs --stdin | --staged | <file>...
// --staged reads each staged blob with `git show :<path>`; deleted files are skipped, renames are scanned under the new path, binary blobs are reported and skipped.
import { execFileSync } from 'node:child_process';
import { appendFileSync, mkdirSync, readFileSync } from 'node:fs';
const rules = JSON.parse(readFileSync('policy/cui-rules.json', 'utf8')).map((r) => ({ ...r, re: new RegExp(r.pattern) }));
const mode = process.argv[2];
const inputs = [];
if (mode === '--stdin') inputs.push({ name: '<prompt>', text: readFileSync(0, 'utf8') });
else if (mode === '--staged') {
// Scan the staged blob (what will be committed), never the working-tree file.
// -z keeps odd names intact; R maps a rename to its new path; D is not listed (nothing to scan).
const files = execFileSync('git', ['diff', '--cached', '--name-only', '-z', '-M', '--diff-filter=ACMR'], { encoding: 'utf8' }).split('\0').filter(Boolean);
for (const f of files) {
const blob = execFileSync('git', ['show', `:${f}`], { maxBuffer: 64 * 1024 * 1024 });
if (blob.includes(0)) { console.error(`cui-guard: skipped binary ${f} (review binaries by hand)`); continue; }
inputs.push({ name: f, text: blob.toString('utf8') });
}
} else {
for (const f of process.argv.slice(2)) inputs.push({ name: f, text: readFileSync(f, 'utf8') });
}
const hits = [];
for (const { name, text } of inputs) {
text.split('\n').forEach((line, i) => {
for (const r of rules) if (r.re.test(line)) hits.push({ ts: new Date().toISOString(), rule: r.id, where: name, line: i + 1 });
});
}
if (hits.length) {
mkdirSync('.ai-guard', { recursive: true });
appendFileSync('.ai-guard/log.jsonl', hits.map((h) => JSON.stringify(h)).join('\n') + '\n');
for (const h of hits) console.error(`cui-guard: BLOCKED rule=${h.rule} ${h.where}:${h.line}`);
process.exit(2); // exit code 2 is the block signal for a Claude Code command hook
}
console.log(`cui-guard: ok (${inputs.length} input(s), ${rules.length} rules)`);

Here is the reference implementation of scripts/guard/check-endpoints.mjs that your agent generates alongside the pattern guard:

scripts/guard/check-endpoints.mjs
import { readFileSync } from 'node:fs';
const approved = new Set(JSON.parse(readFileSync('policy/approved-endpoints.json', 'utf8')).hosts);
let bad = 0;
for (const file of process.argv.slice(2)) {
for (const m of readFileSync(file, 'utf8').matchAll(/https?:\/\/([a-z0-9.-]+)/gi)) {
const host = m[1].toLowerCase();
if (!approved.has(host)) { console.log(`check-endpoints: FAIL ${file} host ${host} is not on the approved list`); bad++; }
}
}
if (!bad) console.log('check-endpoints: ok');
process.exit(bad ? 1 : 0);

policy/approved-endpoints.json holds the hosts and short endpoint IDs your ISSO approved, for example { "hosts": ["llm-gateway.agency.example"], "ids": ["agency-gateway-il4"] }. The hosts and IDs here are placeholders.

Wire it in three places

Wire the guard where the text can leave: at commit (the scan and the trailer check, two hooks), and at the prompt.

Terminal window
# commit time: a repo-managed hooks directory (a team-wide setting, not per clone)
git config core.hooksPath .githooks
printf '#!/bin/sh\nnode scripts/guard/cui-guard.mjs --staged && node scripts/guard/check-endpoints.mjs .claude/settings.json\n' > .githooks/pre-commit
printf '#!/bin/sh\nexec node scripts/guard/check-trailers.mjs "$1"\n' > .githooks/commit-msg
chmod +x .githooks/pre-commit .githooks/commit-msg

For the prompt, register node scripts/guard/cui-guard.mjs --stdin as a command hook on the event your CLI fires before a prompt is sent (Claude Code calls it UserPromptSubmit; check your tool’s hook reference). In Claude Code a command hook’s exit code 2 is the block, which is why the script uses it. The hook’s input is a JSON payload; the script scans its raw text, so it does not depend on a field name.

Two limits, stated plainly. A pattern guard catches shapes, so it is a floor under a person’s judgment and not a replacement for it. And it only covers text that passes through the hook or the commit; a file the agent reads from disk is covered by the deny list and the repository’s own scan at commit.

Attribution: record which tool and endpoint

When the agency answers a question like “where do you use generative AI, and with what,” the answer should come from the history and not from memory. A commit message with the two attribution trailers looks like this:

Add triage queue filter for the intake form
AI-Assisted: yes
AI-Tool: example-cli
AI-Endpoint: agency-gateway-il4

AI-Endpoint carries an endpoint ID from policy/approved-endpoints.json, not a free-text name, so the value is checkable. The .githooks/commit-msg wrapper created above calls this reference script (which your agent writes to scripts/guard/check-trailers.mjs) with the message file path, and git runs it on every commit once core.hooksPath is set:

// scripts/guard/check-trailers.mjs (called by .githooks/commit-msg as: check-trailers.mjs "$1")
import { readFileSync } from 'node:fs';
const msg = readFileSync(process.argv[2], 'utf8');
const get = (k) => msg.match(new RegExp(`^${k}:\\s*(.+)$`, 'mi'))?.[1]?.trim();
if (get('AI-Assisted')?.toLowerCase() !== 'yes') process.exit(0);
const approved = JSON.parse(readFileSync('policy/approved-endpoints.json', 'utf8')).ids;
const tool = get('AI-Tool'); const ep = get('AI-Endpoint');
if (!tool) { console.error('check-trailers: AI-Assisted: yes needs an AI-Tool: trailer'); process.exit(1); }
if (!ep || !approved.includes(ep)) { console.error(`check-trailers: AI-Endpoint "${ep ?? ''}" is not an approved endpoint id`); process.exit(1); }

Later, git reads the trailers back as data:

Terminal window
git log --format='%h %(trailers:key=AI-Tool,valueonly,separator=%x2C) %(trailers:key=AI-Endpoint,valueonly)' --since=2026-10-01

Whether a developer’s use of a coding assistant counts as an item in the agency’s annual AI use case inventory (M-25-21 requires agencies other than the Department of Defense and the Intelligence Community to inventory use cases at least annually) is the agency’s call. The trailers do not decide it; they make either answer fast.

See it work

SESSION Approved tools: determination to guard
  1. Typed in the terminal: claude
  2. Mode:Plan mode
  3. You type in the session: Here are the four excluded categories from our CUI determination: secrets, production configuration and network detail, export-controlled content, any CUI marking. Create policy/cui-rules.json, and list what you could not turn into a pattern.
  4. The tool replies: I created policy/cui-rules.json with 5 rules: cui-banner marking forms such as CUI// and CONTROLLED// export-ctrl ITAR and ECCN-shaped strings private-key PEM private key headers cloud-key a common access-key shape internal-ip 10.x.x.x addresses I could NOT reduce these to patterns: - export-controlled content that is described in words rather than labelled - production configuration that does not use an IP address (hostnames, queue names) - code whose behavior is the sensitive part A person has to review those at pull-request time. I used generic marking forms only; replace them with the forms your marking guidance names.
  5. You type in the session: Run the guard against fixtures/benign-note.txt and fixtures/planted-marker.txt.
  6. The tool replies: $ node scripts/guard/cui-guard.mjs fixtures/benign-note.txt cui-guard: ok (1 input(s), 5 rules) $ node scripts/guard/cui-guard.mjs fixtures/planted-marker.txt cui-guard: BLOCKED rule=cui-banner fixtures/planted-marker.txt:1 exit code 2 benign-note.txt contains "intake form version 10.2", which has only two dots, so the internal-ip rule does not match it.
  7. You type in the session: Show me what was logged. I want to confirm the marker text is not in the log.
  8. The tool replies: $ cat .ai-guard/log.jsonl {"ts":"2026-11-04T14:02:11.482Z","rule":"cui-banner","where":"fixtures/planted-marker.txt","line":1} The log has the rule id, the file, and the line number. The matched text is not stored anywhere, so the log is safe to ship to the team's collector.
  9. You type in the session: Point .claude/settings.json at https://api.llm-vendor.test and run the endpoint check.
  10. The tool replies: $ node scripts/guard/check-endpoints.mjs .claude/settings.json check-endpoints: FAIL .claude/settings.json host api.llm-vendor.test is not on the approved list exit code 1 The host is not in policy/approved-endpoints.json, so the pre-commit hook would refuse this change. To add a host, that file changes in a pull request that carries your ISSO's approval reference.
  11. You type in the session: Commit with AI-Assisted: yes, AI-Tool: example-cli, AI-Endpoint: public-api.
  12. The tool replies: check-trailers: AI-Endpoint "public-api" is not an approved endpoint id The commit was refused. Valid ids come from policy/approved-endpoints.json. Nothing was sent anywhere; the check reads local files only.

Illustrative session; exact output varies by tool and agency configuration.

Prove it

Everything below runs on your machine and calls no live service; the one outbound attempt, in the fifth check, is one the sandbox must refuse. Create the two fixtures first: fixtures/benign-note.txt containing Case intake form version 10.2, and fixtures/planted-marker.txt whose first line is // Header: CUI//SP-PRVCY.

Terminal window
node scripts/guard/cui-guard.mjs fixtures/benign-note.txt # expect: ok, exit 0
node scripts/guard/cui-guard.mjs fixtures/planted-marker.txt # expect: BLOCKED rule=cui-banner, exit 2
cat .ai-guard/log.jsonl # expect: rule id and line, no marker text
node scripts/guard/check-endpoints.mjs .claude/settings.json # expect: ok with an approved host

Then prove the scan reads what will be committed, not what is on disk. Stage the marker, then overwrite the working-tree file with clean text without staging that change, and commit:

Terminal window
git add fixtures/planted-marker.txt
printf 'clean\n' > fixtures/planted-marker.txt # working tree is now clean; the staged blob is not
git commit -m "test: staged blob" # expect: BLOCKED rule=cui-banner, commit refused
git restore --staged fixtures/planted-marker.txt

If that commit succeeds, the guard is scanning the working tree and a staged marker can slip through. Then plant the fault: edit the endpoint in .claude/settings.json to a host that is not in policy/approved-endpoints.json, and the endpoint check must fail naming that host. Last, test the commit-msg hook itself, not just the script: confirm test -x .githooks/commit-msg succeeds, then commit with a message that carries AI-Assisted: yes, AI-Tool: example-cli and AI-Endpoint: public-api and expect git to refuse the commit. A script nobody runs passes its own unit test and protects nothing. Fifth, prove the sandbox, not just the config: in a session with the sandbox on, ask the tool to run curl -sS --max-time 5 https://example.com and expect a refusal, then confirm the allowed gateway host still resolves under the same settings. A sandbox flag in a settings file that the tool silently ignores passes a config check and protects nothing. If any of the five negative cases passes, the control is decoration; fix it before the first real prompt.

ℹStatus checked 2026-11-05

Availability, authorization, agency approval, region support, and price are five separate facts. This box holds only what was read from a primary source: the policy and vendor bullets on 2026-11-04, the agent CLI bullets on 2026-11-05.

  • ISOO Notice 2026-01 (March 30, 2026) prohibits agency personnel from inputting CUI on AI systems that are Internet-enabled, connected to infrastructure external to the agency’s control, or otherwise connected to environments that do not meet CUI protection standards. Source: ISOO Notice 2026-01. ISOO Notice 2026-07 (September 2, 2026) names AI among the topics in its CUI program guidance: ISOO Notice 2026-07.
  • FedRAMP 20x is in Phase 3, wide-scale adoption. FedRAMP will stop accepting applications for new Rev5 Certifications on June 11, 2027. Sources: FedRAMP 20x and FedRAMP important dates.
  • The Marketplace product export held 791 entries on 2026-11-04 (669 Rev5, 122 20x), by our count of the data repository. The count changes daily.
  • OMB M-25-21 asks agencies to develop a generative AI use policy within 270 days of April 3, 2025 (“should”). Source: M-25-21.
  • What vendors and FedRAMP said about AI offerings when our research read them (2026-11-03). Each line is that source’s own statement, not a finding of ours, and none of them is your agency’s approval:
    • FedRAMP keeps a page of AI services it has certified or is working with: fedramp.gov/ai.
    • GitHub says Copilot itself is not FedRAMP authorized. An enterprise admin can turn on a policy that restricts Copilot to model hosting that is, which requires GitHub Enterprise Cloud with US data residency: GitHub changelog, 2026-04-13.
    • AWS says models in Amazon Bedrock in GovCloud, Anthropic’s among them, are approved at FedRAMP High and DoD IL4/5 (impact levels 4 and 5: the DoD tiers for CUI and mission data): AWS, 2025-05-23. Which model is in which GovCloud region is on the Bedrock region table.
    • Microsoft lists the Azure OpenAI models sold in Azure Government by region and deployment type. The list differs between deployment types: Microsoft Learn, updated 2026-10-19.
    • Anthropic says Claude for Government and Claude on Bedrock GovCloud and on Google Vertex AI with Assured Workloads are FedRAMP High, and that its Enterprise plan and direct API are not authorized: Anthropic’s government page (vendor statement).
    • Google describes deploying Gemini inside an Assured Workloads boundary: Google Cloud guide.
    • Agent CLI sandbox and deny facts, read 2026-11-05 (each is the vendor page’s own statement):
      • Claude Code: the sandbox is off by default; it runs on macOS and on Linux or WSL2, and on native Windows commands run unsandboxed; the network allowlist starts empty. Write, notebook-edit and glob rules never match a path. Sandboxing, permissions.
      • Codex: permission profiles and their network domain rules are beta, and without the network proxy feature “profile domain rules do not restrict direct network access”. Permissions, sandboxing.
      • Antigravity: sandboxed commands have no network access by default. auto mode requires the terminal sandbox and is not available for business or enterprise accounts, so treat it as a hold for agency tenants; unsandboxed(...) rules are also business and enterprise only. Sandbox, CLI reference.
      • Copilot: local sandboxing reached general availability on 2026-10-07 and is off by default; built-in file edits are not OS-sandboxed. GitHub changelog, 2026-10-07.
    • Confirm any of these against the offering’s own Marketplace record with the method above. A vendor’s page is where you start, not where you stop.

Recheck the cited source and your agency’s authorization boundary before you rely on any of it.

KNOWLEDGE CHECK

Your agency has approved your laptop image, your network, and your AI CLI. A teammate says that settles whether the intake repository can go into prompts. What is the right response?

KNOWLEDGE CHECK

The guard blocks a planted marker. Which logging design is correct?

KNOWLEDGE CHECK

Your project settings deny the agent from reading ./.env, and a hook blocks CUI-shaped prompts. A reviewer asks what stops a test command the agent starts from sending a file to an outside host. What is the right answer?

Practice status — how established each pattern is across agencies and contractors building with AI CLIs

PracticeStatusAlso called
Not entering CUI on AI systems that are Internet-enabled or external to agency controlrequiredCUI-in-AI prohibition
Written CUI determination for the dev environmentstrong optionalCUI scoping memo
FedRAMP Marketplace lookup by service offeringstrong optionalcertification-boundary check
Deny list for secret and infrastructure pathsstrong optionalfile-access policy
OS sandbox plus egress allowlist for the commands an AI CLI runsstrong optionalcommand sandbox, egress filtering
Pre-prompt and pre-commit pattern guard that logs the rule, not the textemergingDLP hook, secret-scan hook
Commit trailers naming the AI tool and endpointemergingAI attribution trailers

Note: the first row is binding on agency personnel (ISOO Notice 2026-01, para. 7); contractors are bound through the contract.

Scale: required | common baseline | strong optional | reference-shop (seen only at organizations that publish their own practice) | emerging

Key takeaway

The tool being approved does not answer whether the content may go into it. Get the determination in writing, convert its conditions into checks that run on their own, look up the exact offering you will call, pin the CLI to it with a deny list, an OS sandbox and an egress allowlist, and leave a trail in the commit history. The guard catches shapes and logs the rule; people still review what a pattern cannot see.

LEADERSHIP DECISION
Require a written CUI determination and a named approved-endpoint list before any team points an AI CLI at agency code.
PRACTITIONER ACTION
Commit the rules file, the endpoint list, the deny list, the sandbox and egress settings, and the pre-commit, commit-msg and prompt hooks; run the negative cases.
SUCCESS MEASURE
Audit finding avoided: every AI-assisted commit names an approved endpoint, and the guard log shows which rule fired when one was blocked.

Legend: LEADERSHIP DECISION = what a leader decides · PRACTITIONER ACTION = what the engineer does next · SUCCESS MEASURE = how you know, in calendar time, assessor-hours or cost, contract or revenue risk, or audit finding avoided

Search lessons