* When pulling remote image data, fail if the remote image is not found
Signed-off-by: Natalie Arellano <narellano@vmware.com>
* When validating dockerfiles, set extend to true if there are any instructions (vs more than one instruction)
Signed-off-by: Natalie Arellano <narellano@vmware.com>
* Update matching logic when considering if two image names are equivalent to ignore the digest portion of the reference if present (for the purpose of selecting data from run.toml to add to the lifecycle metadata label i.e., “run image for rebase”)
Signed-off-by: Natalie Arellano <narellano@vmware.com>
* Comments and cleanup
Don't print `%!s(<nil>)` if nil is provided to the "parse maybe" function
Signed-off-by: Natalie Arellano <narellano@vmware.com>
* When exporting, continue to use run image identifier (which could be a digest reference or daemon image ID)
instead of falling back to image name when exporting to a daemon.
Previously, the digest reference was incorrect which caused the daemon not to find the image.
But when provided a correct digest reference the daemon can still find it.
Signed-off-by: Natalie Arellano <narellano@vmware.com>
* Add Contains method to structs that hold run image information for export
When determining if a provided reference is found in existing metadata, remove its digest -
except when setting the new run image "image" in analyzed.toml,
because we should always respect what the extension author wrote.
Signed-off-by: Natalie Arellano <narellano@vmware.com>
* When finding the run image info for export, use the run image "image" (name)
in analyzed.toml as the search key, because the run image "reference" could be a daemon image ID
or include the digest, which isn't helpful when retrieving image names that are supposed to float.
Signed-off-by: Natalie Arellano <narellano@vmware.com>
* Fix detector acceptance and add more logging
Signed-off-by: Natalie Arellano <narellano@vmware.com>
* Fix: use "image" instead of "reference" and also guard against image not found
when we are only updating the reference and target data in analyzed.toml
Signed-off-by: Natalie Arellano <narellano@vmware.com>
* Add comment
Signed-off-by: Natalie Arellano <narellano@vmware.com>
---------
Signed-off-by: Natalie Arellano <narellano@vmware.com>
- Fix daemon invocation by trying to read app image after we have a docker client
- Don't do stack validation for images built on newer platforms
Signed-off-by: Natalie Arellano <narellano@vmware.com>
* ci(lint): auto lint fixes
Signed-off-by: Michael de Senna <desenna@gmail.com>
* fix: replace deprecated funcs
Signed-off-by: Michael de Senna <desenna@gmail.com>
* ci(lint): fix many io/ioutil staticcheck
Signed-off-by: Michael de Senna <desenna@gmail.com>
* fix: import os
Signed-off-by: Michael de Senna <desenna@gmail.com>
Signed-off-by: Michael de Senna <desenna@gmail.com>
Signed-off-by: Natalie Arellano <narellano@vmware.com>
Co-authored-by: Natalie Arellano <narellano@vmware.com>
* Allow storing multiple commands instead of a single string (#900)
* Allow storing multiple commands instead of a single string
This is a first step to implementing #322. This PR is updating our internal structs to allow for a slice of commands while keeping the external API and behavior the same. A future PR will implement handling multiple commands depending on the API version and changing the behavior of the launcher and metadat file output changes.
Signed-off-by: Jesse Brown <jabrown85@gmail.com>
* Comment on usage of cmp.Option
Signed-off-by: Jesse Brown <jabrown85@gmail.com>
* Add comment on Matches interface usage for testing
Signed-off-by: Jesse Brown <jabrown85@gmail.com>
* Added test for launch.toml decoding branching logic
Signed-off-by: Jesse Brown <jabrown85@gmail.com>
* Apply suggestions from code review
Signed-off-by: Jesse Brown <jabrown85@gmail.com>
Co-authored-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Jesse Brown <jabrown85@gmail.com>
* fixup! Apply suggestions from code review
* fixup! Apply suggestions from code review
* Fix editing daemon settings
Signed-off-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Jesse Brown <jabrown85@gmail.com>
Signed-off-by: Natalie Arellano <narellano@vmware.com>
Co-authored-by: Natalie Arellano <narellano@vmware.com>
* WIP
Signed-off-by: Natalie Arellano <narellano@vmware.com>
* Fixing up existing tests
Signed-off-by: Jesse Brown <jabrown85@gmail.com>
* Remove now unused process specific decode paths
Signed-off-by: Jesse Brown <jabrown85@gmail.com>
* fixup! Remove now unused process specific decode paths
Signed-off-by: Jesse Brown <jabrown85@gmail.com>
* fixup! Remove now unused process specific decode paths
Signed-off-by: Jesse Brown <jabrown85@gmail.com>
* fixup! Remove now unused process specific decode paths
Signed-off-by: Jesse Brown <jabrown85@gmail.com>
* fixup! Remove now unused process specific decode paths
Signed-off-by: Jesse Brown <jabrown85@gmail.com>
* fixup! Remove now unused process specific decode paths
Signed-off-by: Jesse Brown <jabrown85@gmail.com>
* Clean up more serialization paths
Signed-off-by: Jesse Brown <jabrown85@gmail.com>
* Remove toml wrapping code
Signed-off-by: Jesse Brown <jabrown85@gmail.com>
* Added comment on UnmarshalTOML
Signed-off-by: Jesse Brown <jabrown85@gmail.com>
* Put back code I didn't mean to remove
Signed-off-by: Jesse Brown <jabrown85@gmail.com>
* Update launch/launch.go
Co-authored-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Jesse Brown <jabrown85@gmail.com>
* removed line
Signed-off-by: Jesse Brown <jabrown85@gmail.com>
Signed-off-by: Jesse Brown <jabrown85@gmail.com>
Signed-off-by: Natalie Arellano <narellano@vmware.com>
Co-authored-by: Natalie Arellano <narellano@vmware.com>
* Write sbom.legacy.json files for newer platform api
Signed-off-by: Natalie Arellano <narellano@vmware.com>
* Don't print empty bom for platform 0.9
Signed-off-by: Natalie Arellano <narellano@vmware.com>
* Fix function name
Signed-off-by: Natalie Arellano <narellano@vmware.com>
* Return empty bom for newer platform
Due to limitations of our TOML library, we can't add MarshalTOML to the top-level struct.
Signed-off-by: Natalie Arellano <narellano@vmware.com>
* Use standard capitalization for sbom
Signed-off-by: Natalie Arellano <narellano@vmware.com>