{"id":23070169,"url":"https://github.com/strojure/web-security","last_synced_at":"2025-08-27T17:23:10.688Z","repository":{"id":142483640,"uuid":"612561291","full_name":"strojure/web-security","owner":"strojure","description":"Decoupled web security implementations for Clojure.","archived":false,"fork":false,"pushed_at":"2023-03-28T15:33:27.000Z","size":54,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"default","last_synced_at":"2025-08-15T13:42:41.859Z","etag":null,"topics":["clojure","http","web-security"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/strojure.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-03-11T10:14:27.000Z","updated_at":"2024-09-17T22:04:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"f9e63ba1-de19-445a-88a2-f9005e44289e","html_url":"https://github.com/strojure/web-security","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/strojure/web-security","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strojure%2Fweb-security","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strojure%2Fweb-security/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strojure%2Fweb-security/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strojure%2Fweb-security/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/strojure","download_url":"https://codeload.github.com/strojure/web-security/tar.gz/refs/heads/default","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strojure%2Fweb-security/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272356668,"owners_count":24920357,"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-08-27T02:00:09.397Z","response_time":76,"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":["clojure","http","web-security"],"created_at":"2024-12-16T06:19:57.084Z","updated_at":"2025-08-27T17:23:10.674Z","avatar_url":"https://github.com/strojure.png","language":"Clojure","readme":"# web-security\n\nDecoupled web security implementations for Clojure.\n\n[![Clojars Project](https://img.shields.io/clojars/v/com.github.strojure/web-security.svg)](https://clojars.org/com.github.strojure/web-security)\n\n[![cljdoc badge](https://cljdoc.org/badge/com.github.strojure/web-security)](https://cljdoc.org/d/com.github.strojure/web-security)\n[![tests](https://github.com/strojure/web-security/actions/workflows/tests.yml/badge.svg)](https://github.com/strojure/web-security/actions/workflows/tests.yml)\n\n## Motivation\n\nProvide [web security] implementations decoupled from any of http abstractions\nlike ring, pedestal etc.\n\n[web security]: https://developer.mozilla.org/en-US/docs/Web/Security\n\n## API\n\n### Content Security Policy (CSP)\n\nFunctions implementing CSP:\n\n- [csp/header-name] returns normal or report-only name of the CSP header.\n- [csp/header-value-fn] builds function for CSP header value from policy map,\n  supports dynamic nonce substitution.\n- [csp/requires-nonce?] tests if result of the `header-value-fn` requires nonce\n  argument\n- [csp/find-directive] return policy directive value from the policy map\n- [csp/random-nonce-fn] returns function to generate nonce values to be used in\n  HTTP response.\n\n[csp/header-name]:\nhttps://cljdoc.org/d/com.github.strojure/web-security/CURRENT/api/strojure.web-security.csp#header-name\n\n[csp/header-value-fn]:\nhttps://cljdoc.org/d/com.github.strojure/web-security/CURRENT/api/strojure.web-security.csp#header-value-fn\n\n[csp/requires-nonce?]:\nhttps://cljdoc.org/d/com.github.strojure/web-security/CURRENT/api/strojure.web-security.csp#requires-nonce?\n\n[csp/find-directive]:\nhttps://cljdoc.org/d/com.github.strojure/web-security/CURRENT/api/strojure.web-security.csp#find-directive\n\n[csp/random-nonce-fn]:\nhttps://cljdoc.org/d/com.github.strojure/web-security/CURRENT/api/strojure.web-security.csp#random-nonce-fn\n\n### HSTS\n\nFunctions for the [Strict-Transport-Security] response header:\n\n- [hsts/header-value].\n\n[Strict-Transport-Security]:\nhttps://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security\n\n[hsts/header-value]:\nhttps://cljdoc.org/d/com.github.strojure/web-security/CURRENT/api/strojure.web-security.hsts\n\n### Referrer-Policy\n\nFunctions for the [Referrer-Policy] response header:\n\n- [referrer-policy/header-value].\n\n[Referrer-Policy]:\nhttps://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy\n\n[referrer-policy/header-value]:\nhttps://cljdoc.org/d/com.github.strojure/web-security/CURRENT/api/strojure.web-security.referrer-policy\n\n---\n\nAuthored by [Sergey Trofimov](https://github.com/serioga).\n\n[![license](https://img.shields.io/badge/license-The%20Unlicense-informational)](UNLICENSE)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstrojure%2Fweb-security","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstrojure%2Fweb-security","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstrojure%2Fweb-security/lists"}