{"id":33229342,"url":"https://github.com/PolymerLabs/crisper","last_synced_at":"2025-11-21T11:01:21.799Z","repository":{"id":30023558,"uuid":"33572435","full_name":"PolymerLabs/crisper","owner":"PolymerLabs","description":null,"archived":true,"fork":false,"pushed_at":"2017-08-01T21:57:14.000Z","size":48,"stargazers_count":106,"open_issues_count":21,"forks_count":22,"subscribers_count":40,"default_branch":"master","last_synced_at":"2025-09-02T04:13:19.370Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PolymerLabs.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":"2015-04-07T22:53:01.000Z","updated_at":"2023-09-04T02:04:51.000Z","dependencies_parsed_at":"2022-09-06T11:11:47.049Z","dependency_job_id":null,"html_url":"https://github.com/PolymerLabs/crisper","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/PolymerLabs/crisper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PolymerLabs%2Fcrisper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PolymerLabs%2Fcrisper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PolymerLabs%2Fcrisper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PolymerLabs%2Fcrisper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PolymerLabs","download_url":"https://codeload.github.com/PolymerLabs/crisper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PolymerLabs%2Fcrisper/sbom","scorecard":{"id":111326,"data":{"date":"2025-08-11","repo":{"name":"github.com/PolymerLabs/crisper","commit":"eab26dec74ab5ddfda96d846bab757138c76c42f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Code-Review","score":3,"reason":"Found 8/25 approved changesets -- score normalized to 3","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":"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":"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":"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":"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":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"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":"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: BSD 3-Clause \"New\" or \"Revised\" 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":"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 16 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-15T12:18:29.534Z","repository_id":30023558,"created_at":"2025-08-15T12:18:29.534Z","updated_at":"2025-08-15T12:18:29.534Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285603340,"owners_count":27200013,"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-11-21T02:00:06.175Z","response_time":61,"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":"2025-11-16T17:00:36.411Z","updated_at":"2025-11-21T11:01:21.794Z","avatar_url":"https://github.com/PolymerLabs.png","language":"JavaScript","funding_links":[],"categories":["Tools"],"sub_categories":[],"readme":"# Crisper\n\u003e Split inline scripts from an HTML file for CSP compliance\n\n## Usage\n\nCommand line usage:\n\n```\ncat index.html | crisper -h build.html -j build.js\ncrisper --source index.html --html build.html --js build.js\ncrisper --html build.html --js build.js index.html\n```\n\nThe output html file will load the output js file at the top of `\u003chead\u003e` with a `\u003cscript defer\u003e` element.\n\nOptional Flags:\n\n  - `--script-in-head=false`\n    - In the output HTML file, place the script at the end of `\u003cbody\u003e`\n    - **Note**: Only use this if you need `document.write` support.\n  - `--only-split`\n    - Do not write a `\u003cscript\u003e` tag in the output HTML\n      file.\n  - `--always-write-script`\n    - Always create a .js file, even without any `\u003cscript\u003e`\n      elements.\n  - `--csp-hashable-script-loader`\n    - Create a hashable script loader that supports hash-based CSP with strict-dynamic.\n    - A strict CSP could look like this:\n    ```\n    script-src 'strict-dynamic' 'sha256-mUZwR5zj1qMvnzisSvfmC8JczLB0BUKW0Ohr3euDoIA=';\n    object-src 'none';\n    base-uri 'self';\n    ```\n  - `-v` | `--version`\n    - Prints version number.\n\nLibrary usage:\n\n```js\nvar output = crisper({\n  source: 'source HTML string',\n  jsFileName: 'output js file name.js',\n  scriptInHead: true, //default true\n  onlySplit: false, // default false\n  alwaysWriteScript: false // default false\n});\nfs.writeFile(htmlOutputFileName, output.html, 'utf-8', ...);\nfs.writeFile(jsOutputFileName, output.js, 'utf-8', ...);\n```\n\n## Usage with Vulcanize\n\nWhen using [vulcanize](https://github.com/Polymer/vulcanize), crisper can handle\nthe html string output directly and write the CSP separated files on the command\nline\n\n```\nvulcanize index.html --inline-script | crisper --html build.html --js build.js\n```\n\nOr programmatically\n\n```js\nvulcanize.process('index.html', function(err, cb) {\n  if (err) {\n    return cb(err);\n  } else {\n    var out = crisper({\n      source: html,\n      jsFileName: 'name of js file.js',\n      scriptInHead: true, // default true\n      onlySplit: false, // default false\n      alwaysWriteScript: false //default false\n    })\n    cb(null, out.html, out.js);\n  }\n});\n```\n\n## Breaking Changes from 1.x\n- Deprecated `split` API was removed\n  - `require('crisper').split()`\n- Default value of `script-in-head` flag changed to true\n  - This improves load performance by parallelizing HTML and script parsing\n  - This will break `document.write` calls\n  - If you experience problems, you can use `--script-in-head=false` argument or\n      `scriptInHead: false` in library usage.\n\n## Build Tools\n\n- [gulp-crisper](https://npmjs.com/package/gulp-crisper)\n- [grunt-crisper](https://www.npmjs.com/package/grunt-crisper)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPolymerLabs%2Fcrisper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPolymerLabs%2Fcrisper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPolymerLabs%2Fcrisper/lists"}