Skip to content

Fixed signature checking for local sources to break the build on a mismatch.#6737

Merged
PawelWMS merged 8 commits intomicrosoft:mainfrom
PawelWMS:pawelwi/fail_on_signature_mismatch
Nov 17, 2023
Merged

Fixed signature checking for local sources to break the build on a mismatch.#6737
PawelWMS merged 8 commits intomicrosoft:mainfrom
PawelWMS:pawelwi/fail_on_signature_mismatch

Conversation

@PawelWMS
Copy link
Copy Markdown
Contributor

@PawelWMS PawelWMS commented Nov 11, 2023

Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

  • The toolchain has been rebuilt successfully (or no changes were made to it)
  • The toolchain/worker package manifests are up-to-date
  • Any updated packages successfully build (or no packages were changed)
  • Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
  • Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
  • All package sources are available
  • cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
  • LICENSE-MAP files are up-to-date (./SPECS/LICENSES-AND-NOTICES/data/licenses.json, ./SPECS/LICENSES-AND-NOTICES/LICENSES-MAP.md, ./SPECS/LICENSES-AND-NOTICES/LICENSE-EXCEPTIONS.PHOTON)
  • All source files have up-to-date hashes in the *.signatures.json files
  • sudo make go-tidy-all and sudo make go-test-coverage pass
  • Documentation has been updated to match any changes to the build system
  • Ready to merge

Summary

Our tooling is expected to fail the build by default in case of a spec source signature mismatch. Right now we were ignoring the errors returned by out validation logic for local files and only displayed a warning.

Change Log
  • Made sources' signatures mismatches fatal by default.
Does this affect the toolchain?

No.

Test Methodology
  • Local tests.
  • Buddy build for a successful case.

@PawelWMS PawelWMS requested a review from a team as a code owner November 11, 2023 01:25
@microsoft-github-policy-service microsoft-github-policy-service Bot added the main PR Destined for main label Nov 11, 2023
Comment thread toolkit/tools/srpmpacker/srpmpacker.go
Comment thread toolkit/tools/srpmpacker/srpmpacker.go Outdated
@PawelWMS PawelWMS changed the title Fixed signature checking logic to break the build on a mismatch. Fixed local signature checking logic to break the build on a mismatch. Nov 13, 2023
@PawelWMS PawelWMS changed the title Fixed local signature checking logic to break the build on a mismatch. Fixed signature checking for local sources to break the build on a mismatch. Nov 14, 2023
Comment thread toolkit/tools/srpmpacker/srpmpacker.go Outdated
Comment thread toolkit/tools/srpmpacker/srpmpacker.go Outdated
@PawelWMS PawelWMS merged commit edbe1a4 into microsoft:main Nov 17, 2023
@PawelWMS PawelWMS deleted the pawelwi/fail_on_signature_mismatch branch November 17, 2023 19:28
dmcilvaney pushed a commit to dmcilvaney/CBL-Mariner that referenced this pull request Dec 14, 2023
dmcilvaney pushed a commit to dmcilvaney/CBL-Mariner that referenced this pull request Dec 14, 2023
dmcilvaney pushed a commit to dmcilvaney/CBL-Mariner that referenced this pull request Dec 14, 2023
@PawelWMS PawelWMS added the Tools label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

main PR Destined for main Tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants