Skip to main content

hegemony-steps-netcli

Network-device CLI paradigm: execute command lines, collect outputs as evidence, have a device download a file, and wait until a command's output matches a pattern. Vendor-neutral by design — platform dialects and transports (netmiko/scrapli, ssh) are resolved beneath the handler layer from device access config.

Handlers: netcli.execute, netcli.collect_evidence, netcli.file_download, netcli.wait_for.

netcli.wait_for runs one command again and again until its output matches (or stops matching) a regular expression, for the time after a reload or an install. It keeps one login per device for every poll, and logs in again when the device drops the session.

netcli.file_download names its file by repository and path in File: picked in the editor, or from a "Repository file" run-form field (file: "{{ inputs.firmware }}"). Its output carries the file's repository, path, checksums and metadata, and a reference to it ({{ steps.<id>.output.file }}) that a later step takes as its own File (looked up again by path; output.file_id names the exact file). On an older platform, a download named by id has no output.file: pass output.file_id through file_ids instead. Flows that name the file by id (file_ids) keep working.

Namespace prefix (= entry-point name): netcli. — see the repo-level CONVENTIONS.md for the naming rules.

SSH security

The built-in AsyncSSH, Scrapli and Netmiko device transports use the SSH library's own default algorithms, minus the ones known to be weak: SHA-1 key exchange, CBC/3DES/Blowfish/CAST/RC4 encryption, SHA-1/MD5 and truncated (96-bit) MACs, and DSA or SHA-1 signatures (ssh-rsa). The policy lists only these weak families and exchanges without an enforceable minimum size, so strong algorithms a library adds later, such as new post-quantum key exchanges or Ed448, are used without a policy change. RSA host keys must be at least 2048 bits and DSA host keys are refused. The policy applies to the device and its jump host, including first-contact key discovery. Variable-size Diffie–Hellman group exchange lets the server choose the group, and the SSH libraries can accept one smaller than 2048 bits, even with a SHA-256 exchange hash. The Netmiko transport refuses a server group under 2048 bits before any credential is sent, so it keeps diffie-hellman-group-exchange-sha256 in secure mode. The AsyncSSH and Scrapli transports cannot enforce that minimum per connection, so they offer no group exchange (GSS group exchange included) in secure mode. Fixed DH groups of at least 2048 bits, ECDH, Curve25519/448 and supported post-quantum exchanges work everywhere. On AsyncSSH or Scrapli, a peer offering only group exchange needs the explicit legacy setting below; that setting can permit undersized groups. A failed secure negotiation never retries with weaker settings.

For an older device, enable Allow legacy SSH algorithms (allow_legacy_ssh: true) in the netcli.execute, netcli.collect_evidence, netcli.file_download or netcli.wait_for step. This offers every algorithm the installed SSH library still implements, weak ones included (for example CBC/3DES, SHA-1/MD5 MACs and SHA-1 key exchange/signatures), and permits smaller host or login keys. Use it only on trusted networks while upgrading the device; these choices weaken confidentiality or authentication. The override affects both hops of that step and leaves host-key identity verification in place. It does not change other steps or organizations.

To allow them for one old device in every step, set allow_legacy_ssh: true in the device's SSH access configuration (access_config.ssh) instead; a jump host has its own flag (access_config.jump_host). Each flag covers that hop only, so an old device does not weaken its jump host. This needs a Hegemony version that reads the flag; an older one ignores it and connects securely.

Libraries cannot negotiate algorithms they have removed. Current Paramiko does not implement SHA-1 key exchange or SHA-1 RSA host signatures; use the AsyncSSH or Scrapli transport for a legacy peer which requires it. A transport without policy-setting support rejects a requested legacy override rather than silently ignoring it.

This setting governs the built-in device transports used by the netcli steps. It does not configure the host's shell.execute implementation or external Ansible/OpenSSH clients. Login identities must also meet the minimum key size. Explicit jump-host keys and Netmiko authentication keys are validated. AsyncSSH and Scrapli check automatically loaded file, agent, and PKCS#11 identities before offering them to the server. Weak discovered identities are skipped, with a logged warning naming the key and the reason, so a later strong key or password can still authenticate; an explicitly configured weak jump-host key is rejected. RSA user keys and OpenSSH certificate signing keys must be at least 2048 bits. X.509 certificate identities are not used for login: the transports configure no X.509 trust anchors, which AsyncSSH requires for them. Ed25519, Ed448, ECDSA and hardware-backed Ed25519/P-256 identities remain supported. The explicit legacy override also permits smaller login keys.

Metadata

Release files for hegemony-steps-netcli 0.59.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hegemony-steps-netcli 0.59.1
File Size Uploaded Provenance Actions
hegemony_steps_netcli-0.59.1.tar.gz 48.8 kB With provenance Details for hegemony_steps_netcli-0.59.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hegemony-steps-netcli 0.59.1
File Interpreter ABI Platform Actions
hegemony_steps_netcli-0.59.1-py3-none-any.whl Python 3 none any Details for hegemony_steps_netcli-0.59.1-py3-none-any.whl

Total release size: 107.1 kB

Release files / hegemony_steps_netcli-0.59.1.tar.gz

Download URL hegemony_steps_netcli-0.59.1.tar.gz
Size 48.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d1510174ca8d602142c9ea3935a89b84887bacd3c9bf188d770bbe8df4bb04b3
BLAKE2b-256 checksum
How to use checksums
d49b57be683950520bd78522f023296fe244fb353972cc797d68feaedcd03997
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Release files / hegemony_steps_netcli-0.59.1-py3-none-any.whl

Download URL hegemony_steps_netcli-0.59.1-py3-none-any.whl
Size 58.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
75003814d9aefbb9a8470fbca646ebda4a9988d65715ed7768ba41d9753855e2
BLAKE2b-256 checksum
How to use checksums
caca3da30a47553dab695cc174189897f64f67110ba6473e0ea56642be03f921
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Security for hegemony-steps-netcli 0.59.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for hegemony_steps_netcli-0.59.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.59.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page