You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This pull request is managed by Stainless's GitHub App.
The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.
For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.
check-release-environment script does not perform any checks
High
Run the script and observe that it always prints 'The environment is ready to push releases!' even if the environment is not properly configured.
The check-release-environment script is intended to verify that the release environment is correctly set up before a release is performed. However, the script currently does not implement any checks and always reports a successful environment. This could lead to releases being performed in incorrect environments, potentially causing errors or security vulnerabilities.
To try out this version of the SDK, run:
```
npm install 'https://pkg.stainless.com/s/morphik-typescript/998659148493c8c7a74b510288e511d408a8c585/dist.tar.gz'
```
_Expires: Fri, 05 Dec 2025 22:51:52 GMT_
Run bin/check-release-environment. It will always report success, even if required environment variables are missing or other release prerequisites are not met.
The check-release-environment script is intended to validate the release environment before a release. However, it lacks any actual checks and always returns success, rendering it ineffective.
Name: Inadequate Release Environment Checks
Severity: Critical
Example test case: Introduce a missing dependency or incorrect environment variable, then run the release doctor workflow. The workflow will pass.
Description: The check-release-environment script does not perform any checks, causing the release doctor workflow to always pass, even if the environment is not ready for a release.
bin/check-release-environment script does not perform any actual checks
Critical
Run the script. It will always report success, even if the environment is missing dependencies or has incorrect configurations.
The bin/check-release-environment script initializes an empty errors array and never populates it with any checks. This results in the script always reporting a success, regardless of the actual state of the release environment.
The bin/check-release-environment script doesn't perform any checks, causing the Release Doctor workflow to always pass, even with release environment issues.
Skipped API Tests
High
Run any test in tests/api-resources
Most API tests are skipped because "Prism tests are disabled," indicating a problem with the mock server setup.
Run the release doctor workflow without the necessary environment variables (e.g., NPM_TOKEN). The workflow will incorrectly report success.
The check-release-environment script in bin/check-release-environment does not perform any meaningful checks on the release environment. It always returns a success message, even if required environment variables are missing or other necessary conditions are not met. This could lead to releases being published from incorrect or incomplete environments.
Unreliable Prism Mock Server Startup and Error Handling
High
Run the test suite with Prism failing to start due to an invalid OpenAPI spec. The tests will be skipped instead of failing.
The scripts/mock script uses an unreliable method to determine if the Prism mock server has started successfully in daemon mode. It relies on parsing the .prism.log file for specific messages, which can change in future versions of Prism. Additionally, the error handling in scripts/test is insufficient to detect Prism startup failures, leading to tests being skipped instead of failing.
Redundant Publish Configuration
Low
N/A
The repository has redundant publish configurations. The publishConfig in package.json ensures that the package is published with public access. However, the bin/publish-npm script is still used for publishing, which duplicates the configuration and could lead to inconsistencies if the two configurations diverge in the future. The bin/publish-npm script should be removed, and publishing should rely solely on Yarn's built-in publish mechanism and the publishConfig in package.json.
The script always returns success, even if the release environment is misconfigured. It performs no checks. This creates a false sense of security.
Commented out tests
Medium
Run any test in the /tests/api-resources/ directory.
All tests in this directory are skipped with the comment "Prism tests are disabled". This means the API client is not being adequately tested, and regressions could be introduced without being detected.
Missing Code Execution Tool
Low
Check the dependencies or codebase for the tool.
The changelog indicates a code execution tool was added, but there is no explicit evidence of this tool being present in the codebase. Either the changelog is incorrect, the code execution tool was not correctly implemented, or the implementation is obscured.
Check the contents of release-please-config.json. The file configures release-please for prerelease versioning, but the current version is 0.1.0 which is not a prerelease version.
The versioning and prerelease fields in release-please-config.json are set for prerelease, while the current version is 0.1.0 (stable). This mismatch could cause problems with future releases. It should be either stable or prerelease.
Run /root/morphik-ts/bin/check-release-environment
The check-release-environment script uses bash-specific syntax, but bash is not available, causing the script to fail.
Prism Tests Disabled
Medium
Examine test files.
Prism tests are disabled using test.skip. This hides potential API contract violations and should be addressed. A tracking issue should exist to re-enable them.
Misleading Commit Message
Low
Read commit message for patch 12.
The commit message for patch 12 implies a code execution tool was added, but the change is actually a dependency update. This can cause confusion.
Incorrect Blob Qualification
Low
Use a Blob polyfill with a different prototype.
The Blob qualification check might pass with an incorrect Blob polyfill, leading to unexpected behavior due to instanceof checks.
The bin/check-release-environment script always reports success, even if required environment variables are missing.
The bin/check-release-environment script initializes an empty array called errors, checks if the array has any elements, and if so, prints the errors. However, the array never has any elements added to it, so the script always succeeds.
BUILD_PATH path traversal vulnerability
Medium
If the BUILD_PATH variable is controllable by an attacker, they could specify a path that includes sensitive files.
The scripts/utils/upload-artifact.sh script uses the BUILD_PATH environment variable to determine the directory to tar. If the BUILD_PATH variable is controllable by an attacker, they could potentially specify a path that includes sensitive files.
Incorrect HTTP method for requests with readable bodies
High
When options.body is a readable stream, the fetchOptions are being overridden with method: 'GET'
When options.body is a readable stream, the fetchOptions are being overridden with method: 'GET', preventing users from calling any API endpoint with a readable body using HTTP methods other than GET, breaking core functionality.
Run bin/check-release-environment with missing environment variables
The bin/check-release-environment script doesn't perform any actual checks on the release environment. It always reports success, even if required environment variables are missing, potentially leading to broken releases.
Note: this release PR has been open for more than 60 days. Until this PR is merged, we will temporarily stop pushing codegen updates due to changes to Stainless' codegen.
The upload-artifact.sh script now packages the dist directory into a .tgz file using npm pack, and then attempts to upload that .tgz file as a gzipped tarball. The server expects a gzipped tarball created by tar -cz, but it's now receiving an already compressed .tgz which will lead to upload failures and broken builds. The content type is also incorrect.
Inconsistent use of null and undefined for optional parameters.
Severity: Low
Example test case: The IngestIngestTextParams interface has metadata defined as metadata?: unknown; and filename?: string | null;. This means that in the first case, the absence of metadata will result in undefined, and in the second case, in null.
Description: The backend might handle null and undefined differently, leading to errors or incorrect logic execution. It's best to have a consistent approach to optional parameters (either always use null or always use undefined). This issue applies to a variety of other params across the codebase.
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
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.
Automated Release PR
0.1.0 (2025-11-05)
Full Changelog: v0.0.1...v0.1.0
Features
Bug Fixes
Chores
This pull request is managed by Stainless's GitHub App.
The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.
For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.
🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions