projectdiscovery/nuclei · error

DAST server token must be at least 16 characters long

Error message

DAST server token must be at least 16 characters long

What it means

Error "DAST server token must be at least 16 characters long" thrown in projectdiscovery/nuclei.

Source

Thrown at internal/runner/options.go:297

	return missing
}

func validateMissingGitLabOptions(options *types.Options) []string {
	var missing []string
	if options.GitLabToken == "" {
		missing = append(missing, "GITLAB_TOKEN")
	}
	if len(options.GitLabTemplateRepositoryIDs) == 0 {
		missing = append(missing, "GITLAB_REPOSITORY_IDS")
	}

	return missing
}

func validateDASTOptions(options *types.Options) error {
	// Ensure the DAST server token meets minimum length requirement
	if len(options.DASTServerToken) > 0 && len(options.DASTServerToken) < 16 {
		return fmt.Errorf("DAST server token must be at least 16 characters long")
	}
	return nil
}

// LoadReportingOptionsFromBytes parses YAML reporting-config bytes into a
// *reporting.Options with env-var expansion, matching the CLI's -report-config.
func LoadReportingOptionsFromBytes(data []byte) (*reporting.Options, error) {
	reportingOptions := &reporting.Options{}
	if err := yaml.DecodeAndValidate(bytes.NewReader(data), reportingOptions); err != nil {
		return nil, errors.Wrap(err, "could not parse reporting config file")
	}
	Walk(reportingOptions, expandEndVars)
	return reportingOptions, nil
}

func createReportingOptions(options *types.Options) (*reporting.Options, error) {
	var reportingOptions = &reporting.Options{}
	if options.ReportingConfig != "" {

View on GitHub (pinned to 265b3a3dec)

When it happens

Trigger: Thrown at internal/runner/options.go:297 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of projectdiscovery/nuclei@265b3a3dec (2026-08-15). Data as JSON: /api/errors/7e73fa3f850d28ac. Report an issue: GitHub.