{"id":28349630,"url":"https://github.com/websockets/bufferutil","last_synced_at":"2025-10-18T01:02:58.182Z","repository":{"id":26559998,"uuid":"30013915","full_name":"websockets/bufferutil","owner":"websockets","description":"WebSocket buffer utils","archived":false,"fork":false,"pushed_at":"2025-09-09T09:08:37.000Z","size":92,"stargazers_count":162,"open_issues_count":1,"forks_count":44,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-10-17T19:59:55.543Z","etag":null,"topics":["mask","utilities","websocket"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"Iwouldliketobeapig/css-properties-sorting","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/websockets.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2015-01-29T09:49:40.000Z","updated_at":"2025-09-19T08:36:16.000Z","dependencies_parsed_at":"2023-10-16T06:45:34.543Z","dependency_job_id":"5abadcdd-ddb3-4144-8431-adf9e208957d","html_url":"https://github.com/websockets/bufferutil","commit_stats":{"total_commits":187,"total_committers":12,"mean_commits":"15.583333333333334","dds":0.3850267379679144,"last_synced_commit":"c9428e6ca86a782978a660a81d5c664a1482fb60"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/websockets/bufferutil","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/websockets%2Fbufferutil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/websockets%2Fbufferutil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/websockets%2Fbufferutil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/websockets%2Fbufferutil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/websockets","download_url":"https://codeload.github.com/websockets/bufferutil/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/websockets%2Fbufferutil/sbom","scorecard":{"id":1238722,"data":{"date":"2025-08-25","repo":{"name":"github.com/websockets/bufferutil","commit":"bce9eb751360682efc1963802d372f07d32360e5"},"scorecard":{"version":"v5.2.1-41-g40576783","commit":"40576783fda6698350fcbbeaea760ff827433034"},"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#maintained"}},{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#packaging"}},{"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/ci.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/websockets/bufferutil/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/websockets/bufferutil/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:58: update your workflow using https://app.stepsecurity.io/secureworkflow/websockets/bufferutil/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:59: update your workflow using https://app.stepsecurity.io/secureworkflow/websockets/bufferutil/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:68: update your workflow using https://app.stepsecurity.io/secureworkflow/websockets/bufferutil/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:79: update your workflow using https://app.stepsecurity.io/secureworkflow/websockets/bufferutil/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:80: update your workflow using https://app.stepsecurity.io/secureworkflow/websockets/bufferutil/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:98: update your workflow using https://app.stepsecurity.io/secureworkflow/websockets/bufferutil/ci.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:38","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:64","Info:   0 out of   7 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   2 npmCommand 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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#sast"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#code-review"}},{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#binary-artifacts"}},{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":10,"reason":"GitHub workflow tokens follow principle of least privilege","details":["Warn: jobLevel 'contents' permission set to 'write': .github/workflows/ci.yml:76","Info: found token with 'none' permissions: .github/workflows/ci.yml:1"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#token-permissions"}},{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#vulnerabilities"}},{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#dangerous-workflow"}},{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#security-policy"}},{"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/40576783fda6698350fcbbeaea760ff827433034/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: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#license"}},{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v4.0.9 not signed: https://api.github.com/repos/websockets/bufferutil/releases/192492274","Warn: release artifact v4.0.8 not signed: https://api.github.com/repos/websockets/bufferutil/releases/125133008","Warn: release artifact v4.0.7 not signed: https://api.github.com/repos/websockets/bufferutil/releases/80210161","Warn: release artifact v4.0.6 not signed: https://api.github.com/repos/websockets/bufferutil/releases/56267093","Warn: release artifact v4.0.5 not signed: https://api.github.com/repos/websockets/bufferutil/releases/51301933","Warn: release artifact v4.0.9 does not have provenance: https://api.github.com/repos/websockets/bufferutil/releases/192492274","Warn: release artifact v4.0.8 does not have provenance: https://api.github.com/repos/websockets/bufferutil/releases/125133008","Warn: release artifact v4.0.7 does not have provenance: https://api.github.com/repos/websockets/bufferutil/releases/80210161","Warn: release artifact v4.0.6 does not have provenance: https://api.github.com/repos/websockets/bufferutil/releases/56267093","Warn: release artifact v4.0.5 does not have provenance: https://api.github.com/repos/websockets/bufferutil/releases/51301933"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#signed-releases"}}]},"last_synced_at":"2025-10-10T14:19:23.532Z","repository_id":26559998,"created_at":"2025-10-10T14:19:23.541Z","updated_at":"2025-10-10T14:19:23.541Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279413919,"owners_count":26165738,"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-17T02:00:07.504Z","response_time":56,"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":["mask","utilities","websocket"],"created_at":"2025-05-27T20:10:09.181Z","updated_at":"2025-10-18T01:02:58.177Z","avatar_url":"https://github.com/websockets.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# bufferutil\n\n[![Version npm](https://img.shields.io/npm/v/bufferutil.svg?logo=npm)](https://www.npmjs.com/package/bufferutil)\n[![Linux/macOS/Windows Build](https://img.shields.io/github/actions/workflow/status/websockets/bufferutil/ci.yml?branch=master\u0026label=build\u0026logo=github)](https://github.com/websockets/bufferutil/actions?query=workflow%3ACI+branch%3Amaster)\n\n`bufferutil` is what makes `ws` fast. It provides some utilities to efficiently\nperform some operations such as masking and unmasking the data payload of\nWebSocket frames.\n\n## Installation\n\n```\nnpm install bufferutil --save-optional\n```\n\nThe `--save-optional` flag tells npm to save the package in your package.json\nunder the\n[`optionalDependencies`](https://docs.npmjs.com/files/package.json#optionaldependencies)\nkey.\n\n## API\n\nThe module exports two functions. To maximize performance, parameters are not\nvalidated. It is the caller's responsibility to ensure that they are correct.\n\n### `bufferUtil.mask(source, mask, output, offset, length)`\n\nMasks a buffer using the given masking-key as specified by the WebSocket\nprotocol.\n\n#### Arguments\n\n- `source` - The buffer to mask.\n- `mask` - A buffer representing the masking-key.\n- `output` - The buffer where to store the result.\n- `offset` - The offset at which to start writing.\n- `length` - The number of bytes to mask.\n\n#### Example\n\n```js\n'use strict';\n\nconst bufferUtil = require('bufferutil');\nconst crypto = require('crypto');\n\nconst source = crypto.randomBytes(10);\nconst mask = crypto.randomBytes(4);\n\nbufferUtil.mask(source, mask, source, 0, source.length);\n```\n\n### `bufferUtil.unmask(buffer, mask)`\n\nUnmasks a buffer using the given masking-key as specified by the WebSocket\nprotocol.\n\n#### Arguments\n\n- `buffer` - The buffer to unmask.\n- `mask` - A buffer representing the masking-key.\n\n#### Example\n\n```js\n'use strict';\n\nconst bufferUtil = require('bufferutil');\nconst crypto = require('crypto');\n\nconst buffer = crypto.randomBytes(10);\nconst mask = crypto.randomBytes(4);\n\nbufferUtil.unmask(buffer, mask);\n```\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebsockets%2Fbufferutil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebsockets%2Fbufferutil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebsockets%2Fbufferutil/lists"}