Skip to content

security: mkdtempSync for mirror scratch + Dockerfile npm ci (v5.1.3) - #60

Merged
OmarRao merged 1 commit into
mainfrom
security/tempfile-mkdtemp-v5.1.3
Oct 8, 2026
Merged

OmarRao merged 1 commit into
mainfrom
security/tempfile-mkdtemp-v5.1.3

Conversation

@OmarRao

@OmarRao OmarRao commented Oct 8, 2026

Copy link
Copy Markdown
Owner

Clears the last open js/insecure-temporary-file CodeQL alert and one supply-chain nit.

  • js/insecure-temporary-file — mirrorJson() now creates an exclusively-owned scratch directory with fs.mkdtempSync() and writes inside it. A random filename alone didn't satisfy CWE-377 because a test caller passes os.tmpdir() into the function. Removed the now-unused crypto import.
  • Dockerfile — npm ci (lockfile integrity-hashed install) instead of npm install.

QA: 113 tests pass · lint clean · headers pass.

🤖 Addressed by Claude Code

…(v5.1.3)

- Resolve the remaining js/insecure-temporary-file alert: mirrorJson() creates
  an exclusively-owned temp dir via fs.mkdtempSync() and writes inside it
  (a random filename alone did not satisfy CWE-377 because a test caller passes
  os.tmpdir()). Drop the now-unused crypto import.
- Dockerfile: npm ci (lockfile integrity-hashed) instead of npm install.
@OmarRao
OmarRao merged commit cdd31e6 into main Oct 8, 2026
5 checks passed
@OmarRao
OmarRao deleted the security/tempfile-mkdtemp-v5.1.3 branch October 8, 2026 18:30
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.

1 participant