This repository was archived by the owner on Oct 10, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 140
Provide scanner with image name and info #1194
Open
baude
wants to merge
1
commit into
projectatomic:master
Choose a base branch
from
baude:imageinfo
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a map/dictionary is better suited here.
Like
While most of the time the atomic scanner execute per image, there are options to scan
all(images, containers)
,all_images
,all_containers
as well. With this approach, all the scan_object configs are going to be appended, and it can become complex to map which config belong to which scan_target.The approach for map/dictionary for
inspect_info.json
should help in both cases where a single scan_target or multiple are provided.For single scan_target, using the map/dict will provide scanner with
For multiple scan_target, using the map/dict will provide scanner with
scan_target:scan_target_config
, providing a way to use the information in config and producing correct results intended for scan_targetsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@navidshaikh names can be a PITA if the image has multiple names. how about IDs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@baude : IDs sounds good. With
scan_object.name
I meant the identity of the scan_target.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@baude : Thanks for putting this together.
Regarding
name
of scan_targets I also took a look in the backendutils module, however the scan targets are then transformed into objects.I was wondering if we could shadow the scan_target provided on the command line in the inspect output file.
Given the number of options atomic scan could work with, it can become complex as, if provided
--images
or say--all
, the best choice is to haveID
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about having the
SCAN_TARGET
env variable in the atomic scanner, with values based on populatedscan_target
variable?WDYT?
I'll be happy to collaborate for the PR, if it looks good.