ターミナル出力の堅牢化(エラーサニタイズ・1行化・レートリミット)#14
Merged
Merged
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.
Summary
#12 のレビューで挙がったターミナル出力まわりの残指摘に対応しました。#13 の作り直しです(#12 マージ時に base ブランチが削除され自動クローズされたため、main 向けに再作成しています。内容は同一です)。
wrapCommandのエラーメッセージ・スタックトレースにターミナルサニタイズを適用しました。適用順は「サニタイズ → トークン秘匿」とし、エスケープシーケンスで分断されたトークンが秘匿をすり抜けるケースを防いでいますsanitizeSingleLineTextヘルパーを追加し、TSV / テーブル行を構成するフィールド(usergroups / members / users / bookmark / reminder / search / channels / presence)で改行・タブを空白1つに畳むようにしました。Slack 側の表示名等に改行を仕込んで偽の行・列を挿入する攻撃の対策です。search のテーブル形式の本文のみ、ブロック表示の従来挙動を維持していますusers.infoを共有レートリミッタ(並列3)経由にし、大きなグループのmembers/usergroups membersで 429 を踏みにくくしましたType of change
Test plan
npm run checkpassesnpm run buildpassesnpm testpassesChecklist
package.jsonversion bumped per semver (patch/minor/major) — 修正のため patch(0.24.0 → 0.24.1)CHANGELOG.mdupdated with a new entry — fork 以降は GitHub Releases 管理のため更新していません