Fixes #5567 - Template Profile Improvements
This PR implements all three features requested for template profile improvements with a type-safe, robust approach that addresses gaps in the competing implementation (PR #6804).
ProfileID, ProfileName, ProfilePurpose, ProfileDescription to Options structTargetsInline field (list: in YAML) for embedded target list contentlist: |InlineSecrets field with proper InlineSecretsConfig type (not interface{} like PR #6804)static and dynamic secrets sectionsOptions.Copy() copies all new fields - PR #6804 forgot to copy InlineSecrets in the Copy method, causing secrets to be lost when options are cloned*InlineSecretsConfig instead of interface{} for better compile-time safetyTargetsInline field instead of checking for newlines in file pathsOptions.Copy() to ensure new fields are copied# Profile metadata (Feature 1)
id: projectdiscovery-scan
name: "PD Infrastructure Scan"
purpose: "Security assessment"
description: "Complete configuration for PD targets"
# Inline targets (Feature 2)
list: |
cve.projectdiscovery.io
chaos.projectdiscovery.io
api.projectdiscovery.io
# Standard nuclei options
timeout: 30
retries: 2
type:
- http
- tcp
severity:
- critical
- high
# Inline secrets (Feature 3)
secrets:
static:
- type: header
domains:
- api.projectdiscovery.io
headers:
- key: x-pdcp-key
value: <api-key>
dynamic:
- template: custom-oauth-flow.yaml
variables:
- name: username
value: pdteam
Options.Copy() correctly copies all new fields/claim #5567
New Features
Tests
Simplereally
@Simplereally
ProjectDiscovery
@projectdiscovery
starmovie12
@starmovie12