refactor(util): move is_ipv4_literal out of pipelock.py into util.py
test / run tests/run_tests.py (pull_request) Successful in 25s
test / run tests/run_tests.py (pull_request) Successful in 25s
The classifier is a pure dotted-quad regex check — nothing pipelock-specific about it. Pipelock now imports it from util. test_pipelock_classify.py retargets at the new location. Two manifest-accessor functions in pipelock.py (pipelock_bottle_allowlist, pipelock_bottle_ssh_hostnames) look generic but are 1-line wrappers used only internally; they stay for now.
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
"""Unit: is_ipv4_literal — the classifier that decides whether
|
||||
bottle.ssh[].Hostname goes into ssrf.ip_allowlist (IPv4 literal) or
|
||||
trusted_domains (hostname)."""
|
||||
bottle.ssh[].Hostname goes into pipelock's ssrf.ip_allowlist (IPv4
|
||||
literal) or trusted_domains (hostname)."""
|
||||
|
||||
import unittest
|
||||
|
||||
from claude_bottle.pipelock import is_ipv4_literal
|
||||
from claude_bottle.util import is_ipv4_literal
|
||||
|
||||
|
||||
class TestIPv4Classify(unittest.TestCase):
|
||||
|
||||
Reference in New Issue
Block a user