ci: harden workflows, document audit hardening, and add security tests#3
Merged
TrentPierce merged 1 commit intomainfrom Feb 10, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
npm installand using consistentnpm ci --omit=optional --legacy-peer-depsflags.Description
.github/workflows/ci.yml,.github/workflows/ci-minimal.yml, and.github/workflows/diagnostic.ymlto usenpm ci --omit=optional --legacy-peer-depsand removed masking fallbacks to ensure lockfile consistency and deterministic installs.package.jsonto stop swallowing failures by makingtest,lint, andbuildscripts strict and added"*.js"intofilesto ensure root-level runtime modules are packaged.127.0.0.1) insrc/api/RestAPIServer.js, added URL validation/allowlist and private-host blocking insrc/tools/APITool.js, and strengthened path normalization, boundary checks, and symlink rejection insrc/tools/FileTool.js.tests/unit/api.rateLimit.test.js,tests/unit/tools/apiToolSecurity.test.js, andtests/unit/tools/fileToolSecurity.test.js, and adjusted the symlink test to skip on Windows to avoid CI permission flakiness, plus README and audit report updates documenting implemented items.Testing
node -csyntax checks on modified runtime and test files and they passed (src/api/RestAPIServer.js,src/tools/APITool.js,src/tools/FileTool.js,bin/koda.js, and new test filespassed).npm ci --omit=optional --legacy-peer-deps --dry-runwhich completed successfully to validate deterministic install behavior in CI context.npm pack --dry-runto validate package contents and confirm root-level runtime modules are included (success).npm test/ real Jest runs but they could not be executed in this environment due to registry / binary availability constraints, so unit tests are present but could not be run here (unable to execute in-runnerjest).Codex Task