{"id":13610224,"url":"https://github.com/pallets/markupsafe","last_synced_at":"2025-12-11T21:04:41.242Z","repository":{"id":952642,"uuid":"734244","full_name":"pallets/markupsafe","owner":"pallets","description":"Safely add untrusted strings to HTML/XML markup.","archived":false,"fork":false,"pushed_at":"2025-09-27T18:47:09.000Z","size":1033,"stargazers_count":680,"open_issues_count":4,"forks_count":171,"subscribers_count":27,"default_branch":"main","last_synced_at":"2025-12-05T22:32:59.219Z","etag":null,"topics":["html","html-escape","jinja","markupsafe","pallets","python","template-engine"],"latest_commit_sha":null,"homepage":"https://markupsafe.palletsprojects.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"jpmckinney/pupa-ruby","license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pallets.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":"LICENSE.txt","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"pallets","custom":"https://palletsprojects.com/donate","tidelift":"pypi/Flask","thanks_dev":"u/gh/pallets"}},"created_at":"2010-06-22T17:22:58.000Z","updated_at":"2025-12-05T13:48:03.000Z","dependencies_parsed_at":"2024-01-13T22:23:40.415Z","dependency_job_id":"e2ca7792-b412-4b1e-989b-d69c5ddff990","html_url":"https://github.com/pallets/markupsafe","commit_stats":{"total_commits":508,"total_committers":45,"mean_commits":11.28888888888889,"dds":0.545275590551181,"last_synced_commit":"620c06c919c1bd7bb1ce3dbee402e1c0c56e7ac3"},"previous_names":["mitsuhiko/markupsafe"],"tags_count":38,"template":false,"template_full_name":null,"purl":"pkg:github/pallets/markupsafe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pallets%2Fmarkupsafe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pallets%2Fmarkupsafe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pallets%2Fmarkupsafe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pallets%2Fmarkupsafe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pallets","download_url":"https://codeload.github.com/pallets/markupsafe/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pallets%2Fmarkupsafe/sbom","scorecard":{"id":650550,"data":{"date":"2025-08-11","repo":{"name":"github.com/pallets/markupsafe","commit":"1251593f6b0e3b45f2cc8aba662622bc22d6a5e2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":6.9,"checks":[{"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":"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":"Code-Review","score":0,"reason":"Found 2/21 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":"Maintained","score":10,"reason":"27 commit(s) and 7 issue activity found in the last 90 days -- score normalized to 10","details":null,"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":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: jobLevel 'contents' permission set to 'write': .github/workflows/publish.yaml:75","Warn: no topLevel permission defined: .github/workflows/pre-commit.yaml:1","Warn: no topLevel permission defined: .github/workflows/publish.yaml:1","Warn: no topLevel permission defined: .github/workflows/tests.yaml:1"],"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":"Pinned-Dependencies","score":9,"reason":"dependency not pinned by hash detected -- score normalized to 9","details":["Info: Possibly incomplete results: error parsing shell code: invalid parameter name: .github/workflows/tests.yaml:34","Warn: downloadThenRun not pinned by hash: .devcontainer/on-create-command.sh:7","Info:  15 out of  15 GitHub-owned GitHubAction dependencies pinned","Info:  10 out of  10 third-party GitHubAction dependencies pinned","Info:   0 out of   1 downloadThenRun 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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: BSD 3-Clause \"New\" or \"Revised\" License: LICENSE.txt: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":10,"reason":"project is fuzzed","details":["Info: OSSFuzz integration found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/publish.yaml:98"],"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":"Security-Policy","score":9,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/pallets/.github/SECURITY.md:1","Info: Found linked content: github.com/pallets/.github/SECURITY.md:1","Warn: One or no descriptive hints of disclosure, vulnerability, and/or timelines in security policy","Info: Found text in security policy: github.com/pallets/.github/SECURITY.md:1"],"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":3,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'main'","Info: 'force pushes' disabled on branch 'main'","Warn: 'branch protection settings apply to administrators' is disabled on branch 'main'","Warn: could not determine whether codeowners review is allowed","Warn: no status checks found to merge onto branch 'main'","Warn: PRs are not required to make changes on branch 'main'; or we don't have data to detect it.If you think it might be the latter, make sure to run Scorecard with a PAT or use Repo Rules (that are always public) instead of Branch Protection settings"],"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":"Signed-Releases","score":10,"reason":"5 out of the last 5 releases have a total of 5 signed artifacts.","details":["Info: provenance for release artifact: multiple.intoto.jsonl: https://github.com/pallets/markupsafe/releases/tag/3.0.2","Info: provenance for release artifact: multiple.intoto.jsonl: https://github.com/pallets/markupsafe/releases/tag/3.0.1","Info: provenance for release artifact: multiple.intoto.jsonl: https://github.com/pallets/markupsafe/releases/tag/3.0.0","Info: provenance for release artifact: multiple.intoto.jsonl: https://github.com/pallets/markupsafe/releases/tag/2.1.5","Info: provenance for release artifact: multiple.intoto.jsonl: https://github.com/pallets/markupsafe/releases/tag/2.1.4"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 18 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-21T13:24:40.894Z","repository_id":952642,"created_at":"2025-08-21T13:24:40.894Z","updated_at":"2025-08-21T13:24:40.894Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27531787,"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-12-05T02:00:07.920Z","response_time":54,"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":["html","html-escape","jinja","markupsafe","pallets","python","template-engine"],"created_at":"2024-08-01T19:01:42.615Z","updated_at":"2025-12-11T21:04:41.237Z","avatar_url":"https://github.com/pallets.png","language":"Python","readme":"\u003cdiv align=\"center\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/pallets/markupsafe/refs/heads/stable/docs/_static/markupsafe-name.svg\" alt=\"\" height=\"150\"\u003e\u003c/div\u003e\n\n# MarkupSafe\n\nMarkupSafe implements a text object that escapes characters so it is\nsafe to use in HTML and XML. Characters that have special meanings are\nreplaced so that they display as the actual characters. This mitigates\ninjection attacks, meaning untrusted user input can safely be displayed\non a page.\n\n\n## Examples\n\n```pycon\n\u003e\u003e\u003e from markupsafe import Markup, escape\n\n\u003e\u003e\u003e # escape replaces special characters and wraps in Markup\n\u003e\u003e\u003e escape(\"\u003cscript\u003ealert(document.cookie);\u003c/script\u003e\")\nMarkup('\u0026lt;script\u0026gt;alert(document.cookie);\u0026lt;/script\u0026gt;')\n\n\u003e\u003e\u003e # wrap in Markup to mark text \"safe\" and prevent escaping\n\u003e\u003e\u003e Markup(\"\u003cstrong\u003eHello\u003c/strong\u003e\")\nMarkup('\u003cstrong\u003ehello\u003c/strong\u003e')\n\n\u003e\u003e\u003e escape(Markup(\"\u003cstrong\u003eHello\u003c/strong\u003e\"))\nMarkup('\u003cstrong\u003ehello\u003c/strong\u003e')\n\n\u003e\u003e\u003e # Markup is a str subclass\n\u003e\u003e\u003e # methods and operators escape their arguments\n\u003e\u003e\u003e template = Markup(\"Hello \u003cem\u003e{name}\u003c/em\u003e\")\n\u003e\u003e\u003e template.format(name='\"World\"')\nMarkup('Hello \u003cem\u003e\u0026#34;World\u0026#34;\u003c/em\u003e')\n```\n\n## Donate\n\nThe Pallets organization develops and supports MarkupSafe and other\npopular packages. In order to grow the community of contributors and\nusers, and allow the maintainers to devote more time to the projects,\n[please donate today][].\n\n[please donate today]: https://palletsprojects.com/donate\n\n## Contributing\n\nSee our [detailed contributing documentation][contrib] for many ways to\ncontribute, including reporting issues, requesting features, asking or answering\nquestions, and making PRs.\n\n[contrib]: https://palletsprojects.com/contributing/\n","funding_links":["https://github.com/sponsors/pallets","https://palletsprojects.com/donate","https://tidelift.com/funding/github/pypi/Flask","https://thanks.dev/u/gh/pallets"],"categories":["HTML Manipulation","资源列表","HTML 处理","Python","HTML操作","HTML Processing","HTML Manipulation [🔝](#readme)","Awesome Python"],"sub_categories":["HTML 处理","HTML Manipulation"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpallets%2Fmarkupsafe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpallets%2Fmarkupsafe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpallets%2Fmarkupsafe/lists"}