{"id":16177583,"url":"https://github.com/raphaelm/defusedcsv","last_synced_at":"2026-02-28T12:09:52.302Z","repository":{"id":23670960,"uuid":"99561233","full_name":"raphaelm/defusedcsv","owner":"raphaelm","description":"Python library to protect your users from Excel injections in CSV-format exports, drop-in replacement for standard library's csv module","archived":false,"fork":false,"pushed_at":"2025-09-03T14:57:37.000Z","size":36,"stargazers_count":26,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-14T22:34:09.501Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/raphaelm.png","metadata":{"files":{"readme":"README.rst","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,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-07T09:31:36.000Z","updated_at":"2026-01-31T19:45:01.000Z","dependencies_parsed_at":"2024-06-19T17:54:00.955Z","dependency_job_id":null,"html_url":"https://github.com/raphaelm/defusedcsv","commit_stats":{"total_commits":22,"total_committers":2,"mean_commits":11.0,"dds":"0.13636363636363635","last_synced_commit":"8fd99cda3777cab8cbccd5efe607c882d1bd89fc"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/raphaelm/defusedcsv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphaelm%2Fdefusedcsv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphaelm%2Fdefusedcsv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphaelm%2Fdefusedcsv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphaelm%2Fdefusedcsv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raphaelm","download_url":"https://codeload.github.com/raphaelm/defusedcsv/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphaelm%2Fdefusedcsv/sbom","scorecard":{"id":761904,"data":{"date":"2025-08-11","repo":{"name":"github.com/raphaelm/defusedcsv","commit":"2d2d7fb5aadb2841e7c85dca1b92769eff3a10c9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"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":"Maintained","score":1,"reason":"1 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/style.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/raphaelm/defusedcsv/style.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/style.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/raphaelm/defusedcsv/style.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/style.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/raphaelm/defusedcsv/style.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/style.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/raphaelm/defusedcsv/style.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/raphaelm/defusedcsv/tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/raphaelm/defusedcsv/tests.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/style.yml:21","Warn: pipCommand not pinned by hash: .github/workflows/style.yml:34","Warn: pipCommand not pinned by hash: .github/workflows/tests.yml:24","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 pipCommand dependencies pinned"],"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":"Code-Review","score":1,"reason":"Found 4/25 approved changesets -- score normalized to 1","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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/style.yml:1","Warn: no topLevel permission defined: .github/workflows/tests.yml:1","Info: no jobLevel write permissions found"],"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: 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":"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":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2022-238 / GHSA-h3qr-fjhm-jphw"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 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-22T23:41:53.439Z","repository_id":23670960,"created_at":"2025-08-22T23:41:53.439Z","updated_at":"2025-08-22T23:41:53.439Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29933072,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T09:58:13.507Z","status":"ssl_error","status_checked_at":"2026-02-28T09:57:57.047Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-10-10T05:09:36.053Z","updated_at":"2026-02-28T12:09:52.296Z","avatar_url":"https://github.com/raphaelm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"defusedcsv\n==========\n\n.. image:: https://img.shields.io/pypi/v/defusedcsv.svg\n   :target: https://pypi.python.org/pypi/defusedcsv\n\n.. image:: https://travis-ci.org/raphaelm/defusedcsv.svg?branch=master\n   :target: https://travis-ci.org/raphaelm/defusedcsv\n\n.. image:: https://codecov.io/gh/raphaelm/defusedcsv/branch/master/graph/badge.svg\n   :target: https://codecov.io/gh/raphaelm/defusedcsv\n\nIf your Python application offers CSV export of user-generated data, that user-generated data might contain malicious\npayloads that might trigger vulnerabilities in the spreadsheet software of the user that downloads the file (i.e. MS\nExcel or LibreOffice).\n\nThis library tries to mitigate that by prepending all cells starting with ``@``, ``+``,\n``-``, ``=``, ``|`` or ``%`` with an apostrophe ``'`` and additionally replacing all\n``|`` characters in these cells with ``\\|``. This will of course change the resulting\nCSV files, but Excel will not display the ``'`` character to the user.\n\nTested with Python 3.9 to 3.13.\n\nUsage\n-----\n\nThis library acts as a drop-in replacement for the standard library's ``csv`` module. You can use it by just replacing\n``import csv`` with ``from defusedcsv import csv`` in your code.\n\nUseful Links\n------------\n\n* `CSV Injection Software Attack | OWASP Foundation \u003chttps://owasp.org/www-community/attacks/CSV_Injection\u003e`_\n* `Comma Separated Vulnerabilities | Context Information Security \u003chttps://web.archive.org/web/20220516052229/https://www.contextis.com/us/blog/comma-separated-vulnerabilities\u003e`_\n* `CSV Injection Mitigations \u0026 Dangers | ZeroSec - Adventures In Information Security \u003chttps://blog.zsec.uk/csv-dangers-mitigations/\u003e`_\n\nLicense\n-------\nThe code in this repository is published under the terms of the Apache License.\nSee the LICENSE file for the complete license text.\n\nThis project is maintained by Raphael Michel \u003cmail@raphaelmichel.de\u003e. See the\nAUTHORS file for a list of all the awesome folks who contributed to this project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraphaelm%2Fdefusedcsv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraphaelm%2Fdefusedcsv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraphaelm%2Fdefusedcsv/lists"}