Repository navigation
Description
Problem or Motivation
The owner set a direction on 2026-11-13: "security standards should be updated when needed to facilitate full utilization of dedicated development resources and sandboxed environments, even though we should default to and fully support security standards, configs, and guardrails".
SECURITY.md states the controls, but it has no rule for when a control may change for a dedicated development resource (the homelab cluster that exists to develop and test the project, the devcontainer, project-owned test namespaces and repositories) or for work inside a sandbox (the gVisor RuntimeClass gvisor of #5431, the review sandbox, the planner run Job of ADR 0018). So each case is argued again, and agents cannot use these resources fully:
- The implement runner refuses programs such as
gitandpython -cin every run (175 refusals in 4,823 shell calls, 37 of 37 runs, ADR review of 2026-11-12), also where a sandbox boundary would hold the risk. - The trivy rule already shows the form of a narrow, time-limited exception (SECURITY.md, a finding with no fix), but no general rule exists.
Proposed Solution
Add one section to SECURITY.md, "Dedicated development resources and sandboxes":
- The default stays: every control, config and guardrail applies, and the checks enforce it.
- A control may change for a named dedicated development resource or a sandbox only when all of these hold: the work needs it (evidence: refusals, failures or blocked work with counts); the boundary of the resource or sandbox holds the risk (name the compensating control, for example the gVisor sandbox, a NetworkPolicy with no egress, a namespace with no Secrets, a scoped token); the scope is narrow (a RuntimeClass, a namespace, a repository, a Job template), and a test proves that the change applies only inside that scope; the change is recorded in a table in the section with its scope, compensating control, evidence, approval and review date.
- Never changed by this rule: the secrets and private-data rules of the public repository, the rule that only a person merges and changes secrets, repository and organization settings and hardware, the protection of
main, and the controls of the production services that people use. - Approval: the owner approves each entry of the table. An entry can name a class of changes (for example "the program allow list inside RuntimeClass gvisor pods") so that later changes of that class need only the review and the record.
- Link the section from the specs of feat(roadmap): make the attempt limits of the failing jobs settings #5440's tuning loop and the SRE spec, and list the current dedicated resources by role (no host names).
Acceptance Criteria
-
SECURITY.mdhas the section with the default, the conditions, the never-changed list, the approval rule and an empty or first table. - A test fails when a table row has no scope, no compensating control or no review date.
-
uv run devops docs checkpasses.
Existing Tool Considered
The policy-as-documentation pattern of OpenSSF and NIST SSDF (PO.1, PS.1) and the existing exception form of the trivy rule. No new tool. Cost to build (estimate): 0.2 M tokens and 1 hour.
Related
#5431 and #5434 (gVisor), #2695 (sandbox of the implement shell), #5241 (the command gate as a decision point), #3242 / ADR 0018 (sandboxed run tool), #5440.
Alternatives check of 2026-11-17: not-applicable.
Class: docs, no search.
Tool: none found.
Proposed design
Problem statement
Add a section to SECURITY.md that sets when a control may change for a dedicated development resource or a sandbox. The file states the controls but has no such rule, so each case is argued again and agents cannot use these resources fully. The section keeps the default, names the conditions and the never-changed rules, lists the resources by role, and records each owner-approved exception in a table. Invariant tests check the section, the table and the links, and the tuning-loop and SRE guidelines link to it.
Acceptance criteria
Requirement: Security section for dedicated resources and sandboxes
SECURITY.md SHALL hold a top-level section Dedicated development resources and sandboxes that states the default, the conditions, the never-changed rules and the approval rule, lists the dedicated development resources and sandboxes by role, and holds the control table with the header Control, Scope, Compensating control, Evidence, Approved by and Reviewed.
Scenario: The section holds each rule and the table
- WHEN
uv run pytest tests/invariants/test_agents_md.pyreads the section between the## Dedicated development resources and sandboxesheading and the next##heading. - THEN The test passes only when the section holds the
**Default.**,**Conditions.**,**Never changed.**and**Approval.**lead-ins, names the owner as the approver, names the homelab, the devcontainer, the project-owned test namespaces and repositories, RuntimeClassgvisor, the review sandbox and the planner run Job, and holds the table headerControl | Scope | Compensating control | Evidence | Approved by | Reviewed.
Requirement: Control table row fields
Every data row of the control table SHALL have a non-empty Control, Scope, Compensating control, Evidence, Approved by and Reviewed cell.
Scenario: A row misses a required field
- WHEN A data row has an empty cell in one of the six columns.
- THEN
uv run pytest tests/invariants/test_agents_md.pyfails and names the row and the missing column.
Requirement: Empty control table
The control table SHALL accept a header with no data rows.
Scenario: No exception is recorded
- WHEN The table holds its header row and no data row.
- THEN
uv run pytest tests/invariants/test_agents_md.pypasses.
Requirement: Review date format
The Reviewed cell of each data row SHALL be an ISO 8601 calendar date in the form YYYY-MM-DD.
Scenario: Invalid review date
- WHEN A data row has a
Reviewedvalue that is not aYYYY-MM-DDdate. - THEN
uv run pytest tests/invariants/test_agents_md.pyfails and names the row and the value.
Requirement: Guideline links to the section
docs/guidelines/agentic-jobs.md and docs/guidelines/sre.md SHALL link to ../../SECURITY.md#dedicated-development-resources-and-sandboxes.
Scenario: Both guidelines link the section
- WHEN
uv run pytest tests/invariants/test_guidelines.pyreads the two guideline files. - THEN The test passes only when each file holds an inline link whose target is
../../SECURITY.md#dedicated-development-resources-and-sandboxes.
Requirement: No host name in the resource list
The resource list SHALL name each resource by role and hold no internal host name or private address.
Scenario: The address invariant reads the policy
- WHEN A person runs
uv run pytest tests/invariants/test_committed_addresses.pyafter the section is added. - THEN The test passes, because it fails on an RFC 1918 host address or a
.lanhost in a tracked file.
Requirement: Documentation check
The changed documents SHALL pass the documentation check.
Scenario: Docs check passes
- WHEN A person runs
uv run devops docs check. - THEN The command exits 0.
Existing Tool Considered
The alternatives check of 2026-11-17 records not-applicable for this docs item and names no register tool. The table is read with markdown-it-py 4.3.0 (MIT, executablebooks, https://github.com/executablebooks/markdown-it-py), an open, maintained parser that is already a declared dependency (pyproject.toml:70) and is wrapped by tests/support/markdown_tables.py. It lacks the project's rules: which columns a row fills, the ISO date form, and the scope of a row. The change builds only those assertions, with no new parser and no new tool. Cost to build (estimate from the issue body): 0.2 M tokens and 1 hour.
Key questions
- Where does the new rule live?: A new top-level section in
SECURITY.md, afterInfra Reposand beforeA Finding with No Fix. (best practice) [sources: SECURITY.md:66, SECURITY.md:68, SECURITY.md:74]- Chosen: New section after
Infra Repos.Infra Reposis the rule for the dedicated development cluster, andA Finding with No Fixis the existing exception form; the new rule sits between them. - Rejected: New section after the zero-trust principles. It leaves the MCP and infra sections between the rule and the resources and exception it governs.
- Rejected: Separate docs/security/exceptions.md. It splits the policy from the controls that it changes.
- Rejected: A new ADR. The rule is a policy update, not an architecture decision.
- Chosen: New section after
- How is the new section structured?: With bold lead-ins as the file's rule sections use:
**Default.**,**Conditions.**,**Never changed.**and**Approval.**, then the control table. (best practice) [sources: SECURITY.md:78, SECURITY.md:81, SECURITY.md:85, SECURITY.md:87, SECURITY.md:95, SECURITY.md:101, SECURITY.md:103, SECURITY.md:116]- Chosen: Bold lead-ins, as
A Finding with No Fix. Every rule section ofSECURITY.mduses bold lead-ins; only the disclosure section uses###, so the new rule follows the file's style. - Rejected:
###subheadings for each rule. No rule section ofSECURITY.mduses them; the file's rule sections use bold lead-ins. - Rejected: Prose paragraphs only. The test cannot find each rule, and the issue's acceptance criteria asks for the parts.
- Chosen: Bold lead-ins, as
- What columns does the control table have?:
Control,Scope,Compensating control,Evidence,Approved byandReviewed. (best practice) [sources: SECURITY.md:81, SECURITY.md:105, .trivyignore.yaml:1]- Chosen: Six columns: the control plus the five fields of the issue. The issue names scope, compensating control, evidence, approval and review date; the control name identifies the row.
- Rejected: Add an ID column. The control name is the identifier; an ID adds a value that nothing reads.
- Rejected: Free-form rows. The test needs fixed fields to validate.
- Where does the table test live?:
tests/invariants/test_agents_md.py, the existing file that readsSECURITY.mdsections. (best practice) [sources: docs/TESTING.md:99, tests/invariants/test_agents_md.py:740, tests/invariants/test_agents_md.py:761]- Chosen: tests/invariants/test_agents_md.py. It already reads
SECURITY.mdsections, anddocs/TESTING.md:99holds one file per subject and fix(roadmap): Stop plan rules that ask for config value tests #6080 refuses a new test module intests/invariants. - Rejected: New tests/invariants/test_security_controls_table.py. It is a new test module in
tests/invariants, whichdocs/TESTING.md:99and fix(roadmap): Stop plan rules that ask for config value tests #6080 refuse. - Rejected: tests/docs/. It mirrors the
devops_cli.docspackage, and this test reads a committed policy document. - Rejected: tests/security/. It mirrors the scanner modules; the test is a repository invariant, not a scanner test.
- Chosen: tests/invariants/test_agents_md.py. It already reads
- How does the test read the table?:
tests.support.markdown_tables.tables(), which parses the document with markdown-it-py, already a declared dependency; the test adds no parser. (best practice) [sources: tests/support/markdown_tables.py:1, tests/support/markdown_tables.py:18, pyproject.toml:70, https://github.com/executablebooks/markdown-it-py]- Chosen: tests.support.markdown_tables.tables(). The shared helper parses a Markdown table with markdown-it-py, which is already a dependency, and no test parses Markdown by hand.
- Rejected: Hand line parser in the test.
tests/support/markdown_tables.py:4says no test parses Markdown by hand. - Rejected: A new Markdown library. markdown-it-py is already declared and wrapped by the helper.
- Rejected: Regular expression. A regex is brittle with escaped pipes and inline markup.
- What is the review date rule?: An ISO 8601 calendar date in the form
YYYY-MM-DD; the test fails on a missing or invalid date. (best practice) [sources: SECURITY.md:105, .trivyignore.yaml:6]- Chosen: ISO 8601
YYYY-MM-DD. The existing exception entries use it, and it sorts and validates. - Rejected: Free text. The test cannot validate it.
- Rejected: Date and approver in one cell. The
Approved bycolumn holds the approver.
- Chosen: ISO 8601
- Do we link the new section from the tuning-loop spec of feat(roadmap): make the attempt limits of the failing jobs settings #5440 and the SRE spec in this change?: Yes, link both now. The tuning loop is
docs/guidelines/agentic-jobs.md(moved there by docs(ai): add the agentic workflow spec #5443), and the SRE guideline's Table 1 already linksSECURITY.md. Add one line to each: the tuning loop's step 3 names the rule for a limit that a control sets, and the SRE Table 1 gets a row. The strict site build checks the anchor. (best practice) [sources: docs/guidelines/agentic-jobs.md:118, docs/guidelines/agentic-jobs.md:147, docs/guidelines/sre.md:18, docs/guidelines/sre.md:22, openspec/changes/archive/2026-11-13-5443-add-the-agentic-workflow-spec/proposal.md:11]- Chosen: Link both guidelines in this change. Both specs exist in the repository, and each link is one line, so one pull request holds the section and its links.
- Rejected: Defer the cross-links to a follow-up. No block remains; the specs exist, and a follow-up would split a one-line edit from the section it links.
- Rejected: Link only the SRE guideline now. The tuning-loop spec exists and its step 3 is where a limit may be a control, so both links belong with the section.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 13, 2026
Both define sandbox by controls, but #5243 sets the sandbox definition in an ADR record while the candidate adds a policy section to SECURITY.md for when a control may change.feat(k8s): set the pod overhead of RuntimeClass gvisor (#5530)
devops-cli-service commentedon Nov 17, 2026
Alternatives check: not-applicable
Class: docs. The check makes no search and no model call for an item of this class.
Tool: none found
Checked on 2026-11-17. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 18, 2026
Status set to Ready at b466159 (see proposed design in issue body).
dan-petty commentedon Nov 19, 2026
Entries for the table (owner approvals of 2026-11-19):
--distro debian/14, 941 findings, 940 with no fix). Scope: the devcontainer image and the runner image (stage, implement and fix-checks Jobs), built FROMghcr.io/dan-petty/devtools. Compensating control: the Job sandbox with no Secrets, a scoped token and the NetworkPolicy.ghcr.io/dan-petty/devtoolsand of each image built FROM it reports the findings of the upstream tool binaries to code scanning (exit code 0, SARIF) and does not fail the build. Evidence (feat: build and publish the devtools image from debian sid devtools#3): the Go binaries hold 353 HIGH or CRITICAL findings with a fixed version, and 262 of them, 4 CRITICAL, are in tools at their newest release (gitleaks, kube-linter, popeye, k9s, minikube, kubectl and others), so no change in this project can pass a gate. The devcontainer has the same binaries today with no gate (ci(security): scan the devcontainer image and rescan images daily #6406, report-only). Scope: those images only; the Service and MCP server images keep the full gate. Kept gates: osv-scanner on the npm and Python lock files, and a bump of a tool on the day a newer release exists. Compensating control: the same Job sandbox, the daily rebuild and the Renovate bumps. Review: when ci(security): scan the devcontainer image and rescan images daily #6406 makes the devcontainer scan a gate.#4361 writes both entries and needs the table of this item.