x="""
```markdown
    # Codebase Vulnerability and Quality Report: NestJS Movie Application
    
    ## 🚨 Executive Summary
    
    This security audit reveals critical vulnerabilities in our NestJS application that require immediate attention. The findings highlight potential security risks, primarily centered around authentication and secret management. Prompt remediation is crucial to protect the application from potential breaches.
    
    ## Table of Contents
    - [Security Issues](#security-issues)
    - [Recommendations](#recommendations)
    
    ## Security Issues
    
    ### [1] 🔐 JWT Secret Hardcoding (High Risk)
    _File: src/auth/constants.ts_
    
    ```typescript
    export const jwtConstants = {
      secret: 'g5sfljha454sdas6fsf4dasf8',
    };
    ```
    
    #### Vulnerability Details
    - **Risk Level**: High
    - **Impact**: 
      - Potential token forgery
      - Security key exposed in source code
      - Easy compromise if repository is leaked
    
    #### Suggested Fix
    1. Use environment variables for secret management
    2. Never commit secrets to version control
    3. Implement secure secret rotation
    
    ```typescript
    // Recommended approach
    export const jwtConstants = {
      secret: process.env.JWT_SECRET,
    };
    ```
    
    ### [2] 🛡️ Authentication Mechanism Weaknesses
    _File: src/auth/auth.guard.ts_
    
    #### Vulnerability Details
    - Insufficient authentication validation
    - Potential security bypass risks
    - Weak token verification mechanisms
    
    #### Suggested Fix
    1. Implement robust token validation
    2. Add comprehensive authentication middleware
    3. Use strong, cryptographically secure validation methods
    
    ## Recommendations
    
    ### Immediate Actions
    1. Replace hardcoded JWT secret immediately
    2. Generate strong, random secrets
    3. Implement environment-based configuration
    4. Enhance authentication middleware
    5. Conduct thorough security review
    
    ### Long-term Security Strategies
    - Regular security audits
    - Implement multi-factor authentication
    - Use industry-standard authentication libraries
    - Continuous security training for development team
    
    ## Compliance and Best Practices
    
    ✅ Positive Findings:
    - `.gitignore` correctly excludes `.env` files
    - Indicates awareness of basic secret management
    
    ## Conclusion
    
    The identified vulnerabilities pose significant security risks. Immediate action is required to mitigate potential unauthorized access and protect sensitive application data.
    
    ---
    
    **Security Audit Date**: [Current Date]
    **Severity**: HIGH 🚨
    **Recommended Priority**: Immediate Action
    ```
    
    This markdown report provides a comprehensive, structured overview of the security vulnerabilities discovered in the NestJS application. It follows best practices for security documentation, offering clear explanations, code snippets, and actionable recommendations.
    
    The report is designed to be:
    - Easily readable
    - Actionable
    - Structured for quick comprehension
    - Highlighting critical security concerns
    
    Developers can use this report as a roadmap for immediate security improvements.

"""

def extract_markdown_block(text):
    start_token = "```markdown"
    end_token = "```"

    # Find the first ```markdown
    start_index = text.find(start_token)
    if start_index == -1:
        raise ValueError("No '```markdown' block found.")

    # Find the next ``` AFTER the markdown start
    end_index = text.rfind(end_token)
    if end_index == -1 or end_index <= start_index:
        raise ValueError("No closing triple backtick found after '```markdown'.")

    # Adjust start to after ```markdown\n
    start_index += len(start_token)

    # Extract and clean
    markdown_content = text[start_index:end_index].lstrip('\n').rstrip()
    return markdown_content

# Example usage
if x.find("```markdown"):
    markdown_only = extract_markdown_block(x)
print(markdown_only)