{"id":20324561,"url":"https://github.com/netascode/go-nxos","last_synced_at":"2025-08-31T10:33:18.585Z","repository":{"id":38306653,"uuid":"404462153","full_name":"netascode/go-nxos","owner":"netascode","description":"A Go client library for Cisco NX-OS devices.","archived":false,"fork":false,"pushed_at":"2025-04-18T14:33:43.000Z","size":94,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-26T19:05:55.219Z","etag":null,"topics":["cisco","go","golang","nxos"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/netascode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-09-08T18:56:54.000Z","updated_at":"2025-05-21T12:57:14.000Z","dependencies_parsed_at":"2024-01-12T16:14:15.914Z","dependency_job_id":"5299c581-6e57-450e-b955-10d5f95fb483","html_url":"https://github.com/netascode/go-nxos","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/netascode/go-nxos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netascode%2Fgo-nxos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netascode%2Fgo-nxos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netascode%2Fgo-nxos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netascode%2Fgo-nxos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netascode","download_url":"https://codeload.github.com/netascode/go-nxos/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netascode%2Fgo-nxos/sbom","scorecard":{"id":680598,"data":{"date":"2025-08-11","repo":{"name":"github.com/netascode/go-nxos","commit":"41d80cd2dfe3afcff42e160e9402a5f36c9ae198"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.1,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/14 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/netascode/go-nxos/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/netascode/go-nxos/test.yml/main?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Mozilla Public License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/netascode/.github/SECURITY.md:1","Info: Found linked content: github.com/netascode/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/netascode/.github/SECURITY.md:1","Info: Found text in security policy: github.com/netascode/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 16 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-21T23:00:21.972Z","repository_id":38306653,"created_at":"2025-08-21T23:00:21.972Z","updated_at":"2025-08-21T23:00:21.972Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272971382,"owners_count":25024092,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-31T02:00:09.071Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cisco","go","golang","nxos"],"created_at":"2024-11-14T19:34:31.366Z","updated_at":"2025-08-31T10:33:18.553Z","avatar_url":"https://github.com/netascode.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Tests](https://github.com/netascode/go-nxos/actions/workflows/test.yml/badge.svg)](https://github.com/netascode/go-nxos/actions/workflows/test.yml)\n\n# go-nxos\n\n`go-nxos` is a Go client library for Cisco NX-OS devices. It is based on Nathan's excellent [goaci](https://github.com/brightpuddle/goaci) module and features a simple, extensible API and [advanced JSON manipulation](#result-manipulation).\n\n## Getting Started\n\n### Installing\n\nTo start using `go-nxos`, install Go and `go get`:\n\n`$ go get -u github.com/netascode/go-nxos`\n\n### Basic Usage\n\n```go\npackage main\n\nimport \"github.com/netascode/go-nxos\"\n\nfunc main() {\n    client, _ := nxos.NewClient(\"1.1.1.1\", \"user\", \"pwd\", true)\n\n    res, _ := client.Get(\"/api/mo/sys/intf/phys-[eth1/1]\")\n    println(res.Get(\"imdata.0.*.attributes.id\").String())\n}\n```\n\nThis will print:\n\n```\neth1/1\n```\n\n#### Result manipulation\n\n`nxos.Result` uses GJSON to simplify handling JSON results. See the [GJSON](https://github.com/tidwall/gjson) documentation for more detail.\n\n```go\nres, _ := client.GetClass(\"l1PhysIf\")\nprintln(res.Get(\"0.l1PhysIf.attributes.name\").String()) // name of first physical interface\n\nfor _, int := range res.Array() {\n    println(int.Get(\"*.attributes|@pretty\")) // pretty print physical interface attributes\n}\n\nfor _, attr := range res.Get(\"#.l1PhysIf.attributes\").Array() {\n    println(attr.Get(\"@pretty\")) // pretty print BD attributes\n}\n```\n\n#### Helpers for common patterns\n\n```go\nres, _ := client.GetDn(\"sys/intf/phys-[eth1/1]\")\nres, _ := client.GetClass(\"l1PhysIf\")\nres, _ := client.DeleteDn(\"sys/userext/user-[testuser]\")\n```\n\n#### Query parameters\n\nPass the `nxos.Query` object to the `Get` request to add query parameters:\n\n```go\nqueryInfra := nxos.Query(\"query-target-filter\", `eq(l1PhysIf.id,\"eth1/1\")`)\nres, _ := client.GetClass(\"l1PhysIf\", queryInfra)\n```\n\nPass as many parameters as needed:\n\n```go\nres, _ := client.GetClass(\"interfaceEntity\",\n    nxos.Query(\"rsp-subtree-include\", \"l1PhysIf\"),\n    nxos.Query(\"query-target-filter\", `eq(l1PhysIf.id,\"eth1/1\")`)\n)\n```\n\n#### POST data creation\n\n`nxos.Body` is a wrapper for [SJSON](https://github.com/tidwall/sjson). SJSON supports a path syntax simplifying JSON creation.\n\n```go\nexampleInt := nxos.Body{}.Set(\"l1PhysIf.attributes.id\", \"eth1/1\").Str\nclient.Post(\"/api/mo/sys/intf/phys-[eth1/1]\", exampleInt)\n```\n\nThese can be chained:\n\n```go\nint1 := nxos.Body{}.\n    Set(\"l1PhysIf.attributes.id\", \"eth1/1\").\n    Set(\"l1PhysIf.attributes.mode\", \"trunk\")\n```\n\n...or nested:\n\n```go\nattrs := nxos.Body{}.\n    Set(\"id\", \"eth1/1\").\n    Set(\"mode\", \"trunk\").\n    Str\nint1 := nxos.Body{}.SetRaw(\"l1PhysIf.attributes\", attrs).Str\n```\n\n#### Token refresh\n\nToken refresh is handled automatically. The client keeps a timer and checks elapsed time on each request, refreshing the token every 8 minutes. This can be handled manually if desired:\n\n```go\nres, _ := client.Get(\"/api/...\", nxos.NoRefresh)\nclient.Refresh()\n```\n\n## Documentation\n\nSee the [documentation](https://godoc.org/github.com/netascode/go-nxos) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetascode%2Fgo-nxos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetascode%2Fgo-nxos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetascode%2Fgo-nxos/lists"}