Skip to content

Commit f7dfeae

Browse files
redonkulusclaude
andauthored
docs: add SECURITY.md pointing to private vulnerability reporting (#237)
Researchers had no documented channel for reporting vulnerabilities, so reports arrived by personal email. Point them to GitHub's private vulnerability reporting (now enabled), list supported versions, and spell out the function-source threat model. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 4d36b82 commit f7dfeae

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

‎SECURITY.md‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
Security fixes are released for the latest major version only.
6+
7+
| Version | Supported |
8+
| ------- | --------- |
9+
| 7.x | Yes |
10+
| < 7.0 | No |
11+
12+
## Reporting a Vulnerability
13+
14+
Please **do not** report security vulnerabilities through public GitHub issues, pull requests, or discussions.
15+
16+
Instead, report them privately through GitHub's [private vulnerability reporting](https://github.com/yahoo/serialize-javascript/security/advisories/new). This opens a draft security advisory that only the maintainers can see, where we can discuss the issue with you, develop a fix, and coordinate disclosure.
17+
18+
Please include:
19+
20+
- The affected version(s)
21+
- A minimal reproduction (input, options, and the resulting output)
22+
- The context the output is used in (e.g. embedded in an HTML `<script>` element)
23+
- The impact you believe it has
24+
25+
We will acknowledge your report as soon as we can, keep you updated on progress, and credit you in the published advisory unless you prefer otherwise.
26+
27+
## Scope
28+
29+
`serialize-javascript` escapes its output so it can be safely embedded in an HTML `<script>` element (unless `options.unsafe` is set). Reports that untrusted **data** (strings, object keys, regexps, dates, etc.) can break out of that context are in scope.
30+
31+
Serializing a **function** emits its source text as code. If an attacker can control the source text of a function you serialize, they can already run code in your page, so that is not a vulnerability by itself. We still treat a function body that escapes the `<script>` element (for example, injecting HTML markup) as a defect and fix it, but it is considered low severity.

0 commit comments

Comments
 (0)