Skip to content

dimitriosGX/copilot-agent-issue-html-exploit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Security Vendor Selection Tool

A Flask-based web application that helps organizations find the right security vendor for their projects based on various requirements including project type, budget, compliance needs, and technical specifications.

Features

  • Interactive form with comprehensive project assessment
  • Real-time progress tracking during vendor analysis
  • Responsive web interface with modern styling
  • Support for various project types, industries, and compliance requirements
  • Budget and timeline considerations
  • Technology stack compatibility assessment
  • Multi-language support: English, Spanish (Español), and French (Français)

Prerequisites

  • Python 3.11 or higher
  • uv package manager

Installation

  1. Install uv (if not already installed):

    curl -LsSf https://astral.sh/uv/install.sh | sh
  2. Clone the repository:

    git clone <repository-url>
    cd <repository-name>
  3. Install dependencies:

    uv sync

Running the Application

Development Mode

Start the Flask development server:

uv run python app.py

The application will be available at http://localhost:5000

Production Mode

For production deployment, you can use a WSGI server like Gunicorn:

# Run with gunicorn
uv run gunicorn -w 4 -b 0.0.0.0:8000 app:app

Usage

  1. Open your browser and navigate to http://localhost:5000
  2. Select your preferred language from the dropdown in the top-right corner (English, Spanish, or French)
  3. Fill out the comprehensive security vendor selection form:
    • Project Information: Name, type, and company size
    • Security Requirements: Assessment types, priority level, budget, and timeline
    • Technical Requirements: Technology stack, complexity, and codebase size
    • Compliance & Industry: Industry type, compliance requirements, and data sensitivity
  4. Click "Find My Security Vendor" to get a recommendation
  5. The system will analyze your requirements and recommend an appropriate security vendor

Development

Adding Dependencies

To add new Python packages:

uv add package-name

Running in Debug Mode

The application runs in debug mode by default when using uv run python app.py. This enables:

  • Automatic reloading on code changes
  • Detailed error messages
  • Debug toolbar (if installed)

Environment Variables

You can set environment variables for configuration:

export FLASK_ENV=development
export FLASK_DEBUG=1
uv run python app.py

API Endpoints

  • GET / - Main application page
  • GET /set-language/<language> - Set the user's language preference (en, es, or fr)
  • POST /api/recommend - Vendor recommendation endpoint (accepts form data and returns JSON)

Internationalization

The application supports three languages:

  • English (en) - Default
  • Spanish (es) - Español
  • French (fr) - Français

Adding New Translations

To add support for a new language:

  1. Extract translatable strings:

    uv run pybabel extract -F babel.cfg -o messages.pot .
  2. Initialize a new language catalog (e.g., German):

    uv run pybabel init -i messages.pot -d translations -l de
  3. Edit the translation file at translations/de/LC_MESSAGES/messages.po

  4. Compile the translations:

    uv run pybabel compile -d translations
  5. Add the language code to BABEL_SUPPORTED_LOCALES in app.py

Updating Existing Translations

After modifying translatable strings in the code:

  1. Update the translation files:

    uv run pybabel update -i messages.pot -d translations
  2. Edit the updated .po files to add new translations

  3. Compile the translations:

    uv run pybabel compile -d translations

About

This repository demonstrates a Copilot Agent prompt injection exploit that automatically inserts a backdoor in a public repository via an Issue created by a third party

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors