Skip to content

refactor: run TypeScript validators on Node 26 - #74

Merged
davidmytton merged 1 commit into
mainfrom
codex/typescript-validation
Sep 9, 2026
Merged

davidmytton merged 1 commit into
mainfrom
codex/typescript-validation

Conversation

@davidmytton

Copy link
Copy Markdown
Contributor

Convert both validators to TypeScript and run them directly with Node 26, using native type stripping. Add strict type checking to CI with a pinned compiler and Node 26 types in the existing locked validation package.

Parsed JSON stays unknown until runtime checks narrow it. Preserve bot matching, schema validation, and formatting behavior, and update the tests and documented commands for the new filenames.

Convert the bot and JSON Schema validators to TypeScript and execute them directly with Node 26. Treat parsed JSON as unknown and narrow it through runtime checks.

Add strict type checking with a locked compiler and Node 26 types, and preserve check, generate, and schema-validation behavior with regression coverage.

Co-authored-by: Codex <codex@openai.com>
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​types/​node@​26.4.11001008196100
Addedtypescript@​7.0.29910089100100

View full report

@socket-security

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
License policy violation: npm @typescript/typescript-aix-ppc64 under MIT-Khronos-old

License: MIT-Khronos-old - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

From: tools/schema/package-lock.json → npm/typescript@7.0.2 → npm/@typescript/typescript-aix-ppc64@7.0.2

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@typescript/typescript-aix-ppc64@7.0.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: npm @typescript/typescript-darwin-arm64 under MIT-Khronos-old

License: MIT-Khronos-old - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

From: tools/schema/package-lock.json → npm/typescript@7.0.2 → npm/@typescript/typescript-darwin-arm64@7.0.2

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@typescript/typescript-darwin-arm64@7.0.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: npm @typescript/typescript-darwin-x64 under MIT-Khronos-old

License: MIT-Khronos-old - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

From: tools/schema/package-lock.json → npm/typescript@7.0.2 → npm/@typescript/typescript-darwin-x64@7.0.2

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@typescript/typescript-darwin-x64@7.0.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: npm @typescript/typescript-freebsd-arm64 under MIT-Khronos-old

License: MIT-Khronos-old - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

From: tools/schema/package-lock.json → npm/typescript@7.0.2 → npm/@typescript/typescript-freebsd-arm64@7.0.2

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@typescript/typescript-freebsd-arm64@7.0.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: npm @typescript/typescript-freebsd-x64 under MIT-Khronos-old

License: MIT-Khronos-old - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

From: tools/schema/package-lock.json → npm/typescript@7.0.2 → npm/@typescript/typescript-freebsd-x64@7.0.2

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@typescript/typescript-freebsd-x64@7.0.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: npm @typescript/typescript-linux-arm under MIT-Khronos-old

License: MIT-Khronos-old - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

From: tools/schema/package-lock.json → npm/typescript@7.0.2 → npm/@typescript/typescript-linux-arm@7.0.2

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@typescript/typescript-linux-arm@7.0.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: npm @typescript/typescript-linux-arm64 under MIT-Khronos-old

License: MIT-Khronos-old - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

From: tools/schema/package-lock.json → npm/typescript@7.0.2 → npm/@typescript/typescript-linux-arm64@7.0.2

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@typescript/typescript-linux-arm64@7.0.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: npm @typescript/typescript-linux-loong64 under MIT-Khronos-old

License: MIT-Khronos-old - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

From: tools/schema/package-lock.json → npm/typescript@7.0.2 → npm/@typescript/typescript-linux-loong64@7.0.2

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@typescript/typescript-linux-loong64@7.0.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: npm @typescript/typescript-linux-mips64el under MIT-Khronos-old

License: MIT-Khronos-old - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

From: tools/schema/package-lock.json → npm/typescript@7.0.2 → npm/@typescript/typescript-linux-mips64el@7.0.2

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@typescript/typescript-linux-mips64el@7.0.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: npm @typescript/typescript-linux-ppc64 under MIT-Khronos-old

License: MIT-Khronos-old - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

From: tools/schema/package-lock.json → npm/typescript@7.0.2 → npm/@typescript/typescript-linux-ppc64@7.0.2

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@typescript/typescript-linux-ppc64@7.0.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: npm @typescript/typescript-linux-riscv64 under MIT-Khronos-old

License: MIT-Khronos-old - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

From: tools/schema/package-lock.json → npm/typescript@7.0.2 → npm/@typescript/typescript-linux-riscv64@7.0.2

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@typescript/typescript-linux-riscv64@7.0.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: npm @typescript/typescript-linux-s390x under MIT-Khronos-old

License: MIT-Khronos-old - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

From: tools/schema/package-lock.json → npm/typescript@7.0.2 → npm/@typescript/typescript-linux-s390x@7.0.2

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@typescript/typescript-linux-s390x@7.0.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: npm @typescript/typescript-linux-x64 under MIT-Khronos-old

License: MIT-Khronos-old - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

From: tools/schema/package-lock.json → npm/typescript@7.0.2 → npm/@typescript/typescript-linux-x64@7.0.2

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@typescript/typescript-linux-x64@7.0.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: npm @typescript/typescript-netbsd-arm64 under MIT-Khronos-old

License: MIT-Khronos-old - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

From: tools/schema/package-lock.json → npm/typescript@7.0.2 → npm/@typescript/typescript-netbsd-arm64@7.0.2

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@typescript/typescript-netbsd-arm64@7.0.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: npm @typescript/typescript-netbsd-x64 under MIT-Khronos-old

License: MIT-Khronos-old - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

From: tools/schema/package-lock.json → npm/typescript@7.0.2 → npm/@typescript/typescript-netbsd-x64@7.0.2

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@typescript/typescript-netbsd-x64@7.0.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: npm @typescript/typescript-openbsd-arm64 under MIT-Khronos-old

License: MIT-Khronos-old - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

From: tools/schema/package-lock.json → npm/typescript@7.0.2 → npm/@typescript/typescript-openbsd-arm64@7.0.2

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@typescript/typescript-openbsd-arm64@7.0.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: npm @typescript/typescript-openbsd-x64 under MIT-Khronos-old

License: MIT-Khronos-old - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

From: tools/schema/package-lock.json → npm/typescript@7.0.2 → npm/@typescript/typescript-openbsd-x64@7.0.2

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@typescript/typescript-openbsd-x64@7.0.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: npm @typescript/typescript-sunos-x64 under MIT-Khronos-old

License: MIT-Khronos-old - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

From: tools/schema/package-lock.json → npm/typescript@7.0.2 → npm/@typescript/typescript-sunos-x64@7.0.2

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@typescript/typescript-sunos-x64@7.0.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: npm @typescript/typescript-win32-arm64 under MIT-Khronos-old

License: MIT-Khronos-old - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

From: tools/schema/package-lock.json → npm/typescript@7.0.2 → npm/@typescript/typescript-win32-arm64@7.0.2

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@typescript/typescript-win32-arm64@7.0.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: npm @typescript/typescript-win32-x64 under MIT-Khronos-old

License: MIT-Khronos-old - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

From: tools/schema/package-lock.json → npm/typescript@7.0.2 → npm/@typescript/typescript-win32-x64@7.0.2

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@typescript/typescript-win32-x64@7.0.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: npm typescript under MIT-Khronos-old

License: MIT-Khronos-old - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

License: CC-BY-4.0 - The applicable license policy does not permit this license (5) (package/NOTICE.txt)

From: tools/schema/package-lock.json → npm/typescript@7.0.2

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/typescript@7.0.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn Low
Publisher changed: npm @typescript/typescript-aix-ppc64 is now published by microsoft1es instead of typescript-deploys

New Author: microsoft1es

Previous Author: typescript-deploys

From: tools/schema/package-lock.json → npm/typescript@7.0.2 → npm/@typescript/typescript-aix-ppc64@7.0.2

ℹ Read more on: This package | This alert | What is new author?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Scrutinize new collaborator additions to packages because they now have the ability to publish code into your dependency tree. Packages should avoid frequent or unnecessary additions or changes to publishing rights.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@typescript/typescript-aix-ppc64@7.0.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn Low
Publisher changed: npm @typescript/typescript-darwin-arm64 is now published by microsoft1es instead of typescript-deploys

New Author: microsoft1es

Previous Author: typescript-deploys

From: tools/schema/package-lock.json → npm/typescript@7.0.2 → npm/@typescript/typescript-darwin-arm64@7.0.2

ℹ Read more on: This package | This alert | What is new author?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Scrutinize new collaborator additions to packages because they now have the ability to publish code into your dependency tree. Packages should avoid frequent or unnecessary additions or changes to publishing rights.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@typescript/typescript-darwin-arm64@7.0.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn Low
Publisher changed: npm @typescript/typescript-darwin-x64 is now published by microsoft1es instead of typescript-deploys

New Author: microsoft1es

Previous Author: typescript-deploys

From: tools/schema/package-lock.json → npm/typescript@7.0.2 → npm/@typescript/typescript-darwin-x64@7.0.2

ℹ Read more on: This package | This alert | What is new author?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Scrutinize new collaborator additions to packages because they now have the ability to publish code into your dependency tree. Packages should avoid frequent or unnecessary additions or changes to publishing rights.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@typescript/typescript-darwin-x64@7.0.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

See 18 more rows in the dashboard

View full report

@davidmytton
davidmytton marked this pull request as ready for review September 9, 2026 08:28
@davidmytton
davidmytton requested a review from a team as a code owner September 9, 2026 08:28

@arcjet-review arcjet-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arcjet Review — 🟡 Medium Risk

Decision: Checked

Rationale: This is a well-scoped refactor. It preserves observable behavior (same argv handling, same error messages modulo the validate.ts filename, same exit codes), and the runtime logic is unchanged apart from added isRecord/isArray guards that strengthen — not weaken — validation. Tests are added for the top-level validator that previously had none, and existing schema tests are updated for the new filename. CI, README, and AGENTS.md are updated coherently. Approving despite Medium risk because the change is mechanical, well-tested, and reversible; the dependency additions are dev-only and used strictly for tsc --noEmit.

Summary of Changes

Renames validate.js → validate.ts and tools/schema/validate.cjs → tools/schema/validate.ts, adds runtime type guards to keep parsed JSON unknown until narrowed, introduces a tsconfig.json + typecheck script pinned to TypeScript 7.0.2 / @types/node 26.4.1, bumps CI Node to 26 to leverage native TS type stripping, adds validate.test.cjs covering --check and --generate modes, and updates README/AGENTS.md commands.

Escalation Triggers

  • CI/CD Pipeline: .github/workflows/ci-validation.yml updated: Node version bumped 20 → 26, new typecheck step, new test file added to node --test, and validator invocation switched to .ts.
  • Dependency Changes: tools/schema/package.json adds typescript@7.0.2 and @types/node@26.4.1 devDependencies and sets "type": "module".

Review Focus Areas

Notes

PR size is well under the 500-line threshold. No security issues found by the security-review checklist: no auth surface, no injection surface (local file reads only), no secrets, no crypto. The added isRecord/isArray guards and keeping parsed JSON as unknown until narrowed are a modest security posture improvement over the original.

Path filtering: 1 file excluded by ignore paths. 10 of 11 files included in review.

The AI assessed this PR as approvable, but the trust level (1) does not allow auto-approval. A human reviewer must approve this PR.

Review: 7cbf0277 | Model: anthropic/claude-opus-4-7 | Powered by Arcjet Review

Comment thread validate.ts
const path = require("path");
import * as fs from "node:fs";
import * as path from "node:path";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With no root package.json and import.meta.dirname here, this file only runs when Node treats it as ESM (module-syntax detection or an explicit .mts/package type). Worth a comment or a minimal root package.json with "type": "module" to make the assumption explicit and future-proof against Node defaults changing.

"strict": true,
"noEmit": true,
"types": ["node"]
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

include reaches out of the package with ../../validate.ts. That works, but it means the tools/schema package is no longer self-contained: running typecheck from a fresh clone requires the parent file to exist at that exact path. Consider documenting this coupling in a short comment, or moving to a repo-root tsconfig.json that both files reference.

Comment thread validate.test.cjs
return {
file,
bots,
run: (mode) => spawnSync(process.execPath, [script, mode], {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spawnSync(process.execPath, [script, mode], ...) runs the .ts file directly, which only works on Node ≥ 22.6 (with flag) or the version where strip-types is default. Consider adding --experimental-strip-types to the argv so the tests are portable across the Node versions maintainers might have locally, or asserting the Node version at test start with a clearer error than the raw stderr.

Comment thread tools/schema/validate.ts
import { basename, resolve } from "node:path";
import { Ajv2020 } from "ajv/dist/2020.js";
import addFormats from "ajv-formats";
import schema from "../../well-known-bots.schema.json" with { type: "json" };

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since verbatimModuleSyntax and erasableSyntaxOnly are on, double-check that import schema from "...json" with { type: "json" } type-checks under TS 7 with resolveJsonModule: true — the with attribute syntax is still relatively new and some TS/Node combinations warn about it. Would be worth confirming npm run typecheck passes cleanly before merge.

Comment thread validate.ts
return Array.isArray(value);
}

function isRecord(value: unknown): value is Record<string, unknown> {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: validatePatterns is declared as an assertion function (asserts patterns is string[]), but callers pass item.pattern.accepted / item.pattern.forbidden which are typed as unknown at the call site — the assertion narrows the local parameter, not the property on item. That's fine for the current usage, but if you later want the narrowing to persist on item.pattern.accepted, you'd need to reassign or restructure. Worth a brief comment so a future reader doesn't assume the property is narrowed too.

@davidmytton

Copy link
Copy Markdown
Contributor Author

@SocketSecurity ignore-all

@davidmytton
davidmytton merged commit 7c7954c into main Sep 9, 2026
4 checks passed
@davidmytton
davidmytton deleted the codex/typescript-validation branch September 9, 2026 08:30
@arcjet-review arcjet-review Bot removed the needs review Awaiting human review label Sep 9, 2026
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