-
Notifications
You must be signed in to change notification settings - Fork 1
feat(iam): access key operations #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Greptile OverviewGreptile SummaryThis PR refactors the CI release process by removing Major Issues:
Changes:
Confidence Score: 1/5
Important Files Changed
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 files reviewed, 2 comments
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
| run: npm run release | ||
| run: ./scripts/release.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NPM_TOKEN environment variable was removed but @semantic-release/npm plugin still requires authentication to publish packages to npm. The workflow will fail when attempting to publish.
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/release.yaml
Line: 52:54
Comment:
NPM_TOKEN environment variable was removed but @semantic-release/npm plugin still requires authentication to publish packages to npm. The workflow will fail when attempting to publish.
How can I resolve this? If you propose a fix, please make it concise.| // Extract scope from package name: '@tigrisdata/storage' -> 'storage' | ||
| const scope = packageName.replace('@tigrisdata/', ''); | ||
|
|
||
| return { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The branch 'iam/access-keys' is hardcoded in the branches array. This temporary branch reference should be removed before merging to main, or it will allow releases from that branch in perpetuity.
| return { | |
| branches: ['main', { name: 'next', prerelease: true }], |
Prompt To Fix With AI
This is a comment left during a code review.
Path: release.config.base.cjs
Line: 9:9
Comment:
The branch 'iam/access-keys' is hardcoded in the branches array. This temporary branch reference should be removed before merging to main, or it will allow releases from that branch in perpetuity.
```suggestion
branches: ['main', { name: 'next', prerelease: true }],
```
How can I resolve this? If you propose a fix, please make it concise.31b47e7 to
8e925da
Compare
8e925da to
aa8a8dc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| role: role.role, | ||
| })), | ||
| }, | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accessing array index without bounds checking causes crash
Medium Severity
The getAccessKey function directly accesses response.data.Keys[0] without verifying the array contains elements. If the API returns an empty Keys array (e.g., when the access key ID doesn't exist), this will throw a runtime error when accessing properties like .access_key_id on undefined.
|
|
||
| export type CreateAccessKeyResponse = { | ||
| accessKeyId: string; | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exported type doesn't match function return type
Low Severity
The CreateAccessKeyResponse type is exported but never used and doesn't match the actual return type. The type contains only { accessKeyId: string }, but createAccessKey returns TigrisIAMResponse<AccessKey, Error> which includes id, secret, name, createdAt, status, and roles. Consumers importing this type would be misled about what the function returns.
Note
Introduces access key management in the IAM SDK and refactors release to per-package semantic-release with a scripted dependency order.
listAccessKeys,getAccessKey,createAccessKey,removeAccessKey, andassignBucketRoleswith form-encoded requests; exports frompackages/iam/src/index.tshttp-clientto signFormData/URLSearchParamsbodies for AWS SigV4release.config.base.cjs, package-specificrelease.config.cjs, andscripts/release.sh; updatespackage.jsonscripts and CI workflows (pr.yaml,release.yaml)*.cjsfilesWritten by Cursor Bugbot for commit 5c2fa07. This will update automatically on new commits. Configure here.