Skip to content

fix: security and reliability improvements#322

Open
ianhandy wants to merge 269 commits intoextrabacon:masterfrom
ianhandy:maintainer-improvements
Open

fix: security and reliability improvements#322
ianhandy wants to merge 269 commits intoextrabacon:masterfrom
ianhandy:maintainer-improvements

Conversation

@ianhandy
Copy link

Summary

I'm interested in helping maintain this project (ref #290). This PR demonstrates the kind of improvements I'd bring:

  • Fix runString() temp path bugtmpdir was used as a reference instead of tmpdir(), writing temp files to the wrong location (fixes the issue in Fix runString temp path to use tmpdir() and add regression test #320)
  • Fix command injection vulnerabilitycheckSyntaxFile, getVersion, and getVersionSync used exec() with string interpolation, which is unsafe. Replaced with execFile() which passes args as an array
  • Add temp file cleanuprunString() and checkSyntax() now clean up their temp .py files via .finally()
  • Modernize internals — replaced custom extend() helper with Object.assign, updated minimum Node.js from 0.10 to 16
  • Re-enable getVersion tests — these were disabled since getVersionSync test fails in appveyor #158 (AppVeyor-era). They pass on all platforms now
  • Add GitHub Actions CI — matrix testing across Node 18/20/22, Python 3.10/3.12, on Ubuntu/macOS/Windows

All 45 tests passing (43 existing + 2 re-enabled).

Test plan

  • All existing tests pass
  • getVersion/getVersionSync tests re-enabled and passing
  • Verified temp file cleanup works
  • TypeScript compiles cleanly

brucedjones and others added 30 commits January 26, 2018 11:13
use python3 binary on unix systems
Almenon and others added 28 commits February 10, 2023 21:11
No point in -u here because we are getting the print results at the end of the program
Removes [hawk](https://github.com/mozilla/hawk). It's no longer used after updating ancestor dependency [request-json](https://github.com/hackervents/request-json). These dependencies need to be updated together.


Removes `hawk`

Updates `request-json` from 0.6.3 to 0.6.5
- [Release notes](https://github.com/hackervents/request-json/releases)
- [Commits](https://github.com/hackervents/request-json/commits)

---
updated-dependencies:
- dependency-name: hawk
  dependency-type: indirect
- dependency-name: request-json
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
…yarn/hawk-and-request-json--removed

Bump hawk and request-json
already the default
…e-22-test

ci(appveyor): add Node.js 22 to test matrix
- Fix runString() using tmpdir reference instead of tmpdir() call (fixes extrabacon#320)
- Replace exec() with execFile() to prevent command injection in
  checkSyntaxFile, getVersion, and getVersionSync
- Add temp file cleanup in runString() and checkSyntax() via .finally()
- Replace custom extend() with Object.assign
- Re-enable getVersion/getVersionSync tests (were disabled since extrabacon#158)
- Add GitHub Actions CI matrix (Node 18/20/22, Python 3.10/3.12, 3 OSes)
- Update minimum Node.js engine from 0.10 to 16
@ianhandy ianhandy force-pushed the maintainer-improvements branch from f206f6c to 2feabe6 Compare March 16, 2026 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.