Skip to content

AI Coding Guardrails

AI coding agents are powerful tools, but power needs boundaries. Guardrails help teams adopt AI safely — whether they use Claude Code, Codex, or both — by limiting potential damage from mistakes or unexpected behavior.

Guardrails are controls that constrain what AI coding assistants can do:

Guardrail TypeWhat It Controls
Git safetyPrevents destructive version control operations
Filesystem isolationLimits which files AI can access
Plugin governanceControls which extensions are allowed
Network policiesRestricts outbound connections
Configuration standardsEnsures consistent behavior across team

Every agent session runs in an OCI container:

  • AI sees only mounted directories
  • Host filesystem is inaccessible
  • Clean separation between sessions
Terminal window
scc start ~/project
# Claude Code can only access ~/project
# Cannot reach ~/.ssh, ~/.aws, other directories

SCC’s core safety engine blocks dangerous commands inside every container (fail-closed):

BlockedWhy
git push --forceOverwrites remote history
git reset --hardDiscards uncommitted changes
git branch -DForce-deletes branches
git clean -fdDeletes untracked files

The optional scc-safety-net plugin adds agent-native hook coverage on top (currently Claude Code; Codex support planned):

Installation is automatic with most org configurations:

{
"defaults": {
"enabled_plugins": ["scc-safety-net@sandboxed-code-official"]
}
}

Organizations control which plugins are allowed across all providers:

{
"security": {
"blocked_plugins": [
"*experimental*",
"*untrusted*"
]
},
"defaults": {
"enabled_plugins": [
"scc-safety-net@sandboxed-code-official",
"approved-tool@internal"
]
}
}
  • Blocked plugins: Cannot be used by anyone
  • Enabled plugins: Available to all teams
  • Team additions: Teams can add plugins within allowed boundaries

Control what external connections the agent can make:

{
"defaults": {
"network_policy": "locked-down-web"
}
}

Ensure consistent configuration across developers:

{
"profiles": {
"backend": {
"additional_plugins": ["java-analyzer@internal"],
"session": { "timeout_hours": 8 }
},
"frontend": {
"additional_plugins": ["eslint-runner@internal"],
"session": { "timeout_hours": 4 }
}
}
}

Developers run scc setup once to inherit all team settings.

SCC enforces a trust hierarchy where higher levels override lower ones:

LevelTrustCan Override
OrganizationAbsoluteNothing
TeamDelegatedWithin org bounds
ProjectRestrictedWithin team bounds
UserAdvisoryWithin project bounds

Security blocks are absolute—no team, project, or user can bypass them.

Create an org config with security blocks:

{
"apiVersion": "scc.cli/v1",
"kind": "OrganizationConfig",
"metadata": { "name": "my-org" },
"security": {
"blocked_plugins": ["*experimental*"],
"blocked_mcp_servers": ["*untrusted*"]
},
"defaults": {
"enabled_plugins": ["scc-safety-net@sandboxed-code-official"]
}
}

Add team-specific settings:

{
"profiles": {
"default": {
"description": "Standard development profile"
},
"security-team": {
"description": "Stricter controls for security work",
"additional_plugins": [],
"network_policy": "locked-down-web"
}
}
}

Host the config where teams can access it:

Terminal window
# Developers configure once
scc setup --org https://company.com/org-config.json
Terminal window
# Check what's blocked
scc config explain
# Dry run to see effective configuration
scc start --dry-run ~/project

Sometimes guardrails need temporary overrides. SCC supports time-bounded exceptions:

Terminal window
scc exception add local-override \
--allow-plugin "experimental-tool@vendor" \
--ttl 8h \
--reason "Testing integration"

Exceptions:

  • Have time limits (TTL)
  • Require explicit reasons
  • Are visible in scc config explain
  • Cannot override absolute security blocks

Track guardrail status and exceptions:

Terminal window
# List active exceptions
scc exception list
# Audit installed plugins
scc audit plugins
# See configuration sources
scc config explain