{"id":13676934,"url":"https://github.com/matsumotory/ngx_mruby","last_synced_at":"2025-10-10T07:16:36.278Z","repository":{"id":3212065,"uuid":"4246391","full_name":"matsumotory/ngx_mruby","owner":"matsumotory","description":"ngx_mruby - A Fast and Memory-Efficient Web Server Extension Mechanism Using Scripting Language mruby for nginx","archived":false,"fork":false,"pushed_at":"2024-11-07T18:26:52.000Z","size":10547,"stargazers_count":994,"open_issues_count":21,"forks_count":115,"subscribers_count":48,"default_branch":"master","last_synced_at":"2025-09-26T06:32:28.103Z","etag":null,"topics":["mruby","nginx","ngx-mruby"],"latest_commit_sha":null,"homepage":"https://ngx.mruby.org/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matsumotory.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2012-05-07T04:35:12.000Z","updated_at":"2025-06-11T13:11:14.000Z","dependencies_parsed_at":"2022-07-16T23:31:05.742Z","dependency_job_id":"0b58b05b-18b7-45e2-9ef4-a0619cca89f3","html_url":"https://github.com/matsumotory/ngx_mruby","commit_stats":{"total_commits":1521,"total_committers":65,"mean_commits":23.4,"dds":"0.47994740302432615","last_synced_commit":"35e819b2bb1b4370a962dea5145f46cf94442fc0"},"previous_names":["matsumoto-r/ngx_mruby"],"tags_count":86,"template":false,"template_full_name":null,"purl":"pkg:github/matsumotory/ngx_mruby","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matsumotory%2Fngx_mruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matsumotory%2Fngx_mruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matsumotory%2Fngx_mruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matsumotory%2Fngx_mruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matsumotory","download_url":"https://codeload.github.com/matsumotory/ngx_mruby/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matsumotory%2Fngx_mruby/sbom","scorecard":{"id":625335,"data":{"date":"2025-08-11","repo":{"name":"github.com/matsumotory/ngx_mruby","commit":"bed251036c0f273fb42fa9e84c00767b15983956"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4,"checks":[{"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":"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":"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":"Code-Review","score":6,"reason":"Found 9/15 approved changesets -- score normalized to 6","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":"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":"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":"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":"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":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":10,"reason":"project is fuzzed","details":["Info: CLibFuzzer integration found: mruby/oss-fuzz/mruby_fuzzer.c:6"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"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 'master'"],"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":"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:27: update your workflow using https://app.stepsecurity.io/secureworkflow/matsumotory/ngx_mruby/test.yml/master?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:31: pin your Docker image by updating ubuntu:18.04 to ubuntu:18.04@sha256:152dc042452c496007f07ca9127571cb9c29697f42acbfad72324b2bb2e43c98","Warn: containerImage not pinned by hash: misc/Dockerfile.travis_emulate:1: pin your Docker image by updating ubuntu:bionic to ubuntu:bionic@sha256:152dc042452c496007f07ca9127571cb9c29697f42acbfad72324b2bb2e43c98","Warn: containerImage not pinned by hash: mruby/Dockerfile:1: pin your Docker image by updating ruby:3.2.2-bullseye to ruby:3.2.2-bullseye@sha256:7cfc1394f44b0c22abc91d35d2a069731ab4bb31c3acb91d14eeca1ee2ccd21c","Warn: pipCommand not pinned by hash: mruby/Dockerfile:11","Info:   0 out of   1 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 containerImage dependencies pinned","Info:   0 out of   1 pipCommand 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":"Vulnerabilities","score":7,"reason":"3 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-6f62-3596-g6w7","Warn: Project is vulnerable to: GHSA-r995-q44h-hr64","Warn: Project is vulnerable to: GHSA-8mq4-9jjh-9xrc"],"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 24 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-21T06:14:53.596Z","repository_id":3212065,"created_at":"2025-08-21T06:14:53.597Z","updated_at":"2025-08-21T06:14:53.597Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279003169,"owners_count":26083533,"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-10-10T02:00:06.843Z","response_time":62,"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":["mruby","nginx","ngx-mruby"],"created_at":"2024-08-02T13:00:34.894Z","updated_at":"2025-10-10T07:16:36.239Z","avatar_url":"https://github.com/matsumotory.png","language":"C","funding_links":["https://opencollective.com/ngx_mruby"],"categories":["C"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"ngx_mruby\" src=\"https://github.com/matsumotory/ngx_mruby/blob/master/misc/logo.png?raw=true\" width=\"300\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003engx_mruby\u003c/strong\u003e: A Fast and Memory-Efficient Nginx Extension Mechanism Scripting with mruby.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#backers\" title=\"Backers on Open Collective\"\u003e\u003cimg src=\"https://opencollective.com/ngx_mruby/backers/badge.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"#sponsors\" title=\"Sponsors on Open Collective\"\u003e\u003cimg src=\"https://opencollective.com/ngx_mruby/sponsors/badge.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/matsumotory/ngx_mruby/actions\" title=\"Build Status\"\u003e\u003cimg src=\"https://github.com/matsumotory/ngx_mruby/actions/workflows/test.yml/badge.svg?branch=master\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Documents\n- [Install](https://github.com/matsumotory/ngx_mruby/tree/master/docs/install)\n- [Test](https://github.com/matsumotory/ngx_mruby/tree/master/docs/test)\n- [Directives](https://github.com/matsumotory/ngx_mruby/tree/master/docs/directives)\n- [Class and Method](https://github.com/matsumotory/ngx_mruby/tree/master/docs/class_and_method)\n- [Use Case](https://github.com/matsumotory/ngx_mruby/tree/master/docs/use_case)\n- [Examples](https://github.com/hsbt/nginx-tech-talk)\n\n## What's ngx_mruby\n__ngx_mruby is A Fast and Memory-Efficient TCP/UDP Load Balancing and Web Server Extension Mechanism Using Scripting Language mruby for nginx.__\n\n- ngx_mruby is to provide an alternative to lua-nginx-module or [mod_mruby of Apache httpd](http://mod.mruby.org/).\n- Unified Ruby Code between Apache(mod_mruby), nginx(ngx_mruby) and other Web server software(plan) for Web server extensions.\n- You can implement nginx modules by Ruby scripts on nginx!\n- You can implement some Web server software extensions by same Ruby code (as possible)\n- Supported nginx main-line and stable-line\n- [Benchmark between ngx_mruby and lua-nginx-module](https://www.techempower.com/benchmarks/#section=data-r10\u0026hw=peak\u0026test=plaintext\u0026w=4-0)\n\n```ruby\n# location /proxy {\n#   mruby_set $backend \"/path/to/proxy.rb\";\n#   proxy_pass   http://$backend;\n# }\n\nbackends = [\n  \"test1\",\n  \"test2\",\n  \"test3\",\n]\n\nr = Redis.new \"192.168.12.251\", 6379\nr.get backends[rand(backends.length)]\n```\n\n- see [examples](https://github.com/matsumotory/ngx_mruby/blob/master/example/nginx.conf)\n- __Sample of Unified Ruby Code between Apache(mod_mruby) and nginx(ngx_mruby) for Web server extensions__\n- You can implement some Web server software extensions by same Ruby code (as possible)\n\n```ruby\n# Unified Ruby Code between Apache(mod_mruby) and nginx(ngx_mruby)\n# for Web server extensions.\n#\n# Apache httpd.conf by mod_mruby\n#\n# \u003cLocation /mruby\u003e\n#     mrubyHandlerMiddle \"/path/to/unified_hello.rb\"\n# \u003c/Location\u003e\n#\n# nginx nginx.conf by ngx_mruby\n#\n# location /mruby {\n#     mruby_content_handler \"/path/to/unified_hello.rb\";\n# }\n#\n\nServer = get_server_class\n\nServer::rputs \"Hello #{Server::module_name}/#{Server::module_version} world!\"\n# mod_mruby =\u003e \"Hello mod_mruby/0.9.3 world!\"\n# ngx_mruby =\u003e \"Hello ngx_mruby/0.0.1 world!\"\n```\n\n\n[![ngx_mruby mod_mruby performance](https://github.com/matsumotory/mod_mruby/raw/master/images/performance_20140301.png)](http://blog.matsumoto-r.jp/?p=3974)\n\n※ [hello world simple benchmark, see details of blog entry.](http://blog.matsumoto-r.jp/?p=3974)\n\n\n## Abstract\n\nAs the increase of large-scale and complex Web services, not only the development of Web applications is required, but also the implementation of Web server extensions in many cases. Most Web server extensions are mainly implemented in the C language because of fast and memory-efficient behavior, but by writing extensions using a scripting language we can achieve better maintainability and productivity. \n\nHowever, if the existing methods are primarily intended to enhance not the implementation of Web applications but the implementation of internal processing of the Web server, the problem remains in terms of speed, memory-efficiency and safety.\n\nTherefore, we propose a fast and memory-efficient Web server extension mechanism using a scripting language. We designed an architecture where the server process creates a region in memory to save the state of the interpreter at the server process startup, and multiple scripts share this region to process the scripts quickly when new request are made.\n\nThe server process frees the global variables table, the exception flag and the byte-code which cause an increase of memory usage, in order to reduce the memory usage and extend safety by preventing interference between each script because of sharing the region. We implemented a mechanism that can extend the internal processing of nginx easily by Ruby scripts using nginx and the embeddable scripting language mruby. It's called \"ngx_mruby\".\n\n# Contributions\n\nThis project exists thanks to all the people who contribute. We also welcome financial contributions in full transparency on our [open collective](https://opencollective.com/ngx_mruby).\n\n## Backers\n\nThank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/ngx_mruby#backer)]\n\n\u003ca href=\"https://opencollective.com/ngx_mruby#backers\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/ngx_mruby/backers.svg?width=890\"\u003e\u003c/a\u003e\n\n\n## Sponsors\n\nSupport this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/ngx_mruby#sponsor)]\n\n# License\n\nThis project is under the MIT License:\n\n* http://www.opensource.org/licenses/mit-license.php\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatsumotory%2Fngx_mruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatsumotory%2Fngx_mruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatsumotory%2Fngx_mruby/lists"}