Skip to content

Conversation

@EliSchleifer
Copy link
Member

No description provided.

@TylerJang27
Copy link
Collaborator

Plz update the lint_driver and trunk.yaml node versions as well, i.e. https://github.com/search?q=repo%3Atrunk-io%2Fplugins%20node%40&type=code

@trunk-staging-io
Copy link

trunk-staging-io bot commented Jan 6, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

Failed Test Failure Summary Logs
Testing linter nancy test CUSTOM The linter 'nancy' failed due to an unauthorized error accessing OSS Index during the snapshot test. Logs ↗︎
Testing linter ansible-lint test FQCN The test failed because the actual output did not match the expected snapshot, indicating a change in the linter's reported issues or formatting. Logs ↗︎
Testing linter psscriptanalyzer test check_custom_settings The test expected an object with success true but received success false. Logs ↗︎
Testing linter osv-scanner test CUSTOM The osv-scanner tool crashed with exit code -9 during lockfile analysis. Logs ↗︎

... and 7 more

Flaky Test Failure Summary Logs
Testing tool ripgrep rg --version The test failed because the actual object did not match the expected object, indicating a mismatch in exit code and output details. Logs ↗︎
Testing tool paratest tool The test failed because the actual object did not match the expected object, indicating a mismatch in the data structure or content. Logs ↗︎

View Full Report ↗︎Docs

@trunk-staging-io
Copy link

Static BadgeStatic BadgeStatic BadgeStatic Badge

Flaky Test Failure Summary Logs
Test execution failure: could be caused by test hooks like 'afterAll'. The tests failed because the 'uv' command was not found, causing git hooks 'uv-check' and 'uv-lock' to block the commit. Logs ↗︎
Testing tool uv tool The test failed because the actual object did not match the expected object, indicating a version mismatch in the 'uv' tool. Logs ↗︎

View Full Report ↗︎Docs

@trunk-io
Copy link

trunk-io bot commented Jan 6, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

Failed Test Failure Summary Logs
Testing linter nancy test CUSTOM The linter 'nancy' exited with an error due to an unauthorized access issue to OSS Index, causing the snapshot test to fail. Logs ↗︎
Testing linter psscriptanalyzer test check_custom_settings The test failed because the received object did not match the expected object, indicating a mismatch in the success property value. Logs ↗︎
Testing formatter nixpkgs-fmt test test The test failed because the expected object did not match the received object, indicating a mismatch in the task failures details. Logs ↗︎
Testing formatter psscriptanalyzer test format The expected object did not match the received object, with 'success' property being false instead of true. Logs ↗︎

... and 7 more

Flaky Test Failure Summary Logs
Testing tool ripgrep rg --version The test failed because the actual object did not match the expected object, indicating a mismatch in exit code and output content. Logs ↗︎

View Full Report ↗︎Docs

@trunk-io
Copy link

trunk-io bot commented Jan 6, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

Flaky Test Failure Summary Logs
Testing tool uv tool The expected result of installing UV tooling was not as expected, with a version mismatch error. Logs ↗︎
Test execution failure: could be caused by test hooks like 'afterAll'. Git hooks 'uv-check' and 'uv-lock' are not found, blocking the commit. Logs ↗︎
Testing tool ripgrep rg --version Logs ↗︎

View Full Report ↗︎Docs

@trunk-io
Copy link

trunk-io bot commented Jan 6, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

Failed Test Failure Summary Logs
Testing linter pyright test basic The test failed because the received output did not match the expected snapshot. Logs ↗︎
Testing formatter psscriptanalyzer test format The object did not match the expected structure because the success flag was false instead of true. Logs ↗︎
Testing linter phpstan test basic Logs ↗︎
Testing formatter nixpkgs-fmt test test Logs ↗︎

... and 5 more

Flaky Test Failure Summary Logs
Testing tool ripgrep rg --version The test failed because the actual object did not match the expected object, indicating an unexpected exit code and error message during ripgrep in... Logs ↗︎

View Full Report ↗︎Docs

encoding: "utf8" as const,
windowsHide: options.windowsHide,
};
const printConfig = execSync([executable, ...args].join(" "), execOptions);

Check warning

Code scanning / CodeQL

Shell command built from environment values Medium test

This shell command depends on an uncontrolled
absolute path
.
This shell command depends on an uncontrolled
absolute path
.

Copilot Autofix

AI about 20 hours ago

In general, to fix this class of issue you should avoid constructing a single shell command string that mixes executable paths and arguments; instead, pass the executable and arguments as separate parameters to execFileSync/execFile (or the platform equivalent). This prevents environment-controlled values (paths, args) from being interpreted by the shell.

For this concrete code, the best fix is to change getFullTrunkConfig so it no longer calls execSync with [executable, ...args].join(" "). We already have buildExecArgs returning the executable, arguments array, and options suitable for execFileSync. So in getFullTrunkConfig we can:

  • Keep using buildExecArgs(["config", "print"]) to get [executable, args, options].
  • Replace the execSync call with execFileSync(executable, args, execOptions), where execOptions is built as it is now (without specifying shell: true).
  • This removes the need to join into a single string, so no shell interpretation occurs, and any spaces or special characters in ARGS.cliPath or args are handled safely.

The only file needing modification is tests/driver/driver.ts, within the getFullTrunkConfig method. No new imports or helpers are required because execFileSync is already imported at the top of the file.

Suggested changeset 1
tests/driver/driver.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/tests/driver/driver.ts b/tests/driver/driver.ts
--- a/tests/driver/driver.ts
+++ b/tests/driver/driver.ts
@@ -310,7 +310,7 @@
       encoding: "utf8" as const,
       windowsHide: options.windowsHide,
     };
-    const printConfig = execSync([executable, ...args].join(" "), execOptions);
+    const printConfig = execFileSync(executable, args, execOptions);
     return YAML.parse(printConfig.replaceAll("\r\n", "\n"));
   };
 
EOF
@@ -310,7 +310,7 @@
encoding: "utf8" as const,
windowsHide: options.windowsHide,
};
const printConfig = execSync([executable, ...args].join(" "), execOptions);
const printConfig = execFileSync(executable, args, execOptions);
return YAML.parse(printConfig.replaceAll("\r\n", "\n"));
};

Copilot is powered by AI and may make mistakes. Always verify output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants