Skip to content

Anthropic's OSS Scanner fixes (low) - #276

Open
adamdickmeiss wants to merge 9 commits into
masterfrom
low-findings
Open

adamdickmeiss wants to merge 9 commits into
masterfrom
low-findings

Conversation

@adamdickmeiss

Copy link
Copy Markdown
Contributor

Discovered by Anthropic's OSS Scanner

Skip the connect: wrapper when constructing HTTP requests and extracting
path or database arguments. Handle http: and https: addresses without
slashes consistently with the transport parser.

Replace the client's duplicate request builder with the shared helper.
Document the behavior and add regression tests for proxy credentials
and alternate URI spellings.

Discovered by Anthropic's OSS Scanner as ANT-2026-QRD73BWN.
Prevent a docpath such as docs from exposing sibling files and
directories named docs-internal or docs.backup.txt. Requests for
unrelated names now continue through normal SRU routing.

Document the matching rules and add regression coverage while
preserving the existing virtual-host and authentication tests.

Discovered by Anthropic's OSS Scanner as ANT-2026-HHJON15T.
Require requestdetail logging for GFS malformed-PDU dumps and ztest
logging for failed ILL APDU dumps. Keep the existing decode-error
diagnostics while preventing unsolicited BER dumps at default or
disabled logging levels.

Discovered by Anthropic's OSS Scanner as ANT-2026-J9FET01M.
Return no buffer when a GFS static-file read is incomplete, allowing
the existing HTTP 404 path to handle the failure. Also skip incomplete
files during admin imports.

This prevents uninitialized bytes beyond the data actually read from
being transmitted.

Discovered by Anthropic's OSS Scanner as ANT-2026-B4ZTDA18.
Format request entries through a shared helper that escapes ASCII
control characters and DEL while preserving UTF-8 text. This prevents
peer-supplied fields from inserting extra log lines or terminal escapes.

Add regression coverage for SRU query and HTTP path logging, and log
missing SRU queries as a dash.

Discovered by Anthropic's OSS Scanner as ANT-2026-OP0ZJV63.
Set the COMSTACK receive limit when creating an association. For XML
configurations, use the largest limit among virtual servers available
on that listener until server selection applies the specific limit.

Add regression coverage for default and listener-specific limits and
their narrowing after server selection.

Discovered by Anthropic's OSS Scanner as ANT-2026-FQE92TA2.
Replace field and record terminators in directory tags, indicators,
and converted field data with spaces. This prevents input data or
character conversion from injecting extra record boundaries while
preserving directory lengths and offsets.

Add regression tests for MARC-8 conversion and JSON input.

Discovered by Anthropic's OSS Scanner as ANT-2026-6KDCAXNJ.
Save and restore the entire encoder state when rolling back a
decomposed character, including character-set selections and pending
ligature bytes. This prevents retries from dropping bytes and causing
ISO2709 record lengths and directory offsets to disagree with the data.

Add regression tests for page escapes and ligature state across retries.

Discovered by Anthropic's OSS Scanner as ANT-2026-QIF619NX.
Reset the saved tag after adding a controlfield so enclosing elements
cannot repeatedly copy the innermost tag. This prevents quadratic
memory growth from nested controlfields with long tags.

Add a regression test for nested controlfields and subsequent fields.

Discovered by Anthropic's OSS Scanner as ANT-2026-UVY80AMT.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant