{"id":29438609,"url":"https://github.com/sigient/csp_builder","last_synced_at":"2026-06-19T06:32:27.501Z","repository":{"id":62556460,"uuid":"80081463","full_name":"Sigient/csp_builder","owner":"Sigient","description":"📃 Create rich Content Security Policies using this easy to use builder class","archived":false,"fork":false,"pushed_at":"2017-02-03T04:48:56.000Z","size":18,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-16T20:47:43.700Z","etag":null,"topics":["content-security-policy","rails","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/Sigient.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-26T03:05:56.000Z","updated_at":"2017-01-31T18:22:00.000Z","dependencies_parsed_at":"2022-11-03T06:15:24.300Z","dependency_job_id":null,"html_url":"https://github.com/Sigient/csp_builder","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Sigient/csp_builder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sigient%2Fcsp_builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sigient%2Fcsp_builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sigient%2Fcsp_builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sigient%2Fcsp_builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sigient","download_url":"https://codeload.github.com/Sigient/csp_builder/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sigient%2Fcsp_builder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274152395,"owners_count":25231290,"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-08T02:00:09.813Z","response_time":121,"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":["content-security-policy","rails","ruby"],"created_at":"2025-07-13T08:09:58.910Z","updated_at":"2025-11-11T18:28:20.816Z","avatar_url":"https://github.com/Sigient.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CspBuilder\n\n[![Travis Build Status](https://travis-ci.org/Sigient/csp_builder.svg)](https://travis-ci.org/Sigient/csp_builder)\n[![Gem Version](https://badge.fury.io/rb/csp_builder.svg)](https://badge.fury.io/rb/csp_builder)\n[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)\n\nContent Security Policy string builder. Create rich Content Security\nPolicies headers using this easy to use builder class.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'csp_builder'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install csp_builder\n\n## Usage\n\nHere is a quick example. Please see the\n[docs](http://www.rubydoc.info/github/Sigient/csp_builder) for more\ndetails!\n\n\n```ruby\ncsp = CspBuilder.new.\n  script_src(\"https://*.cloudfront.net\", :self).\n  style_src(\"https://*.cloudfront.net\").\n  img_src('*').\n  frame_ancestors(:self).\n  upgrade_insecure_requests\n\n# Get the compiled CSP string:\n# \"script-src https://*.cloudfront.net 'self'; style-src https://*.cloudfront.net; img-src *; frame-ancestors 'self'; upgrade-insecure-requests\"\ncsp.compile!\n```\n\nMore examples using middleware and controllers coming soon!\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies.\nThen, run `rake test` to run the tests. You can also run `bin/console`\nfor an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake\ninstall`. To release a new version, update the version number in\n`version.rb`, and then run `bundle exec rake release`, which will create\na git tag for the version, push git commits and tags, and push the\n`.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at\nhttps://github.com/Sigient/csp_builder. This project is intended\nto be a safe, welcoming space for collaboration, and contributors are\nexpected to adhere to the [Contributor\nCovenant](http://contributor-covenant.org) code of conduct.\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT\nLicense](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsigient%2Fcsp_builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsigient%2Fcsp_builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsigient%2Fcsp_builder/lists"}