Repository navigation
Commit 525e5b0
authored
fix(sdk): reject key access entries without URLs (#423)
## Summary
- reject malformed key access entries whose URL is missing before TDF
load planning
- add regression coverage for the malformed manifest found by the
main-branch fuzz run
- move reader configuration creation outside the AssertJ exception
lambda to satisfy static analysis
## Rationale
The fuzz failure after #422 was not caused by the empty-manifest
validation itself. That fix allowed the corpus to proceed, exposing a
separate malformed-manifest path: a key access entry with a missing URL
reached Autoconfigure.KeySplitStep and triggered a NullPointerException.
This change rejects that manifest with an IllegalArgumentException
during manifest validation.
Failed job:
https://github.com/opentdf/java-sdk/actions/runs/39472084130/job/118798445562
Tracking issue: https://virtru.atlassian.net/browse/DSPX-5073
## Test plan
- mvn -pl sdk -am test -Dtest='ManifestTest,TDFReaderTest'
-Dsurefire.failIfNoSpecifiedTests=false (38 tests passed)
- mvn -pl sdk -am test -Dtest='Fuzzing#fuzzTDF'
-Dsurefire.failIfNoSpecifiedTests=false, replaying the exact crash
artifact from the failed job (9 corpus tests passed)
## Public API
No public API changes.
Signed-off-by: Elizabeth Healy <ehealy@virtru.com>1 parent 762fe40 commit 525e5b0
3 files changed
Lines changed: 15 additions & 1 deletion
File tree
- sdk/src
- main/java/io/opentdf/platform/sdk
- test/java/io/opentdf/platform/sdk
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
799 | 799 | | |
800 | 800 | | |
801 | 801 | | |
| 802 | + | |
| 803 | + | |
802 | 804 | | |
803 | 805 | | |
804 | 806 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
260 | 261 | | |
261 | 262 | | |
262 | 263 | | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
263 | 274 | | |
264 | 275 | | |
265 | 276 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
92 | 93 | | |
93 | | - | |
| 94 | + | |
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
| |||
0 commit comments