Remembered-secret eviction and three single-line network guards have no test
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Read the four listed locations in internal/redact/redact.go, internal/llm/offline.go, internal/dast/client.go, and internal/authz/scope.go, then inspect the related tests and CONTRIBUTING.md. Add tests for eviction bookkeeping, redirect refusal, User-Agent validation, and invalid request ports; use a reduced eviction bound as suggested. Run make test-short and make lint; done means all four protections have tests that fail if the guarded behavior is removed.
索引モデルが issue の本文から書いたものです。
説明
Summary
Four small pieces of protective code are at zero coverage and their behavior is asserted in no test, so each can be deleted or inverted with every test green.
Where
internal/redact/redact.go:391,:473,:486(maxRemembered,forgetOldest)internal/llm/offline.go:83(provider client refuses redirects)internal/dast/client.go:142(User-Agent with CR, LF or NUL refused)internal/authz/scope.go:325(request URL port outside 1 to 65535 refused)
Details
- Eviction of remembered values.
forgetOldestdrops every value of the oldest file and adjusts the process-wide reference counts. The bound is the constant1 << 20, so a test cannot reach it. Make the bound a package variable (or add an unexported setter used witht.Cleanup) and test with a bound of about 8: values of the oldest file stop matching, a value shared with a newer file is still redacted, a single file over the bound evicts nothing, and an alias of an evicted file no longer matches. - Provider redirect refusal. The comment says it keeps an API key from being replayed to another host; the word "redirect" does not occur in the llm tests. Test: an
httptestserver answers 307 to a second server; each provider returns an error and the second server receives nothing. - User-Agent validation. Test:
NewClientwith a User-Agent containing CRLF returns an error and sends nothing. - Request port range. Scope entries with bad ports are tested; a request URL with one is not. Test:
Permitson a URL with port 99999 and port 0 is refused.
Impact
A long-running process such as the MCP server depends on the eviction bookkeeping to keep redacting values; the three guards each protect a boundary (provider key, live-target request headers, scope).
Suggested fix
See the checklist above.
Acceptance criteria
- Each of the four items has a test that fails when the guarded line is removed
Related: #28
Getting started
- Relevant files: internal/authz/scope.go, internal/dast/client.go, internal/llm/offline.go, internal/redact/redact.go
- How to run tests:
make test-short(Unix) or.\make.ps1 test-short(Windows PowerShell);make lintbefore you call it done - Related docs: CONTRIBUTING.md, docs/ARCHITECTURE.md
Filed by repo-audit/full-audit at 50e92ec. Severity: low. Effort: S. audit-key: testing|internal/redact/redact.go|forgetOldest
- 主要言語
- Go
- スター
- 0
- フォーク
- 1
- 平均マージ
- 8時間 14分
- マージ済み PR(30日)
- 3
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
TMHSDigital/Spackle のほかの issue
-
ci good first issue severity: low
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
TMHSDigital/Spackle#206 ·
メンテナーはふだん 1 日以内に返信
-
ci severity: low
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
TMHSDigital/Spackle#205 ·
メンテナーはふだん 1 日以内に返信
-
bug good first issue severity: low
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
TMHSDigital/Spackle#199 ·
メンテナーはふだん 1 日以内に返信
-
bug good first issue severity: low
難易度 2/5 1〜3時間 初心者へのやさしさ 87/100
TMHSDigital/Spackle#195 ·
メンテナーはふだん 1 日以内に返信
-
documentation good first issue severity: medium
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
TMHSDigital/Spackle#188 ·
メンテナーはふだん 1 日以内に返信
TMHSDigital/Spackle の issue をすべて見る
似ている issue
-
bug effort:s impact:med raised-by:worker risk:low to:worker
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
medici-finance/assay#8120 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
factory:subtask
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
agent-substrate/substrate#4308 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
celestiaorg/celestia-app#8877 ·
メンテナーはふだん 1 日以内に返信
-
sweep
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
bketelsen/truenas-mcp#112 ·
メンテナーはふだん 1 日以内に返信