Repository navigation
feat(security): refuse a commit that names the configured domain - #5347
Merged
Merged
Conversation
The new row `domain` reads `k8s.domain` and `cloudflare.domain` from the config at run time. It reads the patch of each commit from origin/main to HEAD with `git log -p`, and unidiff gives the path and the line of each added line. The row fails on a line or a path that holds a configured domain with no letter, digit or hyphen next to it. Each finding names the path, the line, the commit and the settings key, never the value. Where no domain is configured, the row is skipped with its cause. The pre-push hook `devops-ci-pre-push` runs the row with lint and format, so a push of a person, an agent or the runner Job reads the commits of the branch before they go to GitHub. Refs #5295
SECURITY.md rule 8 says how the row reads the configured domains, and that public evidence holds exit codes and counts only, never `argocd app diff` output or Application YAML. CONTRIBUTING.md, docs/SDLC.md and the knowledge base list the row among the checks of the pre-push hook. docs/TESTING.md lists the row and its invariant test file. ADR 0014 gets a Status History line, because its pre-push hook now also runs the row. Refs #5295
The config keeps the text of k8s.domain and cloudflare.domain. A domain with a final dot or blank space, such as "example.net.", gave a pattern that found no host under example.net, so the domain row passed a commit that named the domain. configured_domains now gives each domain from dnspython in ASCII with no blank space and no final dot. The pattern of the row also holds the Unicode form, so a Unicode label is found in both forms. Refs #5295
Owner
Author
|
Local evidence for the head
Render diff: the branch changes no path under |
dan-petty
marked this pull request as ready for review
November 13, 2026 03:36
dan-petty
pushed a commit
that referenced
this pull request
Nov 13, 2026
🤖 I have created a release *beep* *boop* --- ## [0.126.0](v0.125.5...v0.126.0) (2026-11-13) ### Features * **security:** refuse a commit that names the configured domain ([#5347](#5347)) ([c0a53b7](c0a53b7)) ### Bug Fixes * **github:** correct readiness files and merged monitor output ([#5349](#5349)) ([e477ab2](e477ab2)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
1 of 21 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A new row
domainofdevops cireadsk8s.domainandcloudflare.domainfrom the config at run time. It reads each added line and each path of each commit fromorigin/maintoHEAD(git log -pandunidiff), and fails on the domain or a name under it. The row reads the domain in ASCII with no final dot, and also finds its Unicode form. Each finding names the path, the line, the commit and the settings key, never the value. The pre-push hook runsdevops ci --check --only lint,format,domain, so no push sends such a commit to the public repository. Where no domain is configured, such as on the GitHub runners, the row is skipped with its cause.Why: the address guard refuses RFC 1918 addresses and
.lanhosts only, and agents copy text between the homelab tree and this repository. The runner image holds no Gitleaks, so a Gitleaks rule would not run before the runner Job pushes.Closes #5295
Change:
openspec/changes/archive/2026-11-13-5295-refuse-configured-domain/