{"id":37143245,"url":"https://github.com/cbsd/cbsd-mq-api","last_synced_at":"2026-01-14T16:48:50.960Z","repository":{"id":142433535,"uuid":"385211246","full_name":"cbsd/cbsd-mq-api","owner":"cbsd","description":"Simplified API for creating and destroying CBSD virtual environments","archived":false,"fork":false,"pushed_at":"2025-02-02T18:54:09.000Z","size":3920,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-02T19:34:43.123Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cbsd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"patreon":"clonos","custom":"https://www.bsdstore.ru/en/donate.html"}},"created_at":"2021-07-12T10:37:21.000Z","updated_at":"2025-02-02T18:54:11.000Z","dependencies_parsed_at":"2024-12-19T17:28:30.451Z","dependency_job_id":"81070fd9-5446-491d-bb17-60c89d33ccfe","html_url":"https://github.com/cbsd/cbsd-mq-api","commit_stats":{"total_commits":19,"total_committers":2,"mean_commits":9.5,"dds":"0.052631578947368474","last_synced_commit":"01cec584baa7e759b2de73ac5a2dae143283995d"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/cbsd/cbsd-mq-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbsd%2Fcbsd-mq-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbsd%2Fcbsd-mq-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbsd%2Fcbsd-mq-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbsd%2Fcbsd-mq-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cbsd","download_url":"https://codeload.github.com/cbsd/cbsd-mq-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbsd%2Fcbsd-mq-api/sbom","scorecard":{"id":268744,"data":{"date":"2025-08-11","repo":{"name":"github.com/cbsd/cbsd-mq-api","commit":"5fb45c90659ed5d76ee534a6c8c271a93329e740"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"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":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"Code-Review","score":0,"reason":"Found 0/26 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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"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":"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":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: BSD 2-Clause \"Simplified\" License: 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":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2025-3487 / GHSA-hcg3-q754-cr77"],"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 2 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-17T12:49:57.948Z","repository_id":142433535,"created_at":"2025-08-17T12:49:57.948Z","updated_at":"2025-08-17T12:49:57.948Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28426506,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T16:38:47.836Z","status":"ssl_error","status_checked_at":"2026-01-14T16:34:59.695Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-01-14T16:48:50.382Z","updated_at":"2026-01-14T16:48:50.955Z","avatar_url":"https://github.com/cbsd.png","language":"Go","funding_links":["https://patreon.com/clonos","https://www.bsdstore.ru/en/donate.html","https://www.patreon.com/clonos"],"categories":[],"sub_categories":[],"readme":"# CBSD RESTFull API\n\nCopyright (c) 2013-2025, The CBSD Development Team\nHomepage: https://github.com/cbsd/cbsd\n\n#### Table of Contents\n\n1. [Project Description - What does the project do?](#description)\n2. [Installation - HowTo start](#installation)\n3. [Usage - Configuration options and additional functionality](#usage)\n4. [Contributing - Contribute to the project](#contributing)\n5. [Support - Mailing List, Talks, Contacts](#support)\n\n\n## Description\n\nProvides a simplified API for creating and destroying CBSD virtual environments.\n\n## Errata\n\nBy default, all actions are permitted for all requests.\nThrough the `-allowlist \u003cwhitelist_file\u003e` parameter you can limit the number of permissible public keys/CID.\nFormat of \u003cwhitelist_file\u003e similar to authotized_keys: one key per line, e.g:\n\n```\nssh-ed25519 AAAA...xxx your_name@@your.domain\nssh-ed25519 AAAA...yyy user2@@example.com\n```\n\n## Installation\n\nAssuming you have a stock vanilla FreeBSD 14.2+ installation.\nThe directives below configure a standalone installation ( single API + hoster env),\nhowever you can use any number of physical nodes for single API.\n\n1) Install packages:\n```\npkg install -y cbsd cbsd-mq-router cbsd-mq-api beanstalkd git\n```\n\n2) Configure beanstalkd, the broker service.\n\n  Since all services are on the same server, we will specify the address 127.0.0.1\n  for incoming connections and start the service:\n```\nsysrc beanstalkd_flags=\"-l 127.0.0.1 -p 11300\"\nservice beanstalkd enable\nservice beanstalkd restart\n```\n\n3) Configure CBSD as usual:\n```\nenv workdir=/usr/jails /usr/local/cbsd/sudoexec/initenv\n```\n\n4) Configure MQ router\n\nFirst, get hoster FQDN via `hostname` command.\nLet's say your host has a name: apitest.my.domain\n\nOpen /usr/local/etc/cbsd-mq-router.json in any favorite editor and set\n\"tube\" and \"reply_tube_prefix\" params ( cbsd_\u003chostname_without_dot\u003e and cbsd_\u003chostname_without_dot\u003e_result_id ), e.g:\n\n```\n{\n    \"cbsdenv\": \"/usr/jails\",\n    \"cbsdcolor\": false,\n    \"broker\": \"beanstalkd\",\n    \"logfile\": \"/dev/stdout\",\n    \"recomendation\": \"/usr/local/cbsd/modules/api.d/misc/recomendation.sh\",\n    \"freejname\": \"/usr/local/cbsd/modules/api.d/misc/freejname.sh\",\n    \"server_url\": \"https://127.0.0.1\",\n    \"cloud_images_list\": \"/usr/local/etc/cbsd_api_cloud_images.json\",\n    \"iso_images_list\": \"/usr/local/etc/cbsd_api_iso_images.json\",\n    \"beanstalkd\": {\n      \"uri\": \"127.0.0.1:11300\",\n      \"tube\": \"cbsd_zpool1\",\n      \"reply_tube_prefix\": \"cbsd_zpool1_result_id\",\n      \"reconnect_timeout\": 5,\n      \"reserve_timeout\": 5,\n      \"publish_timeout\": 5,\n      \"logdir\": \"/var/log/cbsdmq\"\n    }\n}\n\n```\n\n  `cloud_images_list` - The path to the json  file, which is displayed upon /images query - list of avaliable images.\n                        See etc/cbsd_api_cloud_images.json as sample.\n\n5) Start MQ router:\n```\nservice cbsd-mq-router enable\nservice cbsd-mq-router start\n```\n\n6) Install CBSD API module:\n```\ncbsd module mode=install api\necho 'api.d' \u003e\u003e ~cbsd/etc/modules.conf\ncbsd initenv\n```\n\n7) Configure CBSD API module.\n\nCopy configuration sample to work dir:\n```\ncp -a /usr/local/cbsd/modules/api.d/etc/api.conf ~cbsd/etc/\ncp -a /usr/local/cbsd/modules/api.d/etc/bhyve-api.conf ~cbsd/etc/\ncp -a /usr/local/cbsd/modules/api.d/etc/jail-api.conf ~cbsd/etc/\n```\n\nOpen ~cbsd/etc/api.conf in any favorite editor and set \"server_list=\" to server FQDN, e.g:\n```\n...\nserver_list=\"apitest.my.domain\"\n...\n```\n\nSet 'cbsd' user permission for ~cbsd/etc/api.conf file:\n```\nchown cbsd:cbsd ~cbsd/etc/api.conf\n```\n\nHere you can check that the API module scripts works:\n```\nsu -m cbsd -c '/usr/local/cbsd/modules/api.d/misc/recomendation.sh'\n```\nmust return the host from server_list ( apitest.my.domain )\n\n```\nsu -m cbsd -c '/usr/local/cbsd/modules/api.d/misc/freejname.sh'\n```\nmust return the unique name 'envX'.\n\n8) Configure RestAPI daemon:\n```\nmkdir -p /var/db/cbsd-api /usr/jails/var/db/api/map\nchown -R cbsd:cbsd /var/db/cbsd-api /usr/jails/var/db/api/map\nservice cbsd-mq-api enable\nservice cbsd-mq-api start\n```\n\n## Usage\n\n### Via curl, valid endpoints:\n\n```\ncurl -H \"cid:\u003ccid\u003e\" http://127.0.0.1:65531/api/v1/cluster\ncurl -X POST -H \"Content-Type: application/json\" -d @filename.json http://127.0.0.1:65531/api/v1/create/vm1\ncurl -H \"cid:\u003ccid\u003e\" http://127.0.0.1:65531/api/v1/status/\u003cenv\u003e\ncurl -H \"cid:\u003ccid\u003e\" http://127.0.0.1:65531/api/v1/start/\u003cenv\u003e\ncurl -H \"cid:\u003ccid\u003e\" http://127.0.0.1:65531/api/v1/stop/\u003cenv\u003e\ncurl -H \"cid:\u003ccid\u003e\" http://127.0.0.1:65531/api/v1/destroy/\u003cenv\u003e\n```\nWhere `\u003ccid\u003e` is your token/namespace. For convenience, in a *private cluster*, \nwe suggest using md5 hash of your public key as \u003ccid\u003e.\n\nTo test with curl, create valid payload file, e.g. `debian12.json`:\n```\ncat \u003e debian11.json \u003c\u003cEOF\n{\n  \"imgsize\": \"10g\",\n  \"ram\": \"1g\",\n  \"cpus\": 2,\n  \"image\": \"debian12\",\n  \"pubkey\": \"ssh-ed25519 AAAA..XXX your@localhost\"\n}\nEOF\n```\nThen send it to /create endpoint:\n```\ncurl --no-progress-meter -X POST -H \"Content-Type: application/json\" -d @debian12.json http://127.0.0.1:65531/api/v1/create/vm1\n```\n\nto create 'vm1' or:\n```\ncurl --no-progress-meter -X POST -H \"Content-Type: application/json\" -d @debian12.json http://127.0.0.1:65531/api/v1/create/_\n```\n\nto assign a VM name automatically.\n\n### Via CBSDfile:\n\nTo test via CBSDfile, lets create simple CBSDfile, where CLOUD_KEY - is your publickey string:\n```\nCLOUD_URL=\"http://127.0.0.1:65531\"\nCLOUD_KEY=\"ssh-ed25519 AAAA..XXX your@localhost\"\n\njail_minio1()\n{\n\timgsize=\"10g\"\n\tpkg_bootstrap=0\n}\n```\n\nRun:\n```\nsudo cbsd up\n```\n\nAfter jail start you can use:\n```\ncbsd login\ncbsd status\ncbsd destroy\n```\n\nSee documentation for detailed information and additional examples [here](https://github.com/cbsd/cbsd/blob/develop/share/docs/general/cbsd_api.md)\n\n## Get Support\n\n* GitHub: https://github.com/cbsd/cbsd-mq-api/issues\n* For CBSD-related support, discussion and talks, please join to Telegram CBSD usergroup channel: @cbsdofficial ( [https://t.me/cbsdofficial](https://t.me/cbsdofficial)\n\n## update go sub/mods\n\n```\nrm -f go.mod go.sum\n```\n\n```\ngo mod init cbsd-mq-api\ngo mod tidy\n```\n\n## Support Us\n\n* https://www.patreon.com/clonos\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbsd%2Fcbsd-mq-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcbsd%2Fcbsd-mq-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbsd%2Fcbsd-mq-api/lists"}