Skip to content

Commit 42d4f6b

Browse files
mientjanclaude
andcommitted
docs: add security policy, update changelog, fix license badge
- Add SECURITY.md with vulnerability reporting guidelines and security considerations for links, images, HTML, and plugins - Add 4.0.1 entry to CHANGELOG.md - Fix license badge to use static MIT badge instead of broken GitHub license detection Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 84d4e9f commit 42d4f6b

3 files changed

Lines changed: 49 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Changelog
22

3+
## 4.0.1
4+
5+
### Bug Fixes
6+
7+
- Resolved open issues and added missing render rules
8+
9+
### Documentation
10+
11+
- Moved v3 examples from `doc/example/` into `example/screens/` as v4 TypeScript function components
12+
- Added React Navigation with 5 interactive example screens (basic, file loading, custom styles, custom rules, custom renderer)
13+
- Created GitHub wiki with 8 documentation pages (Getting Started, Custom Styles, Custom Rules, Custom Renderer, Plugins, API Reference, Migration from v3)
14+
- Added npm/GitHub badges, package links, Examples section, and Documentation section to README
15+
- Removed outdated `doc/` directory
16+
317
## 4.0.0
418

519
### Breaking Changes

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![npm version](https://img.shields.io/npm/v/react-native-markdown-renderer.svg)](https://www.npmjs.com/package/react-native-markdown-renderer)
44
[![npm downloads](https://img.shields.io/npm/dm/react-native-markdown-renderer.svg)](https://www.npmjs.com/package/react-native-markdown-renderer)
5-
[![GitHub](https://img.shields.io/github/license/mientjan/react-native-markdown-renderer)](https://github.com/mientjan/react-native-markdown-renderer)
5+
[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/mientjan/react-native-markdown-renderer/blob/master/LICENSE)
66

77
A 100% CommonMark-compatible markdown renderer for React Native using native components (not WebView). All elements are rendered as native React Native components that can be overwritten when needed.
88

SECURITY.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
| Version | Supported |
6+
| ------- | ------------------ |
7+
| 4.0.x | :white_check_mark: |
8+
| < 4.0 | :x: |
9+
10+
## Reporting a Vulnerability
11+
12+
If you discover a security vulnerability in this project, please report it responsibly.
13+
14+
**Do not open a public GitHub issue for security vulnerabilities.**
15+
16+
Instead, please email the maintainer directly or use [GitHub's private vulnerability reporting](https://github.com/mientjan/react-native-markdown-renderer/security/advisories/new).
17+
18+
When reporting, please include:
19+
20+
- A description of the vulnerability
21+
- Steps to reproduce the issue
22+
- The potential impact
23+
- Any suggested fixes (if applicable)
24+
25+
You can expect an initial response within 72 hours. We will work with you to understand and address the issue before any public disclosure.
26+
27+
## Security Considerations
28+
29+
This library renders markdown as native React Native components. A few things to be aware of:
30+
31+
- **Links**: The default `link` render rule opens URLs via React Native's `Linking` API. If you render untrusted markdown, consider providing a custom `link` rule that validates or sanitizes URLs before opening them.
32+
- **Images**: The default `image` rule loads remote images via the `src` attribute. Consider validating image sources if rendering untrusted content.
33+
- **HTML**: The `html_block` and `html_inline` rules render raw HTML content as plain text, not as actual HTML. This is safe by default.
34+
- **Plugins**: Third-party markdown-it plugins may introduce additional attack surface. Vet plugins before use, especially with untrusted input.

0 commit comments

Comments
 (0)