Skip to content

Commit de11b0f

Browse files
mschmickingclaude
andauthored
docs: add LICENSE and SECURITY.md (#6)
* docs: add LICENSE and SECURITY.md GitHub reported the licence as NOASSERTION/Other because its detector cannot parse LICENSE.md once the vendored Lua and LuaFileSystem notices are appended. Adding a plain LICENSE with only the canonical ISC text makes it detectable; LICENSE.md keeps the third-party notices and now points at it. package.json already declared ISC, so npm was never affected. SECURITY.md records what is and is not a vulnerability here, which matters more than usual for this package: embedding Lua hands scripts os.execute, io.open and LuaFileSystem, so running untrusted Lua is out of scope by construction rather than by oversight. Misuse of the low-level stack API is likewise documented rather than treated as a defect. Adds LICENSE to the files allowlist and to the release tarball guard. Verified the guard still passes: 67 files, SECURITY.md correctly not shipped. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs: credit Maurice Schmicking by name instead of the 0x7878 handle 0x7878 is the same person; using the legal name makes the copyright line meaningful to anyone reading it. Medaeus245 stays: that is a separate author whose 2017 copyright cannot be removed. Also splits the two holders onto their own lines, which is the conventional form for multiple copyright holders, and updates package.json to name Maurice as author with Medaeus245 as a contributor. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent f8ee2ae commit de11b0f

5 files changed

Lines changed: 82 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
}
8181
const files = entry.files.map(f => f.path);
8282
83-
const needed = ['index.js', 'binding.gyp', 'src/luastate.cc', 'src/nodelua.cc', 'src/utils.cc', 'vendor/lfs/lfs.c', 'README.md', 'LICENSE.md'];
83+
const needed = ['index.js', 'binding.gyp', 'src/luastate.cc', 'src/nodelua.cc', 'src/utils.cc', 'vendor/lfs/lfs.c', 'README.md', 'LICENSE', 'LICENSE.md'];
8484
const missing = needed.filter(n => !files.includes(n));
8585
if (missing.length) {
8686
console.error('missing from tarball:', missing.join(', '));

LICENSE

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
ISC License
2+
3+
Copyright (c) 2017, Medaeus245
4+
Copyright (c) 2023, Maurice Schmicking
5+
6+
Permission to use, copy, modify, and/or distribute this software for any
7+
purpose with or without fee is hereby granted, provided that the above
8+
copyright notice and this permission notice appear in all copies.
9+
10+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

LICENSE.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11

22
## License & Copyrights
33

4-
#### The ISC Licence (ISC) Copyright (c) 2017, Medaeus245, 0x7878
4+
This project is ISC licensed. The canonical licence text lives in [LICENSE](LICENSE);
5+
this file repeats it and adds the notices for the third-party sources compiled into
6+
the addon.
7+
8+
#### The ISC Licence (ISC)
9+
10+
Copyright (c) 2017, Medaeus245
11+
Copyright (c) 2023, Maurice Schmicking (previously credited as 0x7878)
512

613
Permission to use, copy, modify, and/or distribute this software for any
714
purpose with or without fee is hereby granted, provided that the above

SECURITY.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Security Policy
2+
3+
## Supported versions
4+
5+
| Version | Supported |
6+
| ------- | --------- |
7+
| 2.x | Yes |
8+
| 1.x | No |
9+
10+
1.x does not build on current Node.js and carries several memory-safety defects that
11+
2.0.0 fixed, including a fixed-size buffer that arbitrary-length Lua error messages
12+
were formatted into. Please upgrade rather than asking for a backport.
13+
14+
## Reporting a vulnerability
15+
16+
Please report privately through GitHub's
17+
[security advisory form](https://github.com/mschmicking/node-lua-runner/security/advisories/new)
18+
rather than opening a public issue.
19+
20+
Include what you need to reproduce it: the Lua and JavaScript involved, your platform
21+
and Node.js version, and what you observed.
22+
23+
If that form is not available to you, open an issue asking for a private channel —
24+
without the details — rather than posting them publicly.
25+
26+
You should get an acknowledgement within a week or so. This is a spare-time project,
27+
so please treat that as a good-faith aim and not a guarantee.
28+
29+
## Scope
30+
31+
This package embeds a Lua interpreter in your Node.js process, which shapes what
32+
counts as a vulnerability here.
33+
34+
**In scope** — anything in `src/` that lets *ordinary* use go wrong: memory
35+
corruption, use-after-free, or a process crash reachable from normal API calls or
36+
from Lua code with no unusual privileges.
37+
38+
**Not in scope:**
39+
40+
- **Running untrusted Lua.** This library gives Lua scripts the full standard
41+
library, including `os.execute`, `io.open` and `require`, plus LuaFileSystem. A Lua
42+
script can therefore run commands and read and write files with the privileges of
43+
your Node.js process. That is what embedding Lua means; it is not a defect in this
44+
package. Do not feed it code you would not run yourself.
45+
- **Misusing the low-level stack API.** This is a thin wrapper over the Lua C API and
46+
does not shield you from every misuse of it. Some operations on values of an
47+
unexpected type raise an *unprotected* Lua error, which aborts the process rather
48+
than throwing. `SetField` and `GetField` guard against this; other methods do not.
49+
A crash reached that way is documented behaviour, not a vulnerability.
50+
- **Findings in `vendor/`.** Lua 5.1.5 and LuaFileSystem are vendored verbatim and are
51+
not patched here. Report those upstream. If something in them is genuinely
52+
exploitable through this package's API, do report it here as well.

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
"name": "node-lua-runner",
33
"version": "2.0.0",
44
"description": "Embed Lua 5.1 in Node.js. Lua and LuaFileSystem are compiled into the addon, so there is nothing to install on the system.",
5-
"author": "medaeus245, 0x7878",
5+
"author": "Maurice Schmicking",
6+
"contributors": [
7+
"Medaeus245"
8+
],
69
"main": "index.js",
710
"keywords": [
811
"lua",
@@ -24,6 +27,7 @@
2427
"src/",
2528
"vendor/",
2629
"README.md",
30+
"LICENSE",
2731
"LICENSE.md"
2832
],
2933
"scripts": {

0 commit comments

Comments
 (0)