DevOps CLI follows an enterprise zero-trust security model designed to safeguard developer workstations, local and remote Kubernetes clusters, CI/CD pipelines, and agentic AI execution environments.
Only the latest release gets security fixes. A fix ships in the next release.
All code authored in or evaluated by DevOps CLI must strictly adhere to the following security guarantees:
-
Zero Secret Leakage: Plaintext secrets, tokens, private keys, or API credentials must never be committed to code repositories, written to unencrypted configuration files, or emitted into terminal outputs/logs. Each secret comes from a secret store: the OS keyring, HashiCorp Vault, a Kubernetes Secret or the credential store of the tool that owns it. In the cluster,
devops k8s push-secretswrites each platform Secret from the keyring, and the External Secrets Operator makes each service Secret from anExternalSecret(ADR 0033). A service repository holds noSecretobject and no value. Never copy the content of a gitignored file (.env*,.ssh/,.data/, credentials, private keys) into a document, changelog, finding, commit or code. A pod that loads Secretdevops/devops-cliwithenvFromand sets no Qdrant key of its own, such as a Job of CronJobdevops-clior the MCP server, holds the read-only key ofllm/qdrant-api-key, never its admin key. The runner pod and the roadmap Service hold no Qdrant key (#6518). WorkflowTemplaterag-ingestwrites to Qdrant, so it sets the admin key. -
Strict Egress & SSRF Protection: All outbound HTTP requests are built by
devops_cli.http.entryand checked at the connect by the egress transport ofdevops_cli.http.clientagainst their egress level (public, loopback or private) to prevent Server-Side Request Forgery (SSRF). Kept pre-flight checks (Qdrant, kubectl manifest apply, container engine endpoint, config init wizard) callvet_addressesdirectly at their level. Cloud metadata addresses are refused at every level. The in-processkubernetesclient (urllib3) is trusted because its address comes from the operator's kubeconfig or the in-cluster environment. -
Subprocess Bounded Execution: All external commands (
git,helm,kubectl,tofu,docker,ansible-runner) are executed via bounded argument lists (preventing shell injection) with mandatory non-infinite timeouts. -
Data Isolation: Agent-generated review logs, benchmarks, and temporary telemetry artifacts are isolated under dedicated agent subfolders (
<data_dir>/agent, e.g../.data/agent), completely segregated from the primary user workspace data tier (DEVOPS_CLI_DATA_DIR/data.dir). -
Least Privilege Runtime: Kubernetes pods, Docker containers, and CI jobs run under unprivileged, non-root user contexts (
USER 1000:1000). -
Host Sandbox Confinement: Executable verification criteria and model-generated shell commands are confined within Linux unprivileged namespaces via
bubblewrap(bwrap), enforcing unshared namespaces, cleared environment, read-only repository and system mounts, zero network egress, and isolated POSIX process groups. The host sandbox's/tmpis a private 64 MiB tmpfs mounted nosuid and nodev, which the confined command can write to and execute from, because bubblewrap has no noexec option for a tmpfs. -
Review Tool Execution: A review starts its tools through a
ToolExecutor(src/devops_cli/security/tool_executor.py). The tools are Bandit, Gitleaks, Semgrep, Trivy, kube-linter, Pluto, osv-scanner, golangci-lint, Ruff, mypy and the canary of each. The record of each run names the executor in force. It is theexecutorfield intool_runsofprofile.json, and the Executor column of the Tool Runs table inreview.md. The record also names the network of the tool in thenetworkfield:hostfor the direct executor,nonefor the sandbox, andkube-apifor the sandbox with that network profile. Two executors exist:sandboxisSandboxToolExecutor, and it is the default ofdevops review path,branchandprand of their MCP tools. It runs the tool in abubblewrapsandbox with no network, a cleared environment, a read-only tree and a private HOME. The sandbox shows the system directories, the tree and only what the request names: the program of the tool (its virtualenv, with the Python installation that the virtualenv links to, behind the guard ofHostSandbox), its config and ruleset files, the data that a fetch step got before (the Trivy cache and the osv-scanner database, read-only;devops review fetch-databasesis that step, and a scan that lacks a database, or finds the osv-scanner database older than 24 hours, gives a coverage gap that names it) and the host paths inCONST_TOOL_HOST_READ_ONLY_PATHS(the CA certificates for Semgrep). golangci-lint also gets the Go toolchain and the module cache thatgo envnames on the host, read-only, with thebinof the toolchain first on itsPATH. Itsgocommand fetches no module and no toolchain (GOPROXY=off,GOTOOLCHAIN=local), so a module whose modules are not in the module cache gives a coverage gap that tells the person to rungo mod download. A directory that the tool writes, the cache of mypy or of Ruff, or the Go build cache and the golangci-lint cache, for the tree, is bound read-write. The sandbox refuses a bind that holds the home directory or the tree, or passes through a credential directory. Each process of the tool has the CPU limitCONST_TOOL_CPU_LIMIT_SECONDSand the address-space limitCONST_TOOL_MIN_ADDRESS_SPACE_BYTES. Gitleaks and Semgrep get the larger value thatCONST_TOOL_ADDRESS_SPACE_BYTESnames, and Semgrep runsCONST_SEMGREP_JOBSjobs. A Go tool getsGOMEMLIMITset toCONST_TOOL_GO_MEMORY_LIMIT. The wall-clock limit applies as well. The sandbox sets no limit on the number of processes, becauseRLIMIT_NPROCcounts every process of the user and would starve the host.directisDirectToolExecutor. It starts the tool as a child process of devops-cli. It has no confinement: the tool has the network, the environment and the files of the user. It has no limit except the wall-clock time of the scan,DEFAULT_SECURITY_SCANNER_TIMEOUT_SECONDS. A review uses it only in the pod of a runner Job, where the seccomp profile refuses the user namespace that the sandbox needs and the pod is the isolation boundary (ADR 0031, #3827). There a scanner that the image lacks fails the review (ReviewScannerMissingError). Everywhere else no option, config key or MCP tool turns the sandbox off (decision 1 of #772). The scans ofdevops scanand of the agent tools are not reviews, and each scanner except Popeye uses this executor there.- The sandbox has one network profile,
kube-api, and only Popeye can select it (decision 2 of #772).devops k8s audit, the agent toolscan_popeyeand the scanner registry run Popeye in the sandbox with this profile, from an empty directory. The sandbox keeps no network of its own (--unshare-all). Outside the sandbox,kubectl proxylistens on a Unix socket in a scratch directory for one context. It reads the kubeconfig and the credentials of the user, and refuses the methods POST, PUT, PATCH and DELETE (CONST_KUBE_API_REJECTED_METHODS) and the exec, attach, port-forward and proxy paths (CONST_KUBE_API_REJECTED_PATHS).setpriv --pdeathsig KILLends the proxy with the run. In the sandbox,socatrelays127.0.0.1:8001to the socket, and Popeye reads a kubeconfig that names the relay and holds no credentials. The sandbox binds the scratch directory and/etc/passwdread-only. So Popeye reaches only the API server of the context, only to read, with the RBAC of the user. The limits: the path filter is a deny list, so a new subresource that reaches past the API server passes untilCONST_KUBE_API_REJECTED_PATHSlists it, and Popeye reads each response that the user can read, such as a Secret. The direct executor refuses a request that selects the profile. A host withoutsh,socat,kubectlorsetpriv, or one that cannot start the sandbox, runs no Popeye scan: the scan reports a coverage gap with the cause, anddevops k8s auditexits 1.
Before its first tool runs, a review checks that the host can start the sandbox: bubblewrap and
prlimitare installed, and bubblewrap can make a sandbox. On Ubuntu 24.04 and later, AppArmor refuses unprivileged user namespaces to a program that has no profile with theusernsrule (kernel.apparmor_restrict_unprivileged_userns). A host that fails the check fails closed: no tool runs, in the sandbox or outside it, each scan reports a coverage gap with the cause, and the review says the cause and what a person can change on the host one time. The record is read before the tool starts. Under thedirectexecutor, a tool that fetches its rules during the run, such as Trivy with an old cache, may use newer rules than the record names, and Ruff also applies a config file above the tree and its user config file, which the record does not name. -
Repository Hygiene: Never write an internal hostname (
*.lan,*.local, a machine name), a private address (RFC 1918), a private registry, a non-standard NodePort, a device or mount path, or the cluster topology into a committed file. Use<storage-node>,<gpu-node>,<worker-node>or<host>for a host,example.comfor a domain, RFC 5737 blocks (192.0.2.0/24,198.51.100.0/24,203.0.113.0/24) or loopback for an address,ghcr.io/<org>/<image>:<tag>for a registry and<storage-mount-path>for a path. Committed templates (config.example.yaml) use localhost endpoints. The user'sconfig.yamlis not committed: never reset its URLs or ports.tests/invariants/test_committed_addresses.pyholds this rule for addresses and.lanhosts. It parses each tracked file withipaddressand fails on an RFC 1918 host address or a.lanhost. A range in CIDR form names no machine, and the upstream defaults and examples that the test names (the minikube node, the AKS DNS service, the OpenTelemetryserver.addressexample) are not ours, so both pass. Test code, which must hold private addresses to test the egress and reference classifiers, the archived OpenSpec changes andCHANGELOG.md, which release-please writes, are outside its scope. Thedomainrow ofdevops ci(tests/gate/configured_domain.py) holds this rule for the domain of the cluster. It readsk8s.domainandcloudflare.domainfrom the config at run time, so the value goes into no file. It reads each added line and each path of each commit fromorigin/maintoHEAD, and fails on the domain or a name under it. Each finding names the path, the line, the commit and the settings key, and never the value. The pre-push hook runs the row, so a push of a person, an agent or the runner Job sends no such commit. Where no domain is configured, such as on the GitHub runners, the row is skipped with its cause. Public evidence, such as a pull request comment or an issue, holds exit codes and counts only. It never holdsargocd app diffoutput or Application YAML, because the live objects hold the real hosts. -
No Phone-Home: Turn off third-party telemetry, usage reports, crash analytics and update checks in every tool, workload and container when the user loses no function. Examples are
DO_NOT_TRACK=1,GOTELEMETRY=off,PIP_DISABLE_PIP_VERSION_CHECK=1,HF_HUB_DISABLE_TELEMETRY=1andOPENSPEC_TELEMETRY=0. Ask the user before you turn off a feature that shows content, such as update notices or a marketplace. -
Bounded Error Detail: Cap each external value in an exception
detailsdictionary or a structured log at 256 characters (CWE-209, CWE-400). -
MCP Tool Inputs: A URL or host that a model gives to an MCP tool is untrusted input, not configuration. A tool publishes no option for it, and queries the service that the configuration names.
_PATH_PARAM_RESTRICTIONSinsrc/devops_cli/ai/mcp/generator.pysets the options that a tool publishes. A credential goes only to the origin that the configuration names, whatever the egress level is._key_forinsrc/devops_cli/ai/gateway.pyapplies this rule to the AI API key. A tool that publishes such an option is a defect. A file path that a model gives is untrusted input too: a tool publishes no option for a path that the command writes or reads, unless a path helper confines the path (safe_resolve_subpathinsrc/devops_cli/core/paths.py).
The --url option of the devops valkey commands is an accepted case. A person types it, and no model gives the URL. So valkey.password goes to the host that the person names. Five of the nine devops valkey commands are MCP tools: valkey_ping, valkey_stats, valkey_info, valkey_get and valkey_flush. valkey set is not an MCP tool (rule 12). These tools publish no URL option. The commands valkey keys, valkey backup and valkey cli are not MCP tools.
The streamable-http transport is a network listener. See MCP Server on the Network.
-
MCP Tool Secrets: A model writes the arguments of an MCP tool call. A secret in an argument passes through the model context, the provider, the LLM cache and the run trace, and the model can send it to another tool. So a tool publishes no parameter that takes a secret value (a password, a token, an API key or a private key). A credential for a call is carried on the connection, as a header that the harness sets, or the server reads it from its configuration, or it is an opaque reference that the server resolves from the secret store, such as
keyring:<name>for the OIDC token ofdocker_sign. A tool never returns or logs a credential, sovault_getpublishes noshowoption, andvault_setis not a tool.CONST_MCP_SECRET_PARAMETER_WORDSinsrc/devops_cli/config/constants.pylists the words that make a parameter name suggest a secret.tests/ai/mcp/test_mcp_tool_secrets.pyreads the published schema of every tool and fails on a text parameter whose name holds one of them.CONST_MCP_SECRET_PARAMETER_ALLOWLISTnames the parameters that hold no secret value, such as the name of a Kubernetes Secret. A new entry needs a reason, and the test fails on an entry that matches no parameter. A name word cannot find a free-text parameter that is copied into an environment, a file or a store, sovalkey_setis not a tool andsandbox_deploypublishes noenv(thedeniedkey of_PATH_PARAM_RESTRICTIONSinsrc/devops_cli/ai/mcp/generator.pyomits an option).CONST_MCP_FREE_TEXT_SINK_PARAMETER_NAMESlists the namesenv,values,valueanddata.CONST_MCP_FREE_TEXT_SINK_ALLOWLISTnames each published parameter with such a name that holds no secret, with its reason, and the same test fails on a stale entry.RunTracehides the value of an argument under such a name, andmask_secretsis the second guard.ArgumentValueLogFilterkeeps all arguments out of the FastMCP log. -
Hosted Models: The LiteLLM gateway serves five groups that call a provider outside the cluster:
gemini-3.8-flash,claude-sonnet-5-5,claude-haiku-5-5,deepseek-v4.1-flash-1017anddeepseek-v4.1-flash(the last two through OpenRouter, which picks a third-party provider and is asked to skip providers that store or train on prompts). A prompt sent to one of them leaves the cluster, and the provider bills each token. So no pool names a hosted group, no fallback sends a group that is not hosted to a hosted group, and a request reaches a provider only when its caller names a hosted group. The Service config namesdeepseek-v4.1-flash-1017forai.model, the taskchatand each task of a roadmap job exceptintake,retitle,refineandalternatives, which name the localqwen3.8:27b(k8s/devops/configmap.example.yaml, owner decisions of 2026-11-07, #3874, 2026-11-10, #4369, 2026-11-15 and 2026-11-16; each job has a task of its own since #5903). So the code of the repositories of the Service, which can be private, leaves the cluster to OpenRouter in the prompts of a step, and so do the titles and bodies of the issues in the prompts of the stage job and chat. A job task, such asstageorrefine, namesclaude-sonnet-5-5only in a trial: its prompts, which hold the issue and the repository text that the job reads, then leave the cluster to Anthropic. The ladders of theeditandrepairsteps of the implement job name only DeepSeek, one tier each (owner decision of 2026-11-10, #4371): a Sonnet tier there is a later trial, and its prompts, which hold repository code, would leave the cluster to Anthropic. Project text and project code can go to a hosted provider, Jev included, but a secret or personal data, such as an email address, never goes. The owner holdsclaude-sonnet-5-5since 2026-11-11: run no trial, eval or comparison with it until the owner lifts the hold. The embedding slot and the tasksintake,retitle,refineandalternativesstay in the cluster. Two fallbacks link hosted groups.claude-sonnet-5-5todeepseek-v4.1-flash-1017(#3152) sends the prompt of a failed Claude call to OpenRouter, not to Anthropic.deepseek-v4.1-flash-1017todeepseek-v4.1-flash(#5564) sends the prompt of a failed call to the same provider, OpenRouter, with the same filters. The keys are optional keys of the Secretllm/llm-gateway-secrets(keyring:gemini.api_key,anthropic.api_key,openrouter.api_key). The gateway NetworkPolicy admits TCP 443 to public addresses and to no private or metadata range. A Claude group sets its prices, drops the sampling parameters that its API refuses, and setssupports_native_structured_outputandsupports_response_schema, or a structured call becomes a forced tool call that Sonnet 5.5 refuses (#3140). TypeSafe Jev (typesafe/jev-1.14) is no group: the gateway passesPOST /v1/systemoneto the System One endpoint of OpenRouter with the OpenRouter key of the gateway, for a caller that holds a valid gateway key (#4289). A prompt sent to it leaves the cluster, and the pass-through cannot setdata_collection, so the privacy setting of the OpenRouter account applies. -
Roadmap Item Authors: The repository is public, and a roadmap job gives the text of an item to a model. The model writes into the roadmap and, through Ready items, steers the agents that build.
- The authors. A job takes an item only when its author is a person with write access. For such a person,
author_associationis OWNER, MEMBER or COLLABORATOR (#2478). A job also takes an item of two bots. Their login is exactlyservice.github_app.bot_loginorgithub-actions[bot](#3502). - The login. GitHub gives both bots the association CONTRIBUTOR. It gives the same association to any account with a merged commit. So the exact login is the only proof. The check compares the whole login, so a login that only resembles it is not trusted. With no
service.github_app.slugset, no item of the App is trusted. - Other accounts. A job leaves out any other bot and any outside account. Refine tells the author once with a comment.
- The review. An item of a bot is text that no person wrote. It reaches Ready only after the review of refine approves the issue and the proposal (
refine.judge). The stage, implement and alternatives jobs take it only with that approval. The approval holds only for the body that the review read. A body edit ends it, and a refine round reviews the item again. - The controls. The review is a model, and text in an item can mislead it, so it is no security control. The controls are the login, the filter for replies, and the person who merges each pull request. Refine and the alternatives job give their models only the replies of a person with write access and of the App's bot. A comment of a bot starts no
implement: retry, because that check keeps the association test. - The risk that stays.
github-actions[bot]is the identity of every workflow of the repository. A workflow that copies untrusted text into an issue gives that text a path to Ready, behind the review. A record block in that text would forge the approval, because the job record is a hidden block of the issue body. The audit workflow writes a fixed text, and refine neutralizes<!in the text that it files for a Service item (#2478). So neither gives that path today. - The tests.
tests/roadmap/test_roadmap_trust.pyandtests/roadmap/refine/test_roadmap_refine_trust.pyfail when any of this breaks.
- The authors. A job takes an item only when its author is a person with write access. For such a person,
-
The GitHub Token of a Child Program: The process runner (
src/devops_cli/core/process.py) gives each gh and git child the GitHub token of its session in its environment, asGH_TOKEN, and no other GitHub token. So a caller that shapes the output of a gh child, for example with--jq, which can read$ENV, can read the token of its own session. The filter is the code of the caller, and it holds no more than the caller holds. Only devops-cli code calls gh in a process that holds the App token, and the agent container of a runner Job holds no token (#3700).mask_secretsis a last net, not a boundary: it finds a token by its prefix.- gh. A gh child gets the session's token as
GH_TOKEN, and noGITHUB_TOKEN. The local gh commands (gh auth, version and help) get the tokens of the environment. - git. Each git child gets
GH_TOKEN, whichgh auth git-credentialreads. git finds that helper as it does in a shell: devops-cli adds no-cvalue. A child of a person gets theGIT_CONFIG_COUNT,GIT_CONFIG_KEY_<n>andGIT_CONFIG_VALUE_<n>of the environment, with which the devcontainer sets the helper. A process that acts as the GitHub App gives these keys to no child: the runner and Service images set the helper in/etc/gitconfig. A caller cannot set them. - A timeout. Each child that gets the session's token starts in a session of its own. A timeout kills its whole process group, so no helper that the child started, such as
git-remote-https, keeps the token in its environment. After a Ctrl+C, the group first gets SIGINT and 0.25 s, assubprocess.rungives a child, so git removes its lock files before the SIGKILL. - The roadmap Jobs. The runner Job runs each phase in its own container (#3700, ADR 0030). Only
prepareandpublishhold the App key, and neither runs a program of the pull request.agentholds the model key and no GitHub credential, mounts no state folder, and makes no GitHub call. So the agent and the code of the checkout that it runs (the tests, the hooks ofpre-commitand the exit checks) find no GitHub token.prepareclones into a new folder before the agent phase starts.publishapplies the patches of the agent as data in a new repository and pushes from there, withGIT_CONFIG_GLOBAL=/dev/null,GIT_CONFIG_NOSYSTEM=1, a home folder of the run, an emptycredential.helperbefore the trusted helper, and the URL of the repository on GitHub. It refuses a new or changed link (mode 120000) or gitlink (mode 160000) and each change of.gitmodules. The implement, fix-checks and fix-conflict steps run on these phases. Eachpreparephase token asks only forcontents: read,pull_requests: read,issues: write,checks: readandactions: read, and eachpublishphase token asks forworkflows: writeonly when the merged plan names a.github/workflows/file (#6780). The withdraw of the review step deletes the branch from the clone of the plan, which no agent wrote, with a lease on the judged head. A verification command of a plan runs git only as the negative search! git grep, which reaches no remote: in the checkout, any other git call would read the configuration that the agent can write. - Limits. A repository that keeps files in Git LFS cannot use the implement Job:
publishpushes from a new repository with no hooks, so no LFS object goes to the server, and the runner image sets up nogit-lfs. - The risk that stays. The token is in the environment of a child while it runs, so a process of the same user can read it. In the runner Job, only
prepareandpublishhold a token, and neither runs a program of the branch.--phase allruns the three phases in one process, next to the App key. It runs only whererequire_runnerpasses, and the runner Job gives each container its own--phase, which the admission policyroadmap-service-jobspins for a Job of the Service. On a workstation,devops roadmap implement --groupruns the agent in the checkout of the person, with the token of the person. - The tests.
tests/core/test_process.py,tests/roadmap/phases/test_roadmap_phase_publish.pyandtests/roadmap/implement/test_roadmap_implement_token_isolation.pyfail when any of this breaks.
- gh. A gh child gets the session's token as
-
GitHub API Agent Write Refusal: In local and cluster agent sessions (
core.caller.is_agent_caller()), agents share the owner's GitHub credentials.devops gh apirefuses mutating requests (POST,PATCH,PUT,DELETE) on protected route classes defined inCONST_GH_API_PROTECTED_ROUTES(src/devops_cli/config/constants.py): repository settings, rulesets, secrets, organization settings, and repository transfer (POST repos/{owner}/{repo}/transfer). The command normalizes endpoints by stripping scheme, host, leading slash, query string, and fragment before matching, names the matched route and owner step on refusal, and executes no external request. Reads (GET),--dry-runpreviews, person sessions, and open write routes (issues,pulls,labels, and workflowdispatches) stay allowed.tests/github/test_gh_api_agent_guard.pyandtests/commands/test_gh_cmd.pyverify these controls.
The streamable-http transport of devops mcp serve is a network listener, and it fails closed (src/devops_cli/ai/mcp/remote.py). It refuses to start without the mcp.token credential (DEVOPS_CLI_MCP_TOKEN, at least 32 characters), and it needs --allow-remote for a host that is not loopback. Every request must carry that token as a bearer token. The server compares it in constant time before any tool runs, and answers 401 otherwise. In the cluster, devops k8s push-secrets makes the token (token_urlsafe(32), kept in the keyring entry mcp_token) and writes it to Secret devops/mcp-server, which Deployment mcp-server reads with secretKeyRef. It writes the same value to the keys DEVOPS_CLI_MCP_STAGE_TOKEN and DEVOPS_CLI_MCP_IMPLEMENT_TOKEN of Secret devops/devops-cli, which the stage and implement clients send. The server is meant to be reachable only from the roadmap Service and the Job pods. No roadmap client holds the token now: the roadmap Service, a stage Job and a runner Job take their keys of Secret devops-cli with secretKeyRef and no MCP token (#6518), and their clients are off. The pods that hold the token are the MCP server and the pods that load Secret devops-cli with envFrom: a Job of CronJob devops-cli and a run of WorkflowTemplate rag-ingest. The NetworkPolicies of k8s/devops/mcp-server/ admit only the pods with the label app.kubernetes.io/name of roadmap-service or devops-cli-job (the label that build_job sets on every Job pod), on TCP 8001, in both directions. Review holds the two labels equal; no test reads the policies (#6060). The role of a connection is its path: /planning/mcp, /implementation/mcp and /review/mcp each serve a separate FastMCP server that holds only the tools of its role (src/devops_cli/ai/mcp/roles.py), so a tool outside the role does not exist on that path. A job role holds a tool only when the role table names it and the exposure table marks it read-only. The table names no tool that reads or writes a path that a model gives, because on the server the path is a path of the server. The ops role holds every tool, has no endpoint and is never served over the network. A role server has no resource, no prompt and no hydrate_tool_domain, so no connection changes what another connection sees. The server logs the role and the tool name of each call, and no argument. The route /healthz of the readiness probe needs no token: it reads no tool and no setting, and it gives only {"status": "ok"}. tests/ai/mcp/test_mcp_http.py and tests/ai/mcp/test_mcp_roles.py fail when any of this breaks.
devops infra changes the hosts of an infra repo: a git repository with an Ansible inventory, its playbooks and roles (infra.repos). Each infra repo has an agent access level, infra.repos[].agent_access. At none, the default, an agent runs no command that reaches a host. At plan, an agent also runs status --ping, plan and drift. At safe, an agent also applies a plan that has no disruptive task and no task that check mode skipped, and uncordons a node. At full, an agent also applies any plan and drains, restarts and reboots a node with the node commands, one node at a time. Only a person sets the level. dan-petty/homelab is at full, because it exists to develop, troubleshoot and validate the features of the project.
These guards apply at every level and to every caller. An apply needs a plan of the same commit, playbook, limit and tags that is not older than infra.plan_max_age_hours. The commit is on origin. A fresh check of each disruptive host matches the plan. The command drains, changes, waits for Ready and uncordons one disruptive node at a time, and it uncordons only a node that was schedulable before. A host whose disruptive classes are all of the class service-restart-nodrain:<unit>, a restart of a unit that the host lists in devops_infra_restart_nodrain_units, is cordoned instead: it skips the drain check and the drain, the only check that reads the PodDisruptionBudgets before a host changes. That list is trusted: a person must confirm that it names only units whose restart stops no container, such as the k3s and k3s-agent units under KillMode=process. At full agent access, an agent apply opens a CloudNativePG maintenance window on single-instance clusters whose primary is on the disruptive node. Before patching, it verifies that git does not set spec.nodeMaintenanceWindow. It verifies that Argo CD self-heal does not overwrite the resource without an ignoreDifferences entry. It closes the window after uncordon and verifies cluster health. The cluster is healthy before and after each node. The first failure stops the run and leaves the node cordoned. An agent apply needs host key checks on. The node commands (devops infra node) have the same health gate, drain, waits and first-failure stop, one host at a time in the given order. An agent restart or reboot needs host key checks on, and only a person passes --force to the drain. Each run writes an audit record with the caller, the level, the repo, the commit, the plan hash, the hosts and the result.
Secrets and hardware stay with the owner at every level. An infra repo holds no secret. devops infra passes the SSH key of devops ssh and no other credential. The level stops an agent error; it is not a security boundary, because an agent with a shell can run ansible-playbook. So an agent changes a host only with devops infra, never with ansible-playbook, kubectl drain, make or a reboot over SSH.
devops tf manages GitHub organization and repository settings under tf/github stacks (ADR 0026). Each stack entry in tf.stacks[].agent_access admits only plan or apply, and every tf/github stack defaults to plan; only a person sets apply. When is_agent_caller() reports an agent session, devops tf apply and devops tf destroy refuse tf/github stacks before OpenTofu builds or starts, naming tf.stacks[].agent_access. Person sessions keep full apply and destroy access. Before any tf/github stack plan starts, devops tf plan checks the local run_gh core quota ledger against DEFAULT_TF_GITHUB_CORE_BUDGET_FLOOR (250 remaining) and refuses below the floor without making an external request. For an agent tf/github plan, devops tf plan mints a read-only installation token for devops-settings-reader from tf.github_reader.app_id, tf.github_reader.installation_id, and tf.github_reader.private_key (OS keyring tf_github_reader_private_key), and fails closed instead of falling back to writer App credentials. Passing --dry-run checks agent access and the local quota ledger without reading credentials, minting tokens, starting OpenTofu, or sending external provider requests.
A scanner can name a finding that no update of the pinned package solves yet. The agent then adds a time-limited ignore entry itself and does not ask the owner. The entry expires by itself, and the failing scan after the date is the reminder. The owner set these limits on 2026-11-07, and the owner can lift them.
When the rule applies. A scanner (Trivy on an image, OSV, uv audit or osv-scanner) names a vulnerable package or a vendored library, and no released version of the package that the project pins holds the fix. Prove it in a pull request comment: the fixed version that the scanner names, the newest release of the pinned package, what the go.mod or lock file of that release holds, and the date you read it. If any released version holds the fix, bump the pin instead, on the day the fix is published (Dependency Versions in CONTRIBUTING.md). Do not ignore the finding.
What the agent does.
- Add one entry to the ignore file of the scanner. For Trivy on an image, add it under
vulnerabilities:in.trivyignore.yaml: the findingid, thepathsthat hold the Trivy target of the binary, and thepurlsthat hold the package that Trivy reports, so the entry hides the finding in no other binary. The image scan action.github/actions/image-scanreads this file for each image. Forosv-scanneron the rootpackage-lock.json, add it under[[IgnoredVulns]]inosv-scanner.toml: the findingid, aneffectiveUntildate-time, and areasonthat names the tracking issue as#N. An entry applies before its expiry day, and the scanner filters it from the findings. Scope it as narrowly as the scanner allows: the finding ID, and the path or package when the file format holds them. Give it a reason or statement with the tracking issue, and an expiry date. The date is the day of the entry plus 3 days. - Search open issues for a duplicate, then file the tracking issue "bump
<package>and drop the ignore". - Open the pull request with the entry.
Renewal. On the date, check again for a released fix. If one exists, bump the pin and delete the entry. If none exists, renew the entry for 3 more days and put the new proof in the pull request. The first entry and its renewals last at most 14 days in all. After that, stop and ask the owner: a longer ignore is the owner's decision. An entry that the owner names with another date keeps that date.
What the agent never does.
- Ignore a finding of severity CRITICAL. Ask the owner.
- Ignore a secret finding (gitleaks), a finding in code of this project, or a finding for which a fix exists.
- Ignore a finding of a package that only the owner pins, by a decision that an ADR records.
- Use a wildcard.
- Lower the severity threshold, turn off
ignore-unfixed, or turn off a scanner. - Add an ignore without a reason, an expiry date and a tracking issue.
Report. The pull request comment lists each ignore that the agent added, its expiry and its tracking issue. The final message of the agent says the same.
Dedicated development resources and sandboxes let tests and agent runs work inside controlled boundaries. These resources include the homelab, the devcontainer, project-owned test namespaces and repositories, RuntimeClass gvisor, the review sandbox and the planner run Job. Each name refers to its role, with no internal host name or private address.
Default. Every security control, configuration and guardrail applies by default. All automated checks enforce them.
Conditions. A control can change for a dedicated development resource or a sandbox only when all four conditions hold:
- Demonstrated need. Evidence records the refusals, failures or blocked work with counts.
- Boundary holds risk. A compensating control holds the risk, such as RuntimeClass
gvisor, a deny-egress NetworkPolicy, a secret-free namespace or a scoped token. - Narrow scope. The change applies only to one named RuntimeClass, namespace, repository or Job template, and a test proves it applies nowhere else.
- Recorded entry. The table below records the control, scope, compensating control, evidence, approver and
YYYY-MM-DDreview date. An empty table with only its header row is valid.
Never changed. This rule never changes the secrets rules or private-data rules of the public repository. It never changes main protection or the controls on production services that people use. Only a person merges pull requests or changes secrets, repository settings, organization settings and hardware.
Approval. The owner approves each entry of the table. An entry can name a class of changes, such as the allow list of RuntimeClass gvisor pods. Later changes in that class need only the review and an updated row.
| Control | Scope | Compensating control | Evidence | Approved by | Reviewed |
|---|---|---|---|---|---|
| The Trivy image scan finds the CVEs of the OS packages. | The devcontainer image and the runner image (stage, implement and fix-checks Jobs). Both build FROM ghcr.io/dan-petty/devtools, which is on Debian sid. |
The Job pod mounts no ServiceAccount token, so it reads no Secret through the API. It runs as uid 1000 with a read-only root and no capability, under the NetworkPolicy of the namespace. The exposure that stays: the pod loads every key of the Secret devops-cli with envFrom, the GitHub App private key and the gateway key included. Only the code of the Job limits its GitHub token to one repository. #6518 gives the Job only the keys that it needs. |
Trivy finds no OS-package CVE on sid: 0 findings in 444 packages. With --distro debian/14 it finds 941, and 940 of them have no fix. |
The owner, 2026-11-19 | 2026-11-19 |
| The Trivy image scan stops the build on a HIGH or CRITICAL finding that has a fix. | The scan of ghcr.io/dan-petty/devtools and of each image built FROM it: the devcontainer image and the runner image. These scans send their findings to code scanning (exit code 0, SARIF) and stop no build. The Service and MCP server images keep the full gate. |
The Job pod of the row above, with the same exposure. The Renovate updates of the devtools repository take each newer tool release, and this repository takes a new devtools image each week through Renovate. The osv-scanner gate checks the npm and Python lock files. | dan-petty/devtools#3: the Go binaries hold 353 HIGH or CRITICAL findings with a fixed version. 262 of them, 4 CRITICAL, are in tools at their newest release, so no change in this project can pass a gate. The runner image of #4361 holds 286 such findings in the devtools tools and none in its venv. | The owner, 2026-11-19 | 2026-12-20 |
The Security Scan step of CI uploads the results of trivy config to code scanning. Each result is an alert of the tool Trivy-config. The workflow .github/workflows/trivy-config-alerts.yml runs devops scan alerts each day, after the CI run on main that uploaded the alerts. The command files one issue for each rule and file that has open alerts and no open issue: at most 5 in one run, the worst severity first. The title is fix(security): judge Trivy-config <rule-id> in <path>.
Who judges, and in what time. The owner judges a CRITICAL alert within 24 hours. An agent judges an alert of severity HIGH, MEDIUM or LOW within 14 days. After 14 days the owner decides.
What judging means. Do one of these, and close the issue with it:
- Fix the file in a pull request that closes the issue. This is the first choice.
- If the fix breaks the workload or needs a change that is not released yet, add an entry to
.trivyignore.yaml. Give it the ruleid, thepathsof the file, astatementthat holds the reason and the tracking issue, and anexpired_atdate.devops scan reportnames this file, and Trivy stops applying an entry after its date. An agent follows the limits of "A Finding with No Fix": 3 days, renewed at most up to 14 days in all, never for a CRITICAL alert, never for a secret. A longer date is the decision of the owner, and thestatementnames that decision. - A person dismisses the alert in code scanning, with a reason. An agent does not dismiss an alert.
We deeply appreciate responsible security disclosures. If you discover a security vulnerability within DevOps CLI:
- Do NOT open a public issue, pull request, or discussion.
- Report the vulnerability privately via GitHub Security Advisory.
- If you cannot use GitHub Security Advisories, contact the project maintainers directly via email at
contact@danielpetty.comwith the subject prefix[SECURITY VULNERABILITY].
To help us triage and remediate the issue rapidly, please include:
- A detailed description of the vulnerability and its potential impact.
- Affected component or CLI subcommand.
- Step-by-step reproduction instructions or a minimal Proof of Concept (PoC).
- Any proposed remediation or mitigation steps.
- Initial Triage & Acknowledgment: Within 24 hours of receipt.
- Vulnerability Assessment & Severity Rating: Within 48 hours using CVSS v3.1 scoring.
- Patch Development & Release: Critical security fixes merge into
mainand ship in a release within 72 hours of triage confirmation. - Public Disclosure: Coordinated after the patch release is confirmed and deployed.