INNER CODE UNIT · Go

newAnalyzeGptCommand

Legit-Labs/legitify · cmd/analyze_gpt.go:20

func newAnalyzeGptCommand() *cobra.Command {
	analyzeCmd := &cobra.Command{
		Use:          "gpt-analysis",
		Short:        `Analyze your GitHub/GitLab assets for security issues with GPT`,
		RunE:         executeAnalyzeGPTCommand,
		SilenceUsage: true,
	}

	flags := analyzeCmd.Flags()

	analyzeGptArgs.addCommonCollectionOptions(flags)
	analyzeGptArgs.addOutputOptions(flags)
	flags.StringSliceVarP(&analyzeGptArgs.Organizations, argOrg, "", nil, "specific organizations to collect")
	flags.StringSliceVarP(&analyzeGptArgs.Repositories, argRepository, "", nil, "specific repositories to collect (--repo owner/repo_name (e.g. ossf/scorecard)")
	flags.StringVarP(&analyzeGptArgs.OpenAIToken, argOpenAiToken, "", "", "token to authenticate with openai API")
	viper.AutomaticEnv()

	return analyzeCmd

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…