{"id":23760670,"url":"https://github.com/esapi/node-esapi","last_synced_at":"2025-09-05T06:31:23.458Z","repository":{"id":13720000,"uuid":"16414139","full_name":"ESAPI/node-esapi","owner":"ESAPI","description":"A minimal port of the old, publicly archived \"owasp-esapi-js\" (Enterprise Security API for JavaScript) encoder.","archived":false,"fork":false,"pushed_at":"2022-08-10T18:26:56.000Z","size":40,"stargazers_count":139,"open_issues_count":4,"forks_count":27,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-08-18T16:58:28.045Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ESAPI.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}},"created_at":"2014-01-31T16:55:32.000Z","updated_at":"2025-07-13T01:55:18.000Z","dependencies_parsed_at":"2022-08-07T07:15:39.904Z","dependency_job_id":null,"html_url":"https://github.com/ESAPI/node-esapi","commit_stats":null,"previous_names":["deadalready/node-esapi"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ESAPI/node-esapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ESAPI%2Fnode-esapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ESAPI%2Fnode-esapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ESAPI%2Fnode-esapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ESAPI%2Fnode-esapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ESAPI","download_url":"https://codeload.github.com/ESAPI/node-esapi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ESAPI%2Fnode-esapi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273722689,"owners_count":25156300,"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-09-05T02:00:09.113Z","response_time":402,"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":[],"created_at":"2024-12-31T20:35:07.478Z","updated_at":"2025-09-05T06:31:22.869Z","avatar_url":"https://github.com/ESAPI.png","language":"JavaScript","readme":"[node-esapi](https://github.com/DeadAlready/node-esapi) is a minimal port of the ESAPI4JS (Enterprise Security API for JavaScript)\nencoder.\n\n# Installation\n\n    $ npm install node-esapi\n\n# Usage\n\n\tvar ESAPI = require('node-esapi');\n\tESAPI.encoder().encodeForHTML('\u003cp\u003eThis is a test\u003c/p\u003e');\n\n# Encoder Functions\n\nThe encoder() returns an object with the following main functions:\n\n+ encodeForHTML\n+ encodeForCSS\n+ encodeForJS = encodeForJavaScript = encodeForJavascript\n+ encodeForURL\n+ encodeForHTMLAttribute\n+ encodeForBase64\n\n# Middleware\n\nThe ESAPI has a function for creating express middleware to serve client side scripts of ESAPI.\n\n\tapp.use(ESAPI.middleware());\n\n\t// Now in your HTML you can do\n\t\u003cscript src=\"/esapi/esapi.js\"\u003e\u003c/script\u003e\n\t\u003cscript src=\"/esapi/resources/i18n/ESAPI_Standard_en_US.properties.js\"\u003e\u003c/script\u003e\n\t\u003cscript src=\"/esapi/resources/Base.esapi.properties.js\"\u003e\u003c/script\u003e\n\t\u003cscript\u003e\n\t\torg.owasp.esapi.ESAPI.initialize();\n\t\t//Here you have access to the $ESAPI object and can do\n\t\t$ESAPI.encoder().encodeForHTML('\u003cp\u003eThis is a test\u003c/p\u003e');\n\t\u003c/script\u003e\n\n# Licence\n\n## ESAPI Licence\n\nThe BSD License\n\nCopyright (c) 2007, The OWASP Foundation\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\nRedistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\nRedistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\nNeither the name of the OWASP Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n## node-esapi Licence\n\nThe MIT License (MIT)\n\nCopyright (c) 2014 Karl Düüna\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesapi%2Fnode-esapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fesapi%2Fnode-esapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesapi%2Fnode-esapi/lists"}