SSPROD-2210: Added import_image and anchore_account to SDC CLI#100
Conversation
| except Exception as err: | ||
| print(err) | ||
|
|
||
| def get_anchore_users_account(self): |
There was a problem hiding this comment.
How can this function be useful? Asking only because I have not much context about it (it may be useful to add more color in the description for other users as well).
There was a problem hiding this comment.
This API is needed to fetch the username for running inline-scan. The script uses this API here https://github.com/sysdiglabs/secure-inline-scan/blob/inline-scan/inline_scan.sh#L434
|
|
||
| return [True, res.content] | ||
|
|
||
| def import_image(self, infile): |
There was a problem hiding this comment.
Is there any example (maybe not just using this function) to show how this functionality can be used? I think it can expose very interesting use cases.
There was a problem hiding this comment.
@davideschiera this function is part of the inline-scan solution which is currently in a bash script. This function essentially implements the import image API being used in the script here https://github.com/sysdiglabs/secure-inline-scan/blob/inline-scan/inline_scan.sh#L463
There was a problem hiding this comment.
Can an example (similar to examples/get_anchore_users_account.py) show how to import an image and then do something with it (eg. scan it)?
I was imagine something like that, but I'm not sure if it can be meaningful or useful.
davideschiera
left a comment
There was a problem hiding this comment.
A couple of notes about more examples and info, and a minor renaming.
Nothing that seems blocker for the PR. I'll leave if/when address the comments up to you ;-)
Thanks!
| except Exception as err: | ||
| print(err) | ||
|
|
||
| def get_anchore_users_account(self): |
There was a problem hiding this comment.
Minor: get_anchore_user_account or get_anchore_user_account_details may be more appropriate.
53e78c1 to
decb4e1
Compare
Usage
Anchore User Account
This PR implements import_image and accounts API needed to do inline-scanning. Currently it is in a bash script here https://github.com/sysdiglabs/secure-inline-scan/blob/inline-scan/inline_scan.sh#L463
Import Image