Ecosyste.ms: Funds
An open API service for providing issue and pull request metadata for open source projects.
https://github.com/microcosm-cc/bluemonday
allowlist go golang html owasp sanitization security xss
Last synced: about 1 hour ago
Repository metadata:
bluemonday: a fast golang HTML sanitizer (inspired by the OWASP Java HTML Sanitizer) to scrub user generated content of XSS
- Host: GitHub
- URL: https://github.com/microcosm-cc/bluemonday
- Owner: microcosm-cc
- License: bsd-3-clause
- Created: 2013-11-20T22:15:49.000Z (almost 11 years ago)
- Default Branch: main
- Last Pushed: 2024-07-04T15:03:44.000Z (4 months ago)
- Last Synced: 2024-10-25T04:50:36.881Z (16 days ago)
- Topics: allowlist, go, golang, html, owasp, sanitization, security, xss
- Language: Go
- Homepage: https://github.com/microcosm-cc/bluemonday
- Size: 618 KB
- Stars: 3,188
- Watchers: 37
- Forks: 175
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Security: SECURITY.md
Owner metadata:
- Name: Microcosm
- Login: microcosm-cc
- Email:
- Kind: organization
- Description: bluemonday is the Go HTML sanitizer, microcosm is the home of bluemonday. the profile pic was generated from the prompt "HTML sanitizer"
- Website:
- Location: London, UK
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/718906?v=4
- Repositories: 28
- Last Synced at: 2024-03-26T20:24:36.051Z
- Profile URL: https://github.com/microcosm-cc
- Sponsor URL:
Committers metadata
Last synced: about 4 hours ago
Total Commits: 285
Total Committers: 40
Avg Commits per committer: 7.125
Development Distribution Score (DDS): 0.705
Commits in past year: 12
Committers in past year: 4
Avg Commits per committer in past year: 3.0
Development Distribution Score (DDS) in past year: 0.25
Name | Commits | |
---|---|---|
David Kitchen | d****d@b****m | 84 |
David Kitchen | d****n@c****m | 38 |
David Kitchen | d****d@m****c | 29 |
David Kitchen | g****b@d****n | 27 |
6543 | 6****3@o****e | 17 |
David Kitchen | d****n@g****m | 10 |
Filippo Valsorda | hi@f****o | 9 |
Mark Smith | m****k@a****k | 6 |
buddhamagnet | b****t@g****m | 6 |
KN4CK3R | a****n@o****e | 5 |
Dmitri Shuralyov | s****L@g****m | 5 |
K | z@k****i | 4 |
Paul Nicholls | p****n@l****m | 3 |
Lunny Xiao | x****n@g****m | 3 |
Cody Lee | c****e@d****m | 3 |
CMogilko | m****o@c****u | 3 |
Andrew Thornton | a****7@c****t | 3 |
dependabot[bot] | 4****] | 3 |
Andy Hochhaus | a****s@s****m | 2 |
Martin Tournoij | m****n@a****t | 2 |
Steven gutzwiller | s****r@s****m | 2 |
Yewolf | y****f@g****m | 2 |
opennota | o****a@g****m | 2 |
Aidan Fewster | f****a@g****m | 1 |
StevenGutzwiller | S****r | 1 |
Sana | b****a | 1 |
Carlos Alexandro Becker | c****0 | 1 |
EmmanuelMeinen | E****n@t****m | 1 |
Gusted | w****7@h****m | 1 |
John Graham-Cumming | j****c@c****m | 1 |
and 10 more... |
Issue and Pull Request metadata
Last synced: about 1 hour ago
Package metadata
- Total packages: 2
- Total downloads: unknown
- Total docker downloads: 1,227,353,752
- Total dependent packages: 3,600 (may contain duplicates)
- Total dependent repositories: 15,065 (may contain duplicates)
- Total versions: 56
- Total advisories: 2
go: github.com/microcosm-cc/bluemonday
Package bluemonday provides a way of describing an allowlist of HTML elements and attributes as a policy, and for that policy to be applied to untrusted strings from users that may contain markup. All elements and attributes not on the allowlist will be stripped. The default bluemonday.UGCPolicy().Sanitize() turns this: Into the more harmless: And it turns this: Into this: Whilst still allowing this: To pass through mostly unaltered (it gained a rel="nofollow"): The primary purpose of bluemonday is to take potentially unsafe user generated content (from things like Markdown, HTML WYSIWYG tools, etc) and make it safe for you to put on your website. It protects sites against XSS (http://en.wikipedia.org/wiki/Cross-site_scripting) and other malicious content that a user interface may deliver. There are many vectors for an XSS attack (https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet) and the safest thing to do is to sanitize user input against a known safe list of HTML elements and attributes. Note: You should always run bluemonday after any other processing. If you use blackfriday (https://github.com/russross/blackfriday) or Pandoc (http://johnmacfarlane.net/pandoc/) then bluemonday should be run after these steps. This ensures that no insecure HTML is introduced later in your process. bluemonday is heavily inspired by both the OWASP Java HTML Sanitizer (https://code.google.com/p/owasp-java-html-sanitizer/) and the HTML Purifier (http://htmlpurifier.org/). We ship two default policies, one is bluemonday.StrictPolicy() and can be thought of as equivalent to stripping all HTML elements and their attributes as it has nothing on its allowlist. The other is bluemonday.UGCPolicy() and allows a broad selection of HTML elements and attributes that are safe for user generated content. Note that this policy does not allow iframes, object, embed, styles, script, etc. The essence of building a policy is to determine which HTML elements and attributes are considered safe for your scenario. OWASP provide an XSS prevention cheat sheet ( https://www.google.com/search?q=xss+prevention+cheat+sheet ) to help explain the risks, but essentially:
- Homepage: https://github.com/microcosm-cc/bluemonday
- Documentation: https://pkg.go.dev/github.com/microcosm-cc/bluemonday#section-documentation
- Licenses: BSD-3-Clause
- Latest release: v1.0.26 (published about 1 year ago)
- Last Synced: 2024-11-09T00:05:54.691Z (1 day ago)
- Versions: 28
- Dependent Packages: 3,600
- Dependent Repositories: 15,065
- Docker Downloads: 1,227,353,752
-
Rankings:
- Dependent packages count: 0.059%
- Dependent repos count: 0.061%
- Docker downloads count: 0.118%
- Average: 0.732%
- Stargazers count: 1.3%
- Forks count: 2.122%
- Advisories:
go: github.com/Microcosm-cc/bluemonday
Package bluemonday provides a way of describing a whitelist of HTML elements and attributes as a policy, and for that policy to be applied to untrusted strings from users that may contain markup. All elements and attributes not on the whitelist will be stripped. The default bluemonday.UGCPolicy().Sanitize() turns this: Into the more harmless: And it turns this: Into this: Whilst still allowing this: To pass through mostly unaltered (it gained a rel="nofollow"): The primary purpose of bluemonday is to take potentially unsafe user generated content (from things like Markdown, HTML WYSIWYG tools, etc) and make it safe for you to put on your website. It protects sites against XSS (http://en.wikipedia.org/wiki/Cross-site_scripting) and other malicious content that a user interface may deliver. There are many vectors for an XSS attack (https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet) and the safest thing to do is to sanitize user input against a known safe list of HTML elements and attributes. Note: You should always run bluemonday after any other processing. If you use blackfriday (https://github.com/russross/blackfriday) or Pandoc (http://johnmacfarlane.net/pandoc/) then bluemonday should be run after these steps. This ensures that no insecure HTML is introduced later in your process. bluemonday is heavily inspired by both the OWASP Java HTML Sanitizer (https://code.google.com/p/owasp-java-html-sanitizer/) and the HTML Purifier (http://htmlpurifier.org/). We ship two default policies, one is bluemonday.StrictPolicy() and can be thought of as equivalent to stripping all HTML elements and their attributes as it has nothing on its whitelist. The other is bluemonday.UGCPolicy() and allows a broad selection of HTML elements and attributes that are safe for user generated content. Note that this policy does not whitelist iframes, object, embed, styles, script, etc. The essence of building a policy is to determine which HTML elements and attributes are considered safe for your scenario. OWASP provide an XSS prevention cheat sheet ( https://www.google.com/search?q=xss+prevention+cheat+sheet ) to help explain the risks, but essentially:
- Homepage: https://github.com/Microcosm-cc/bluemonday
- Documentation: https://pkg.go.dev/github.com/Microcosm-cc/bluemonday#section-documentation
- Licenses: BSD-3-Clause
- Latest release: v1.0.26 (published about 1 year ago)
- Last Synced: 2024-11-09T00:05:53.733Z (1 day ago)
- Versions: 28
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent packages count: 7.486%
- Average: 7.964%
- Dependent repos count: 8.442%
Dependencies
- github.com/aymerick/douceur v0.2.0
- github.com/gorilla/css v1.0.0
- golang.org/x/net v0.0.0-20210614182718-04defd469f4e
- retract[v1.0.0, v1.0.18]
- github.com/aymerick/douceur v0.2.0
- github.com/gorilla/css v1.0.0
- golang.org/x/net v0.0.0-20210614182718-04defd469f4e
- actions/checkout v2 composite
- actions/setup-go v2 composite