Skip to content

fix: panic if JSON relationship array contains null#239

Merged
kzantow merged 1 commit intospdx:mainfrom
kzantow-anchore:fix/null-relationship-panic
May 20, 2024
Merged

fix: panic if JSON relationship array contains null#239
kzantow merged 1 commit intospdx:mainfrom
kzantow-anchore:fix/null-relationship-panic

Conversation

@kzantow
Copy link
Copy Markdown
Collaborator

@kzantow kzantow commented May 8, 2024

This PR fixes a panic when invalid JSON containing null in a relationship array is parsed.

TODO:

  • add tests

Fixes: #238

Signed-off-by: Keith Zantow <kzantow@gmail.com>
@kzantow kzantow force-pushed the fix/null-relationship-panic branch from 5ed5bfa to 24bd829 Compare May 20, 2024 20:35
@kzantow kzantow marked this pull request as ready for review May 20, 2024 20:35
@kzantow kzantow merged commit 57d4b8e into spdx:main May 20, 2024
@kzantow kzantow deleted the fix/null-relationship-panic branch May 20, 2024 23:38
cuixq referenced this pull request in google/osv-scanner Jul 2, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [github.com/spdx/tools-golang](https://togithub.com/spdx/tools-golang)
| `v0.5.4` -> `v0.5.5` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fspdx%2ftools-golang/v0.5.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fspdx%2ftools-golang/v0.5.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fspdx%2ftools-golang/v0.5.4/v0.5.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fspdx%2ftools-golang/v0.5.4/v0.5.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>spdx/tools-golang (github.com/spdx/tools-golang)</summary>

###
[`v0.5.5`](https://togithub.com/spdx/tools-golang/releases/tag/v0.5.5)

[Compare
Source](https://togithub.com/spdx/tools-golang/compare/v0.5.4...v0.5.5)

#### What's Changed

- fix: properly normalize Windows paths, add windows test runner by
[@&#8203;kzantow](https://togithub.com/kzantow) in
[https://github.com/spdx/tools-golang/pull/242](https://togithub.com/spdx/tools-golang/pull/242)
- fix: panic if JSON relationship array contains null by
[@&#8203;kzantow](https://togithub.com/kzantow) in
[https://github.com/spdx/tools-golang/pull/239](https://togithub.com/spdx/tools-golang/pull/239)
- chore: provide a clearer error when using an invalid Originator by
[@&#8203;LaurentGoderre](https://togithub.com/LaurentGoderre) in
[https://github.com/spdx/tools-golang/pull/246](https://togithub.com/spdx/tools-golang/pull/246)

#### New Contributors

- [@&#8203;LaurentGoderre](https://togithub.com/LaurentGoderre) made
their first contribution in
[https://github.com/spdx/tools-golang/pull/246](https://togithub.com/spdx/tools-golang/pull/246)

**Full Changelog**:
spdx/tools-golang@v0.5.4...v0.5.5

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 6am on monday" in timezone
Australia/Sydney, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/google/osv-scanner).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjQyMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->

Co-authored-by: Xueqin Cui <72771658+cuixq@users.noreply.github.com>
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.

Nil ptr deref panic when parsing JSON SBOM with a null relationships value

2 participants