{"id":34083455,"url":"https://github.com/flxn/django-csp-observer","last_synced_at":"2026-05-28T12:32:10.161Z","repository":{"id":57419605,"uuid":"266069361","full_name":"flxn/django-csp-observer","owner":"flxn","description":"CSP Observer is a Django app that detects and informs your website visitors about potential security issues in their browser.","archived":false,"fork":false,"pushed_at":"2020-08-27T15:09:06.000Z","size":401,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-16T15:22:09.139Z","etag":null,"topics":["browser","csp","django","privacy","security"],"latest_commit_sha":null,"homepage":"","language":"Python","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/flxn.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":"2020-05-22T09:18:19.000Z","updated_at":"2020-08-27T15:09:08.000Z","dependencies_parsed_at":"2022-09-13T07:51:33.371Z","dependency_job_id":null,"html_url":"https://github.com/flxn/django-csp-observer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/flxn/django-csp-observer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flxn%2Fdjango-csp-observer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flxn%2Fdjango-csp-observer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flxn%2Fdjango-csp-observer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flxn%2Fdjango-csp-observer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flxn","download_url":"https://codeload.github.com/flxn/django-csp-observer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flxn%2Fdjango-csp-observer/sbom","scorecard":{"id":404977,"data":{"date":"2025-08-11","repo":{"name":"github.com/flxn/django-csp-observer","commit":"a7848085c94c53c06b523096a384118a1deae3e3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"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":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT 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":"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":"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":"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"}}]},"last_synced_at":"2025-08-18T20:58:04.281Z","repository_id":57419605,"created_at":"2025-08-18T20:58:04.282Z","updated_at":"2025-08-18T20:58:04.282Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33609237,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"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":["browser","csp","django","privacy","security"],"created_at":"2025-12-14T12:44:28.611Z","updated_at":"2026-05-28T12:32:10.156Z","avatar_url":"https://github.com/flxn.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CSP Observer\n\n![CSP Observer Logo](csp_observer/static/csp_observer/img/cspo-logo-256px.png)\n\nCSP Observer is a Django app that monitors incoming Content Security Policy (CSP) reports for your site. It tries to detect security/privacy issues and notifies your visitors.\n\n## Installation\n1. Install CSP Observer from pypi: `pip install django-csp-observer`\n2. In `settings.py` add \"csp_observer\" to your `INSTALLED_APPS`:\n    ```\n    INSTALLED_APPS = [\n        ...\n        'csp_observer',\n    ]\n    ```\n3. Also in `settings.py` add the following entry to `MIDDLEWARE`:\n    ```\n    MIDDLEWARE = [\n        ...\n        'csp_observer.middleware.CspReportMiddleware',\n    ]\n    ```\n    Please make sure that it is the last entry in the middlewares, otherwise another installed middleware could interfere with the operation of CSP Observer.\n4. Include the url configuration in your `urls.py`:\n    ```\n    from django.urls import path, include\n    \n    urlpatterns = [\n        ...\n        path('csp/', include('csp_observer.urls')),\n    ]\n    ```\n    You can change this path but keep in mind, that this path determines the access URL to the admin dashboard. Example: If you change the path for CSP Observer to `path('cspobserver/', ...)`, the admin dashboard will now be accessible at `/cspobserver/admin`.\n5. Run ``python manage.py migrate`` to create the necessary database tables.\n6. The basic installation is finished! View the *Configuration* section for more information on how to configure the app.\n\n## Admin Interface\n\nA basic administration interface is available under */csp/admin*\n\n## Commands\n\nList of commands integrated into *manage.py*:\n\n| Command | Description |\n| ------- | ----------- |\n| `cleanunused` | Removes old sessions and reports from the database. Should be run regularly. |\n| `updaterules` | Updates the rules from the central rule repository. |\n\n## Configuration\n\nOverview of all available settings and their default values:\n\n| Setting | Default | Description |\n| ------- | ------- | ----------- |\n| REPORT_ONLY | ``True`` | Wether to enforce the CSP rules or only report them. |\n| ENABLED_PATHS | ``[\"/\"]`` | An array of paths for which the CSP header should be set. |\n| CSP_POLICIES | ``{'default-src': [\"'self'\"],'script-src': [\"'self'\", \"'unsafe-inline'\"],'connect-src': [\"'self'\"],}`` | A disctionary of CSP policies that should be applied. Key is the name of the directive and value is a list of expressions. |\n| USE_NEW_API | ``False`` | Whether to enable the new Reporting API or use the old report-uri directive |\n| USE_SCRIPT_NONCE | ``True`` | Add nonce to all script tags to catch inline script violations |\n| USE_STYLE_NONCE | ``True`` | Add nonce to all style tags to catch inline style violations |\n| SESSION_KEEP_DAYS | ``14`` | The number of days sessions should be kept in the database. |\n| IS_MASTER_COLLECTOR | ``False`` | Indicates if the instance should function as a central collector of CSP reports for multiple other instances. |\n| AUTHORIZED_REPORTERS | ``[]`` | A list of domains that are allowed send their CSP reports to the master. Example: ``['http://127.0.0.1:8000', 'https://example.com']`` |\n| REMOTE_SECRET | ``''`` | A shared secret that **must be the same** for the master collector and all reporters. |\n| REMOTE_REPORTING | ``False`` | Wether to use a central remote collector or not. |\n| REMOTE_CSP_OBSERVER_URL | ``''`` | The URL of the remote collector instance. Must be the path to the *csp_observer* app, as defined in *urls.py*. Example: ``http://example.com/csp`` |\n| CLIENTUI_VISIBILITY | ``always`` | Choose if the client popup should always be visible (``always``) or only if a problem has been detected (``minimized``) |\n| RULE_UPDATE_FILE | ``https://raw.githubusercontent.com/flxn/csp-observer-data/master/rules.json`` | The path to the file that contains the global rule database |\n| RULE_UPDATE_INTERVAL | ``21600`` | The minimum number of seconds before a new rule update is allowed |\n| VOLUNTARY_DATA_SHARING_URL | ``https://csp-observer-reports.flxn.de`` | The URL that the unknown report data of the data sharing is sent to. |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflxn%2Fdjango-csp-observer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflxn%2Fdjango-csp-observer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflxn%2Fdjango-csp-observer/lists"}