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

Revisit Scan API model to allow for ScanConfig expand, snapshot and summary #92

Merged
merged 3 commits into from
Mar 1, 2023

Conversation

ghost
Copy link

@ghost ghost commented Mar 1, 2023

No description provided.

@akpsgit akpsgit merged commit d8d864f into main Mar 1, 2023
@akpsgit akpsgit deleted the scan_summary branch March 1, 2023 17:28
@@ -40,7 +40,7 @@ type Scan struct {
// ScanConfigID The ID of the config that this scan was initiated from (optionanl)
ScanConfigID *string `json:"scan_config_id,omitempty" gorm:"column:scan_config_id"`
// ScanFamiliesConfig The configuration of the scanner families within a scan config
ScanFamiliesConfig []byte `json:"scan_families_config,omitempty" gorm:"column:scan_families_config"`
ScanConfigSnapshot []byte `json:"scan_families_config,omitempty" gorm:"column:scan_families_config"`
Copy link
Member

Choose a reason for hiding this comment

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

@sambetts-cisco @akpsgit need to fix the json and gorm tags (scan_families_config)

Copy link
Contributor

Choose a reason for hiding this comment

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

also the comment needs fixing

reason := models.ScanStateReasonNothingToScan
scan := &models.Scan{
EndTime: &t,
State: utils.PointerTo[models.ScanState](models.Done),
Copy link
Member

Choose a reason for hiding this comment

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

@sambetts-cisco I think that just calling utils.PointerTo(models.Done) will also do the work

TargetIDs: targetIds,
State: utils.PointerTo[models.ScanState](models.Discovered),
StateMessage: utils.PointerTo[string]("Targets for scan successfully discovered"),
Summary: &models.ScanSummary{
Copy link
Contributor

@fishkerez fishkerez Mar 2, 2023

Choose a reason for hiding this comment

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

why do we need to define the summary again if it is not changed?

@fishkerez fishkerez mentioned this pull request Mar 5, 2023
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.

None yet

4 participants