Revert "Release v1.1.0"#2039
Conversation
This reverts commit bc360b4.
|
⏳ Code review in progress. Analyzing for code quality issues and best practices. Detailed findings will be posted upon completion. Using Amazon Q Developer for GitHubAmazon Q Developer1 is an AI-powered assistant that integrates directly into your GitHub workflow, enhancing your development process with intelligent features for code development, review, and transformation. Slash Commands
FeaturesAgentic Chat Code Review CustomizationYou can create project-specific rules for Amazon Q Developer to follow:
Example rule: FeedbackTo provide feedback on Amazon Q Developer, create an issue in the Amazon Q Developer public repository. For more detailed information, visit the Amazon Q for GitHub documentation. Footnotes
|
| { | ||
| "name": "appstore-connect-jwt-generator-cli", | ||
| "version": "1.1.0", | ||
| "version": "1.0.7", |
There was a problem hiding this comment.
バージョンのロールバックについて、以下の点を確認してください:
- このリバートによる影響範囲の評価
- 依存関係の互換性の確認(特にappstore-connect-jwt-generator-coreのダウングレード)
- リリースノートの更新計画
| * @param privateKey | ||
| * @param issuerId | ||
| * @param privateKeyId | ||
| * @param duration |
There was a problem hiding this comment.
🛑 [セキュリティ考慮事項]: JWTトークン生成における以下のセキュリティポイントを確認してください:
- トークンの有効期限設定(現在のデフォルト値500の妥当性)
- ES256アルゴリズムの使用は適切ですが、将来的なアルゴリズム更新メカニズムの検討
- エラーハンドリングの強化1
Footnotes
-
CWE-346: Origin Validation Error - https://cwe.mitre.org/data/definitions/346.html ↩
| * @param duration | ||
| * @returns | ||
| */ export async function token(privateKey, issuerId, privateKeyId, duration = 500) { | ||
| const key = await importPKCS8(privateKey.toString(), 'ES256'); | ||
| return new SignJWT(payload(issuerId, duration)).setProtectedHeader({ | ||
| alg: 'ES256', | ||
| kid: privateKeyId | ||
| }).sign(key); |
There was a problem hiding this comment.
非同期トークン生成関数において、エラーハンドリングを改善することを推奨します。以下のようなコード実装を提案します:
| * @param duration | |
| * @returns | |
| */ export async function token(privateKey, issuerId, privateKeyId, duration = 500) { | |
| const key = await importPKCS8(privateKey.toString(), 'ES256'); | |
| return new SignJWT(payload(issuerId, duration)).setProtectedHeader({ | |
| alg: 'ES256', | |
| kid: privateKeyId | |
| }).sign(key); | |
| export async function token( | |
| privateKey: string | Buffer, | |
| issuerId: string, | |
| privateKeyId: string, | |
| duration = 500, | |
| ): Promise<string> { | |
| try { | |
| const key = await importPKCS8(privateKey.toString(), 'ES256'); | |
| return new SignJWT(payload(issuerId, duration)) | |
| .setProtectedHeader({ alg: 'ES256', kid: privateKeyId }) | |
| .sign(key); | |
| } catch (error) { | |
| throw new Error(`JWT token generation failed: ${error instanceof Error ? error.message : 'Unknown error'}`); | |
| } | |
| } |
Reverts #2037