Repository navigation
Description
Friction
The rule that no committed file holds a private IP address, an internal *.lan host or a device path has no check outside detect-private-key and review.
Evidence
The rule moved from AGENTS.md to SECURITY.md in #1961. No test scans the tree for RFC 1918 addresses or .lan names.
Existing tool considered
Python ipaddress (is_private) and gitleaks custom rules. Nothing else is built.
Proposed remedy
A test reads every tracked text file and fails on an RFC 1918 address (parsed with ipaddress, not a regex subset) or a .lan host, with documented examples (RFC 5737, example.com) allowed.
Proposed design
Problem statement
SECURITY.md forbids private IP addresses and .lan hostnames in committed files. No automated test enforces this rule. The only existing check is detect-private-key and manual review. A test is needed that scans all tracked text files for RFC 1918 addresses and .lan hosts.
Acceptance criteria
- Criterion 1: The test reads every git-tracked text file in the repository.
Verification: Run the test and observe that it processes all tracked text files without skipping any. - Criterion 2: The test fails when a tracked text file contains an RFC 1918 IPv4 address.
Verification: Add a file containing 10.0.0.1 and run the test. The test fails with a message naming the file and the address. - Criterion 3: The test fails when a tracked text file contains a .lan hostname.
Verification: Add a file containing myhost.lan and run the test. The test fails with a message naming the file and the hostname. - Criterion 4: The test allows RFC 5737 documentation addresses.
Verification: Add a file containing 192.0.2.1 and run the test. The test passes. - Criterion 5: The test allows example.com and localhost.
Verification: Add a file containing example.com and localhost and run the test. The test passes. - Criterion 6: The test uses the Python ipaddress module to parse and classify IP addresses.
Verification: Inspect the test source. It imports ipaddress and calls is_private on parsed addresses. It does not use a regex to match IP octets. - Criterion 7: The test runs as part of the existing test suite in CI.
Verification: Run uv run devops ci and observe the new test executes and reports pass or fail.
Key questions
- Which address ranges are flagged as violations?: RFC 1918 IPv4 ranges: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16. [sources: SECURITY.md, AGENTS.md]
- Which hostnames are flagged as violations?: Hostnames ending in .lan. [sources: SECURITY.md]
- Which addresses and hostnames are allowed in committed files?: RFC 5737 documentation addresses (192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24), example.com, and localhost. [sources: SECURITY.md, AGENTS.md]
- How are IP addresses parsed and classified in the test?: The test uses the Python ipaddress module and its is_private attribute. It does not use a regex to match IP octets. (proposed)
- Does the test cover IPv6 ULA addresses (fc00::/7)?: No. The body names RFC 1918, which is an IPv4 range. The test covers IPv4 private addresses and .lan hostnames only. (proposed)
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsReady
- StatusShow more project fieldsNew
Activity
dan-petty commentedon Oct 23, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones on the board.
The candidate proposes a new test to check committed files.The change improves security but is not critical to system operation.The test prevents accidental exposure of private addresses in committed files.The test requires parsing text files and using ipaddress module for validation.dan-petty commentedon Oct 28, 2026
Status set to Ready at bb46660 (see proposed design in issue body).