Skip to content

corpus: Kotlin + Swift + Java JWT fixtures (toward #84) - #115

Merged
noeljackson merged 1 commit into
mainfrom
corpus/kotlin-swift-java-jwt
May 14, 2026
Merged

noeljackson merged 1 commit into
mainfrom
corpus/kotlin-swift-java-jwt

Conversation

@noeljackson

Copy link
Copy Markdown
Owner

Toward #84.

Second batch of under-covered-language bench tasks. Bench goes
from 12 → 15 tasks. Now covering Java/Rust/C/Kotlin/Swift on the
under-covered side; Kotlin and Swift didn't have a single bench
entry before this batch.

Tasks

  • `kotlin-jdbc-runtime-exec` (Phase-3) — `kt-jdbc-string-template-sqli`

    • `kt-runtime-exec-template`. Dropped the JDBC safe variant because
      the matcher's AST query is too broad and FPs on it; ProcessBuilder
      safe decoy retained.
  • `swift-process-format` (Phase-3) — `swift-eval-injection`
    via `system()`. Originally bundled the noisy
    `swift-string-format-tainted` matcher; pulled out because it
    fires too broadly even on literal format strings.

  • `java-jwt-none-deserialize` (Phase-2) — `java-deserialize-objectinputstream`

    • `java-jwt-none` via the real JJWT shape `Algorithm.none()`.
      The bare `"alg":"none"` pattern doesn't match through Java
      string-literal escaping (filed separately as a matcher precision
      improvement).

Scoring

Each task standalone: recall 1.0, precision 1.0, 0 decoy FPs.

Whole-bench:

Metric Before After
Task count 12 15
Recall 0.9655 0.9706
Precision 1.0 1.0
Decoy FP rate 0 0

Toward #84

15 of ~50 target tasks. Remaining under-covered: more Java/Rust
slug variants (axum-no-auth, jvm spring-cors-wildcard,
java-xxe...), PHP and C# (zero matcher pack today, may need
matcher PRs first), more Kotlin (intent/keystore/coroutine slugs),
more Swift (keychain, NSAllowsArbitraryLoads, WKWebView).

🤖 Generated with Claude Code

Second batch of under-covered-language bench tasks per the CLAUDE.md
project invariant. Three more fixtures across two Phase-3 languages
(Kotlin + Swift) and a second Java slug pair, taking the corpus from
12 → 15 tasks.

## kotlin-jdbc-runtime-exec

Exercises:
- `kt-jdbc-string-template-sqli` — Kotlin string-template SQLi
- `kt-runtime-exec-template` — Runtime.exec with string template

Drops the JDBC safe variant — the matcher's AST query fires on
`prepareStatement` and `executeQuery` regardless of dynamic-SQL
context, which inflates FPs. Kept only the ProcessBuilder safe
decoy.

## swift-process-format

Exercises:
- `swift-eval-injection` — system(<var>) command-injection

Originally included `swift-string-format-tainted` too, but that's
noise_tier=noisy and fires too broadly even on literal format
strings; pulled out for a separate future PR. The `Process` shape
also turned out tricky (matcher requires single-line
`Process()...arguments=`), so the fixture uses `system(tool)` and
`system("/usr/bin/convert ...")` for the safe decoy.

## java-jwt-none-deserialize

Exercises:
- `java-deserialize-objectinputstream` — ObjectInputStream.readObject
- `java-jwt-none` — JWT verifier accepting alg=none

Uses fully-qualified `java.io.ObjectInputStream` to avoid the
import-line FP. Uses `Algorithm.none()` (the real JJWT API shape)
rather than a JSON literal — the matcher pattern only catches
bare `"alg":"none"` in source, not escaped-quote forms inside a
Java string literal (filed separately as a matcher-precision
improvement).

## Scoring

Each task: recall 1.0 on HIGH, precision 1.0, 0 decoy FPs.

Whole-bench:
  task_count   12 → 15 (+3)
  recall       0.9655 → 0.9706 (better)
  precision    1.0    → 1.0 (unchanged)
  decoy FP     0       0

Toward #84: 15 of 50 target tasks. Now covering Java/Rust/C/Kotlin/
Swift on the under-covered side, with Kotlin and Swift bench entries
that didn't exist before.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@noeljackson noeljackson mentioned this pull request May 14, 2026
13 of 15 tasks
@noeljackson
noeljackson merged commit 031f9b2 into main May 14, 2026
3 checks passed
@noeljackson
noeljackson deleted the corpus/kotlin-swift-java-jwt branch May 14, 2026 15:09
noeljackson added a commit that referenced this pull request May 15, 2026
Second batch of under-covered-language bench tasks per the CLAUDE.md
project invariant. Three more fixtures across two Phase-3 languages
(Kotlin + Swift) and a second Java slug pair, taking the corpus from
12 → 15 tasks.

## kotlin-jdbc-runtime-exec

Exercises:
- `kt-jdbc-string-template-sqli` — Kotlin string-template SQLi
- `kt-runtime-exec-template` — Runtime.exec with string template

Drops the JDBC safe variant — the matcher's AST query fires on
`prepareStatement` and `executeQuery` regardless of dynamic-SQL
context, which inflates FPs. Kept only the ProcessBuilder safe
decoy.

## swift-process-format

Exercises:
- `swift-eval-injection` — system(<var>) command-injection

Originally included `swift-string-format-tainted` too, but that's
noise_tier=noisy and fires too broadly even on literal format
strings; pulled out for a separate future PR. The `Process` shape
also turned out tricky (matcher requires single-line
`Process()...arguments=`), so the fixture uses `system(tool)` and
`system("/usr/bin/convert ...")` for the safe decoy.

## java-jwt-none-deserialize

Exercises:
- `java-deserialize-objectinputstream` — ObjectInputStream.readObject
- `java-jwt-none` — JWT verifier accepting alg=none

Uses fully-qualified `java.io.ObjectInputStream` to avoid the
import-line FP. Uses `Algorithm.none()` (the real JJWT API shape)
rather than a JSON literal — the matcher pattern only catches
bare `"alg":"none"` in source, not escaped-quote forms inside a
Java string literal (filed separately as a matcher-precision
improvement).

## Scoring

Each task: recall 1.0 on HIGH, precision 1.0, 0 decoy FPs.

Whole-bench:
  task_count   12 → 15 (+3)
  recall       0.9655 → 0.9706 (better)
  precision    1.0    → 1.0 (unchanged)
  decoy FP     0       0

Toward #84: 15 of 50 target tasks. Now covering Java/Rust/C/Kotlin/
Swift on the under-covered side, with Kotlin and Swift bench entries
that didn't exist before.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
noeljackson added a commit that referenced this pull request May 18, 2026
Second batch of under-covered-language bench tasks per the CLAUDE.md
project invariant. Three more fixtures across two Phase-3 languages
(Kotlin + Swift) and a second Java slug pair, taking the corpus from
12 → 15 tasks.

## kotlin-jdbc-runtime-exec

Exercises:
- `kt-jdbc-string-template-sqli` — Kotlin string-template SQLi
- `kt-runtime-exec-template` — Runtime.exec with string template

Drops the JDBC safe variant — the matcher's AST query fires on
`prepareStatement` and `executeQuery` regardless of dynamic-SQL
context, which inflates FPs. Kept only the ProcessBuilder safe
decoy.

## swift-process-format

Exercises:
- `swift-eval-injection` — system(<var>) command-injection

Originally included `swift-string-format-tainted` too, but that's
noise_tier=noisy and fires too broadly even on literal format
strings; pulled out for a separate future PR. The `Process` shape
also turned out tricky (matcher requires single-line
`Process()...arguments=`), so the fixture uses `system(tool)` and
`system("/usr/bin/convert ...")` for the safe decoy.

## java-jwt-none-deserialize

Exercises:
- `java-deserialize-objectinputstream` — ObjectInputStream.readObject
- `java-jwt-none` — JWT verifier accepting alg=none

Uses fully-qualified `java.io.ObjectInputStream` to avoid the
import-line FP. Uses `Algorithm.none()` (the real JJWT API shape)
rather than a JSON literal — the matcher pattern only catches
bare `"alg":"none"` in source, not escaped-quote forms inside a
Java string literal (filed separately as a matcher-precision
improvement).

## Scoring

Each task: recall 1.0 on HIGH, precision 1.0, 0 decoy FPs.

Whole-bench:
  task_count   12 → 15 (+3)
  recall       0.9655 → 0.9706 (better)
  precision    1.0    → 1.0 (unchanged)
  decoy FP     0       0

Toward #84: 15 of 50 target tasks. Now covering Java/Rust/C/Kotlin/
Swift on the under-covered side, with Kotlin and Swift bench entries
that didn't exist before.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant