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

feat: Add systemcve cli cmd #177

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

Althaf66
Copy link
Collaborator

Created systemcve command for updating and listing systemcve allowlist.

harbor systemcve update
Screenshot from 2024-08-20 11-24-35

harbor systemcve list
Screenshot from 2024-08-20 11-18-18

@Althaf66
Copy link
Collaborator Author

Althaf66 commented Sep 5, 2024

ready for review

@Vad1mo Vad1mo requested a review from amands98 September 5, 2024 16:03
@Vad1mo
Copy link
Member

Vad1mo commented Sep 10, 2024

harbor security-hub
harbor scanners
harbor scan-schedule

@Vad1mo
Copy link
Member

Vad1mo commented Sep 10, 2024

For this PR I would suggest calling it

harbor cve-allowlist list/add

}
var unixTimestamp int64
if opts.IsExpire {
expiresAt, err := time.Parse("01/02/2006", opts.ExpireDate)
Copy link
Member

Choose a reason for hiding this comment

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

use ISO 8601 as default: with
YYYY-MM-DD


@Althaf66 Althaf66 requested a review from Vad1mo November 22, 2024 18:31
func CVEAllowlist() *cobra.Command {
cmd := &cobra.Command{
Use: "cve-allowlist",
Short: "Manage system CVE allowlist",
Copy link
Member

Choose a reason for hiding this comment

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

	Short:   "Manage system CVE allowlist",
	Long:    `Manage system level allowlist of CVE`,

The description is almost the same, maybe we can have a longer explanation.

}

flags := cmd.Flags()
flags.BoolVarP(&opts.IsExpire, "isexpire", "i", false, "Systemcve allowlist expire or not")
Copy link
Member

Choose a reason for hiding this comment

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

This text makes no sense: "Systemcve allowlist expire or not"

flags := cmd.Flags()
flags.BoolVarP(&opts.IsExpire, "isexpire", "i", false, "Systemcve allowlist expire or not")
flags.StringVarP(&opts.CveId, "cveid", "n", "", "CVE ids seperate with commas")
flags.StringVarP(&opts.ExpireDate, "expiredate", "d", "", "If it expire,give Expiry date in the format MM/DD/YYYY")
Copy link
Member

Choose a reason for hiding this comment

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

This text makes little sense without deep context "If it expire,give Expiry date in the format MM/DD/YYYY"

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.

2 participants