Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: SPDX decode error originator #221

Merged
merged 3 commits into from
Jul 27, 2023
Merged

Fix: SPDX decode error originator #221

merged 3 commits into from
Jul 27, 2023

Conversation

spiffcs
Copy link
Contributor

@spiffcs spiffcs commented Jul 27, 2023

Summary

Given the field "originator" : "Organization:SPDX", tools-golang would error on decoding a valid SBOM.

This change adds test protection to the reader for any future changes to 2_3 custom unmarshalling as well as fixes the underlying error where the originator field will consider both : and : as valid split cases.

Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
@spiffcs
Copy link
Contributor Author

spiffcs commented Jul 27, 2023

cc @kzantow @lumjjb for review =)

spdx/v2/common/package.go Outdated Show resolved Hide resolved
Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
@kzantow kzantow merged commit 6a271aa into spdx:main Jul 27, 2023
another-rex referenced this pull request in google/osv-scanner Aug 2, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/go-git/go-git/v5](https://github.com/go-git/go-git) |
require | patch | `v5.8.0` -> `v5.8.1` |
| [github.com/spdx/tools-golang](https://github.com/spdx/tools-golang)
| require | patch | `v0.5.2` -> `v0.5.3` |
| golang.org/x/exp | require | digest | `613f0c0` -> `d63ba01` |

---

### Release Notes

<details>
<summary>go-git/go-git (github.com/go-git/go-git/v5)</summary>

### [`v5.8.1`](https://github.com/go-git/go-git/releases/tag/v5.8.1)

[Compare
Source](https://github.com/go-git/go-git/compare/v5.8.0...v5.8.1)

#### What's Changed

- \*: Bump dependencies by [@&#8203;pjbgf](https://github.com/pjbgf)
in
[https://github.com/go-git/go-git/pull/815](https://github.com/go-git/go-git/pull/815)

**Full Changelog**:
go-git/go-git@v5.8.0...v5.8.1

</details>

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

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

[Compare
Source](https://github.com/spdx/tools-golang/compare/v0.5.2...v0.5.3)

#### What's Changed

- Fix: SPDX decode error originator by
[@&#8203;spiffcs](https://github.com/spiffcs) in
[https://github.com/spdx/tools-golang/pull/221](https://github.com/spdx/tools-golang/pull/221)

#### New Contributors

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

**Full Changelog**:
spdx/tools-golang@v0.5.2...v0.5.3

</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.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiIzNi4yNC4yIiwidXBkYXRlZEluVmVyIjoiMzYuMjcuMSIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->
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.

2 participants