Bearer Token Value Logged to Standard Output
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 70/100
調査の方向性
src/asfquart/session.py の 73 行目と 88 行目から始め、Authorization: Bearer ヘッダーを処理する no-token_handler パスを追跡します。トークン値が標準出力に到達しないこと、および警告にトークンが含まれないことを確認します。このパスをカバーする unit test を追加または更新し、その後、no-op handler の考慮を含む受け入れ基準を確認します。
索引モデルが issue の本文から書いたものです。
説明
Issue: FINDING-038 - Bearer Token Value Logged to Standard Output
Labels: bug, security, priority:high, asvs-level:L1
ASVS Level(s): [L1]
Description:
Summary
The ASFQuart session handler contains a debug print statement that outputs the full Bearer token value to stdout when no token_handler is registered. This constitutes a direct violation of ASVS 7.2.2's requirement to avoid storing sensitive session tokens in logs. The vulnerable code prints the raw token value from Authorization: Bearer header to stdout, which persists in server log files, enabling potential replay attacks if logs are accessed. However, this is currently a dead code path as ATR registers JWT verification as the token handler in production, so the else branch is never executed.
Details
Affected Files and Lines:
src/asfquart/session.py:73- Debug print with token valuesrc/asfquart/session.py:88- Debug print with token value
This appears to be debug code that was never removed. While currently unreachable in production, it represents a latent vulnerability.
Recommended Remediation
Remove token value from log statement:
# Replace:
print(f"Bearer {bearer}")
# With:
log.warning('Bearer token presented but no handler registered')
Alternative: Register a no-op token handler during application setup to prevent the debug path from executing:
# In atr/server.py after app = ASFQuart(__name__)
async def _noop_token_handler(token: str):
return None
app.token_handler = _noop_token_handler
Acceptance Criteria
- Token value removed from log statement
- Warning logged without token value
- No-op handler considered
- Debug code path eliminated
- Unit test verifying the fix
References
- Source reports: L1:7.2.1.md, L1:7.2.2.md
- Related findings: None
- ASVS sections: 7.2.1, 7.2.2
Priority
High
- 主要言語
- Python
- スター
- 7
- フォーク
- 13
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/infrastructure-asfquart のほかの issue
-
bug priority
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
Document OAuth callback consistency rules対応中かも @Marrshal15 が 16 日前に担当しました。 オープンdocumentation
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
apache/infrastructure-asfquart#126 · コメント 1 件 ·
-
Triage and track asfquart issues対応中かも @sbp が 15 日前に担当しました。 オープン
apache/infrastructure-asfquart#134 · 担当者 1 名 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
apache/infrastructure-asfquart#132 · コメント 1 件 ·
apache/infrastructure-asfquart の issue をすべて見る
似ている issue
-
[Bug] Unit tests reach real Bedrock call paths without patching the model対応中かも @proton0210 が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
aws-samples/sample-aws-genai-db-modernizer#1318 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
pyarrow-25.0.1-cp310-cp310-manylinux_2_28_x86_64.whl: 1 vulnerabilities (highest severity is: 5.3)オープンMend: dependency security vulnerability
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
capitalone/locopy#394 ·
-
[Bug] Unhandled ValueError terminates watchdog thread when GISRC value contains multiple colonsオープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
sdk-typescript: unquoted COPY globs in shell form are silently dropped from the image build contextオープンbug javascript
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
ietf-tools/datatracker#11922 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信