T09 · Insecure Skill Coding Practices
- Location
prompts/01-patient-acquisition-campaigns.md:20- Finding
Mandatory Footer Can Generate False Certification and Credential Claims
- Content
View full analysis
Vulnerability Details
File Location:
prompts/01-patient-acquisition-campaigns.md, lines 20, 42, and 100–102
Vulnerability Type: Inconsistent validation and unconditional rendering of regulated credentials
Risk Level: MediumVulnerable Code Snippet
text **Gate 3 — LegitScript notation:** If any digital delivery channel is mentioned (email with click-to-website, SMS with URL, etc.), flag that paid digital advertising requires active LegitScript certification separately.text - LegitScript status: [ACTIVE (cert #: [NUMBER], expiration: [DATE]) / PENDING / NOT CERTIFIED]text ## MANDATORY COMPLIANCE FOOTER (include on all outputs) *[FACILITY_NAME] is licensed by the Nevada Division of Public and Behavioral Health (DPBH License #[DPBH_LICENSE]). [ACCREDITATION_BODY] accredited (#[ACCREDITATION_NUMBER]). LegitScript certified (#[LEGITSCRIPT_NUMBER]). Medical Director: [MD_NAME], MD, [BOARD_CERT], NV Medical Board #[NV_MB_NUMBER]. This communication does not constitute a guarantee of treatment outcomes. Individual results vary based on diagnosis, co-occurring conditions, treatment engagement, and post-treatment support.*Technical Analysis
The prompt explicitly accepts
PENDINGandNOT CERTIFIEDas possible LegitScript input states. Gate 3 only requires a warning when certain digital delivery channels are involved; it does not block offline campaigns for facilities without active certification.However, the prompt later requires the same footer on every output. That footer unconditionally states that the facility is “LegitScript certified” and also unconditionally asserts accreditation and medical-director credentials. These claims are not conditionally rendered according to verification status.
This creates a validation-to-output inconsistency: an input may truthfully indicate that certification is pending or absent, yet the generated output is instructed to claim active certification. Similar false claims may ...[truncated 1600 chars]
- Remediation
View remediation
Remediation Suggestions
-
Replace the unconditional footer with status-aware conditional rendering:
- Include “LegitScript certified” only when the status is explicitly
ACTIVE. - Require a nonempty certification number and unexpired date.
- Omit the claim or accurately state
pendingornot certifiedfor other states.
- Include “LegitScript certified” only when the status is explicitly
-
Add equivalent validation gates for every footer credential:
- Active DPBH license and matching service scope.
- Current accreditation and covered service lines.
- Verified medical-director license and board certification.
- Correct identity and credential-number format.
-
Fail closed when required verification data is missing, contradictory, expired, or malformed. Do not infer that placeholder values represent verified credentials.
-
Separate footer templates by verified status. For example:
- Active certification: include the verified certification claim and number.
- Pending certification: state that certification is pending only if appropriate.
- No certification: omit all certification language and warn that the content cannot be used as paid addiction-treatment advertising.
-
Add explicit prompt tests for:
- Active certification with valid number and expiration date.
- Pending certification.
- Expired certification.
- No certification.
- Missing or malformed certification number.
- Missing or unverified accreditation and medical credentials.
-
Require a final consistency check that compares every generated credential claim against the supplied, verified input before returning content.
-
