Skip to content

fix(cli): reject non-global IP URLs and validate leaf_index/leaf_count in __main__ (#158) - #163

Open
drk-ram wants to merge 1 commit into
agentrust-io:mainfrom
drk-ram:drk-ram-fix-cli-main-158
Open

drk-ram wants to merge 1 commit into
agentrust-io:mainfrom
drk-ram:drk-ram-fix-cli-main-158

Conversation

@drk-ram

@drk-ram drk-ram commented Oct 25, 2026

Copy link
Copy Markdown

Closes #158

Summary

  • Reject loopback, link-local, private, reserved, multicast, and unspecified IP literals in _check_url_allowed via ipaddress.ip_address(host).is_global.
  • Validate that proof.leaf_index and entry.leaf_count are exact integers (isinstance(v, int) and not isinstance(v, bool)) before calling verify_inclusion in _main_inclusion.
  • Validate --registry-key characters in _main_chain before calling bytes.fromhex.
  • Add subTest-isolated unit regressions in tests/test_chain_registry_key.py.

Validation

  • pytest tests/test_chain_registry_key.py tests/test_trace_verify_pkg.py tests/test_cli_duplicate_members.py -q — passed (59 passed, 1 skipped, 22 subtests passed)

@drk-ram
drk-ram requested review from a team, lywinged and rajnisht7 as code owners October 25, 2026 05:46
…t in __main__ (agentrust-io#158)

Signed-off-by: Raghuvar Karthik Durga <177662415+drk-ram@users.noreply.github.com>
@drk-ram
drk-ram force-pushed the drk-ram-fix-cli-main-158 branch from e1d2ecb to 1b4ce24 Compare October 29, 2026 17:14

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant