Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gh-attestation cmd integration (cli#8698)
* add attestation cmd Signed-off-by: Meredith Lancaster <[email protected]> * add codeowners Signed-off-by: Meredith Lancaster <[email protected]> * update args passed to the attestation cmd Signed-off-by: Meredith Lancaster <[email protected]> * rename file Signed-off-by: Meredith Lancaster <[email protected]> * use gh-attestation branch for passing iostreams from the root Signed-off-by: Meredith Lancaster <[email protected]> * add package security team entry to codeowners Signed-off-by: Meredith Lancaster <[email protected]> * start moving over verify cmd and general verification code Signed-off-by: Meredith Lancaster <[email protected]> * clean up common and verify specific policy code Signed-off-by: Meredith Lancaster <[email protected]> * move artifact package over Signed-off-by: Meredith Lancaster <[email protected]> * start pulling in the github api client wrapper Signed-off-by: Meredith Lancaster <[email protected]> * fix imports Signed-off-by: Meredith Lancaster <[email protected]> * add logger and test packages Signed-off-by: Meredith Lancaster <[email protected]> * add additional packages to support verify command Signed-off-by: Meredith Lancaster <[email protected]> * fix mock api client Signed-off-by: Meredith Lancaster <[email protected]> * clean up mock api client Signed-off-by: Meredith Lancaster <[email protected]> * include missing fields Signed-off-by: Meredith Lancaster <[email protected]> * use correct owner Signed-off-by: Meredith Lancaster <[email protected]> * add more mock api client options Signed-off-by: Meredith Lancaster <[email protected]> * add download cmd Signed-off-by: Meredith Lancaster <[email protected]> * add inspect cmd Signed-off-by: Meredith Lancaster <[email protected]> * pass factory object to inspect cmd, add inspect sub cmd to attestation cmd Signed-off-by: Meredith Lancaster <[email protected]> * add verify-tuf-root cmd Signed-off-by: Meredith Lancaster <[email protected]> * pass iostream struct from command Signed-off-by: Meredith Lancaster <[email protected]> * rename logger pkg to logger Signed-off-by: Meredith Lancaster <[email protected]> * fix path in codeowners Signed-off-by: Meredith Lancaster <[email protected]> * formatter Signed-off-by: Meredith Lancaster <[email protected]> * go mod tidy Signed-off-by: Meredith Lancaster <[email protected]> * fix printf linter issue Signed-off-by: Meredith Lancaster <[email protected]> * fix printf linter issue Signed-off-by: Meredith Lancaster <[email protected]> * check user's GH host for compatibility Signed-off-by: Meredith Lancaster <[email protected]> * pass oci client to commands directly Signed-off-by: Meredith Lancaster <[email protected]> * rename command Signed-off-by: Meredith Lancaster <[email protected]> * mark tuf-root-verify cmd hidden Signed-off-by: Meredith Lancaster <[email protected]> * move client initialization back to subcommands Signed-off-by: Meredith Lancaster <[email protected]> * add more verbose options and logging Signed-off-by: Meredith Lancaster <[email protected]> * add missing logger Signed-off-by: Meredith Lancaster <[email protected]> * add testing around OCI and API client Signed-off-by: Meredith Lancaster <[email protected]> * add integration test Signed-off-by: Meredith Lancaster <[email protected]> * fix file path Signed-off-by: Meredith Lancaster <[email protected]> * fix command Signed-off-by: Meredith Lancaster <[email protected]> * build executable before integration test Signed-off-by: Meredith Lancaster <[email protected]> * split integration tests Signed-off-by: Meredith Lancaster <[email protected]> * remove integration test steps Signed-off-by: Meredith Lancaster <[email protected]> * fix flag value Signed-off-by: Meredith Lancaster <[email protected]> * run integration tests on ubuntu for now Signed-off-by: Meredith Lancaster <[email protected]> * pull over doc updates Signed-off-by: Meredith Lancaster <[email protected]> * delete unused test data Signed-off-by: Meredith Lancaster <[email protected]> * remove Go patch version Signed-off-by: Meredith Lancaster <[email protected]> * switch assert to require Signed-off-by: Meredith Lancaster <[email protected]> * rename file Signed-off-by: Meredith Lancaster <[email protected]> * move integration tests to prexisting test workflow Signed-off-by: Meredith Lancaster <[email protected]> * use platform matrix for integration tests Signed-off-by: Meredith Lancaster <[email protected]> * simplify build step Signed-off-by: Meredith Lancaster <[email protected]> * use StringEnumFlag handling Signed-off-by: Meredith Lancaster <[email protected]> * typo Signed-off-by: Meredith Lancaster <[email protected]> * use the iostreams.Test helper func Signed-off-by: Meredith Lancaster <[email protected]> * create interface for oci client Signed-off-by: Meredith Lancaster <[email protected]> * add tests for oci client Signed-off-by: Meredith Lancaster <[email protected]> * rename files Signed-off-by: Meredith Lancaster <[email protected]> * format file Signed-off-by: Meredith Lancaster <[email protected]> * fix shellcheck issues Signed-off-by: Meredith Lancaster <[email protected]> * use testing TempDir method Signed-off-by: Meredith Lancaster <[email protected]> * cleanup unused tempdir handling Signed-off-by: Meredith Lancaster <[email protected]> * use table driven tests Signed-off-by: Meredith Lancaster <[email protected]> * check correct cmd Signed-off-by: Meredith Lancaster <[email protected]> * support repo option in download sub cmd Signed-off-by: Meredith Lancaster <[email protected]> * switch over to using RunE Signed-off-by: Meredith Lancaster <[email protected]> * unexport top level subcommand funcs Signed-off-by: Meredith Lancaster <[email protected]> * add comment around keychain option Signed-off-by: Meredith Lancaster <[email protected]> * update comments Signed-off-by: Meredith Lancaster <[email protected]> * fix inconsistent naming Signed-off-by: Meredith Lancaster <[email protected]> * add tests for CLI commands Signed-off-by: Meredith Lancaster <[email protected]> * check for noattestationsfound err Signed-off-by: Meredith Lancaster <[email protected]> * try out metadata abstraction instead Signed-off-by: Meredith Lancaster <[email protected]> * switch to using MetadataStore abstraction Signed-off-by: Meredith Lancaster <[email protected]> * include test case with failing metadata store Signed-off-by: Meredith Lancaster <[email protected]> * look for err specific to file write Signed-off-by: Meredith Lancaster <[email protected]> * unexport fields Signed-off-by: Meredith Lancaster <[email protected]> * return err when an unsupported hash alg is provided Signed-off-by: Meredith Lancaster <[email protected]> * PrintTableToStdOut returns err when rendering fails Signed-off-by: Meredith Lancaster <[email protected]> * start adding sigstore verifier unit tests Signed-off-by: Meredith Lancaster <[email protected]> * add more sigstore verifier specific tests Signed-off-by: Meredith Lancaster <[email protected]> * use cli table printer Signed-off-by: Meredith Lancaster <[email protected]> * return JSON results in slice instead of table Signed-off-by: Meredith Lancaster <[email protected]> * move mock client to test file Signed-off-by: Meredith Lancaster <[email protected]> * remove unneeded table printer method Signed-off-by: Meredith Lancaster <[email protected]> * add initial tests for tufrootverify cmd Signed-off-by: Meredith Lancaster <[email protected]> * formatting Signed-off-by: Meredith Lancaster <[email protected]> * cleanup method Signed-off-by: Meredith Lancaster <[email protected]> * close file in error handling branch Signed-off-by: Meredith Lancaster <[email protected]> * normalize artifact path Signed-off-by: Meredith Lancaster <[email protected]> * remove unneeded embedded file system Signed-off-by: Meredith Lancaster <[email protected]> * include image name reference err Signed-off-by: Meredith Lancaster <[email protected]> * use GH_DEBUG value for io handling Signed-off-by: Meredith Lancaster <[email protected]> * remove quiet and verbose flags Signed-off-by: Meredith Lancaster <[email protected]> * add more tufrootveriify tests Signed-off-by: Meredith Lancaster <[email protected]> * GitHubTUFOptions no longer needs to return error Signed-off-by: Meredith Lancaster <[email protected]> * remove unneeded slice Signed-off-by: Meredith Lancaster <[email protected]> * normalize all relative paths Signed-off-by: Meredith Lancaster <[email protected]> * clean up nil client checks Signed-off-by: Meredith Lancaster <[email protected]> * set api server based on host Signed-off-by: Meredith Lancaster <[email protected]> * add comment about http client Signed-off-by: Meredith Lancaster <[email protected]> * use format flag to handle json output in verify cmd Signed-off-by: Meredith Lancaster <[email protected]> * use format flag to handle json output Signed-off-by: Meredith Lancaster <[email protected]> * use normalized path for cli test arg Signed-off-by: Meredith Lancaster <[email protected]> * add tests for json output Signed-off-by: Meredith Lancaster <[email protected]> * cleanup error wrapping Signed-off-by: Meredith Lancaster <[email protected]> * use test fixtures correctly by normalizing path Signed-off-by: Meredith Lancaster <[email protected]> * dont clean Signed-off-by: Meredith Lancaster <[email protected]> * escape backwards slash for windows files with replace Signed-off-by: Meredith Lancaster <[email protected]> * use strings.Split func Signed-off-by: Meredith Lancaster <[email protected]> * use strings.Replace for all command tests Signed-off-by: Meredith Lancaster <[email protected]> * use CLI cache dir to store tuf metadata Signed-off-by: Meredith Lancaster <[email protected]> * Tweaked docstrings for gh attestation download * Tweaked docstrings for gh attestation verify * Fix for bug in gh attestation where the wrong hostname was being passed to the API client. * lets hide tuf-root-verify eh? * Forgot verify's short str. * add remote verification test Signed-off-by: Meredith Lancaster <[email protected]> * Revert "add remote verification test" This reverts commit c0ceb99. * update json result handling Signed-off-by: Meredith Lancaster <[email protected]> * add json tags to struct returned by command Signed-off-by: Meredith Lancaster <[email protected]> * fix how json results are handled Signed-off-by: Meredith Lancaster <[email protected]> * add test to ensure JSON output is valid Signed-off-by: Meredith Lancaster <[email protected]> --------- Signed-off-by: Meredith Lancaster <[email protected]> Co-authored-by: Phill MV <[email protected]>
- Loading branch information