{"id":20686673,"url":"https://github.com/ericcornelissen/shescape","last_synced_at":"2026-01-25T14:05:59.790Z","repository":{"id":37528615,"uuid":"309486039","full_name":"ericcornelissen/shescape","owner":"ericcornelissen","description":"Simple shell escape library for JavaScript","archived":false,"fork":false,"pushed_at":"2025-04-22T10:20:26.000Z","size":4841,"stargazers_count":3,"open_issues_count":12,"forks_count":9,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-22T14:05:45.495Z","etag":null,"topics":["command-line","escape-library","security","shell","shell-injection","shell-scripting"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/ericcornelissen.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-11-02T20:23:47.000Z","updated_at":"2025-04-22T10:20:29.000Z","dependencies_parsed_at":"2023-09-27T12:18:58.255Z","dependency_job_id":"4df07ece-0d53-4e88-80f7-e7d0df5522b1","html_url":"https://github.com/ericcornelissen/shescape","commit_stats":{"total_commits":1303,"total_committers":8,"mean_commits":162.875,"dds":"0.44589409056024554","last_synced_commit":"66512271bf20287aa94173168efee0eb94a0f414"},"previous_names":[],"tags_count":49,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericcornelissen%2Fshescape","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericcornelissen%2Fshescape/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericcornelissen%2Fshescape/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericcornelissen%2Fshescape/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ericcornelissen","download_url":"https://codeload.github.com/ericcornelissen/shescape/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250255709,"owners_count":21400410,"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","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":["command-line","escape-library","security","shell","shell-injection","shell-scripting"],"created_at":"2024-11-16T22:36:22.912Z","updated_at":"2026-01-25T14:05:59.783Z","avatar_url":"https://github.com/ericcornelissen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- SPDX-License-Identifier: CC-BY-SA-4.0 --\u003e\n\n# Shescape\n\nA simple shell escape library for JavaScript. Use it to escape user-controlled\ninputs to shell commands to prevent [shell injection].\n\n**Quick links**:\n[npm][npm-url] |\n[Source code] |\n[License] |\n[Changelog] |\n[Security]\n\n[changelog]: ./CHANGELOG.md\n[license]: ./LICENSE\n[npm-url]: https://www.npmjs.com/package/shescape\n[shell injection]: ./docs/vocabulary.md#shell-injection\n[security]: ./SECURITY.md\n[source code]: https://github.com/ericcornelissen/shescape\n\n## Features\n\n- Advanced shell detection\n- Lightweight\n- Supports MacOS, Linux, and Windows\n- Prevents environment variable access\n\n### Shells\n\nThe following shells are officially supported and extensively tested. It is\nrecommended to only use shells found in this list.\n\n- **Unix**: [Bash], [BusyBox], [csh], [Dash], [Zsh]\n- **Windows**: [cmd.exe], [PowerShell]\n\nIf you want to use Shescape with another shell you can request it on GitHub by\nopening [an issue].\n\n[an issue]: https://github.com/ericcornelissen/shescape/issues\n[bash]: https://en.wikipedia.org/wiki/Bash_(Unix_shell) \"Bourne-Again Shell\"\n[busybox]: https://en.wikipedia.org/wiki/BusyBox \"BusyBox\"\n[cmd.exe]: https://en.wikipedia.org/wiki/Cmd.exe \"CMD.exe\"\n[csh]: https://en.wikipedia.org/wiki/C_shell \"C shell\"\n[dash]: https://en.wikipedia.org/wiki/Almquist_shell#Dash \"Debian Almquist Shell\"\n[powershell]: https://en.wikipedia.org/wiki/PowerShell \"PowerShell\"\n[zsh]: https://en.wikipedia.org/wiki/Z_shell \"Z shell\"\n\n## Usage\n\n### Install\n\n1. Install `shescape`:\n\n   ```shell\n   npm install shescape\n   ```\n\n2. Import `shescape`:\n\n   ```javascript\n   import { Shescape } from \"shescape\";\n   ```\n\n3. Initialize `Shescape`.\n\n   ```javascript\n   const shescape = new Shescape(/* Options */);\n   ```\n\n4. Use `shescape`.\n\n### Getting Started\n\n- Look at the [use cases] for Shescape.\n- Check the [recipes] for examples of how to use Shescape.\n- Read the [tips] for additional ways to protect against shell injection.\n- Having trouble? See the [troubleshooting] document for help.\n\n[troubleshooting]: docs/troubleshoot.md\n[recipes]: docs/recipes.md\n[tips]: docs/tips.md\n[use cases]: docs/use-cases.md\n\n### Migrating from v1\n\nView the [migration guidelines] for help.\n\n[migration guidelines]: docs/migration.md\n\n### API\n\nView the [API] documentation of Shescape.\n\n[api]: docs/api.md\n\n### Testing\n\nView the [testing] documentation for how to test code that uses Shescape.\n\n[testing]: docs/testing.md\n\n## License\n\nThe source code is licensed under the `MPL-2.0` license, see [LICENSE] for\nthe full license text. The documentation text is licensed under [CC BY-SA 4.0];\ncode snippets under the [MIT-0] license.\n\nSupporting code, such a scripts and tests, is generally licensed under the `MIT`\nor `MIT-0` license. Individual files may be licensed differently depending on\nthe intend or origin.\n\nThe license under which a given file is available can always be found in the\nfile's banner comment.\n\n[cc by-sa 4.0]: ./docs/LICENSE-CC-BY-SA-4.0\n[mit-0]: ./docs/LICENSE-MIT-0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericcornelissen%2Fshescape","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericcornelissen%2Fshescape","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericcornelissen%2Fshescape/lists"}