
    kiA                     d    d Z ddgg dddgddgdd	gd
dgg dg dg dg dg dg ddZd Zd ZdS )zr
Centralized suggestion/remediation mapping for security findings.
Each finding keyword maps to helpful guidance.
z+Add HSTS header to force HTTPS connections.zGExample: Strict-Transport-Security: max-age=31536000; includeSubDomains)z3Implement CSP to prevent XSS and injection attacks.z>Start with a restrictive policy and gradually relax as needed.zWExample: Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline'z4Set X-Frame-Options to prevent clickjacking attacks.z6Recommended value: X-Frame-Options: DENY or SAMEORIGINzBAdd X-Content-Type-Options: nosniff to prevent MIME type sniffing.z8This forces browsers to respect the Content-Type header.z@Set Referrer-Policy to control how much referrer info is shared.z=Recommended: Referrer-Policy: strict-origin-when-cross-originzUAdd X-Frame-Options header or Content-Security-Policy with frame-ancestors directive.zHThis prevents your site from being embedded in iframes on other domains.)z>Sanitize and validate all user input before rendering to HTML.zCUse context-aware output encoding (HTML, JavaScript, URL encoding).z<Consider using a template engine with auto-escaping enabled.)zCAvoid using innerHTML with untrusted data; use textContent instead.zMSanitize DOM queries (document.getElementById, etc.) with trusted input only.z3Use a library like DOMPurify for HTML sanitization.)z0Update the library to the latest stable version.zFCheck the library's changelog for security fixes and breaking changes.z,Test thoroughly after updating dependencies.)z$Fix or remove broken internal links.z!Update or redirect outdated URLs.z?Use a link checker tool periodically to catch new broken links.)z>Review robots.txt to ensure sensitive paths are not disclosed.z?Consider removing sensitive path hints (e.g., /admin, /backup).zCUse authentication and proper access controls instead of obscurity.)z>Remove hardcoded API keys, secrets, and credentials from code.z?Use environment variables or secure secret management services.zKScan code repositories regularly with tools like git-secrets or truffleHog.)z)Missing Header: Strict-Transport-Securityz'Missing Header: Content-Security-PolicyzMissing Header: X-Frame-Optionsz&Missing Header: X-Content-Type-OptionszMissing Header: Referrer-Policyz5VULNERABILITY: Site may be vulnerable to Clickjackingz"VULNERABILITY: Reflected XSS foundz%VULNERABILITY: DOM-based XSS detectedOUTDATEDzBroken Link FoundzHrobots.txt contains disallowed paths that may expose sensitive endpointszPotential sensitive data foundc                 T    t                                           D ]\  }}|| v r|c S g S )zs
    Return a list of suggestions for a given finding.
    Searches for matching keywords in the finding text.
    )SUGGESTIONSitems)finding_textkeywordsuggestions_lists      //home/asher/public_html/security/suggestions.pyget_suggestionsr
   @   sF    
 &1%6%6%8%8 $ $!!l""#### #I    c                     t          |           }|r:t          d           t          |d          D ]\  }}t          d| d|            dS dS )z=
    Print suggestions for a finding in a formatted way.
    u     📋 SUGGESTIONS:   z    z. N)r
   print	enumerate)r   suggestionsi
suggestions       r	   print_suggestionsr   J   s{     ",//K ,#$$$&{A66 	, 	,MAz***j**++++, ,	, 	,r   N)__doc__r   r
   r    r   r	   <module>r      s     	6Q20 0 0 	?@(
 	MB/
 	KG(
 	`R>+ + +
. . .
  
  
Q Q Q
' ' 'g8 8t  , , , , ,r   