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 Apply Attestation: "TypeError: Cannot read properties of undefined (reading 'status')" #6616

Merged
merged 7 commits into from
Feb 13, 2025

Conversation

em-c-rod
Copy link
Contributor

@em-c-rod em-c-rod commented Feb 10, 2025

When applying an attestation to an overlay file, we were getting the following error:
"TypeError: Cannot read properties of undefined (reading 'status')"
because the overlay file had the same control listed in multiple profile objects of the HDF file. Not every control instance has results because of it being an overlay file. This will catch that issue and apply the attestation once the results exist.

  • Added a catch for overlay files which may have controls with no results.
  • Test added

…ts. Test added in the SAF CLI

Signed-off-by: Emily Rodriguez <[email protected]>
Signed-off-by: Emily Rodriguez <[email protected]>
Copy link
Contributor

@Amndeep7 Amndeep7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably add another test to check for this overlay case. To make this clear, I want the test in HDF Converters, not just in the SAF CLI.

Signed-off-by: Amndeep Singh Mann <[email protected]>
@Amndeep7
Copy link
Contributor

Also I pushed up a commit @em-c-rod, feel free to revert if you don't want it.

@em-c-rod em-c-rod requested a review from Amndeep7 February 13, 2025 19:34
@Amndeep7 Amndeep7 merged commit 36aca8d into master Feb 13, 2025
18 checks passed
@Amndeep7 Amndeep7 deleted the ApplyAttestationToOverlay branch February 13, 2025 22:31
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