Skip to content

Add synthetic HTTP attack dataset with structured examples and tooling#1

Open
Copilot wants to merge 3 commits into
mainfrom
copilot/add-http-requests-responses-dataset
Open

Add synthetic HTTP attack dataset with structured examples and tooling#1
Copilot wants to merge 3 commits into
mainfrom
copilot/add-http-requests-responses-dataset

Conversation

Copy link
Copy Markdown

Copilot AI commented Oct 28, 2025

Creates a structured dataset of HTTP request/response pairs demonstrating common web security attacks for research, ML training, and security tool validation.

Dataset Structure

  • 6 attack categories: SQL injection, XSS, CSRF, path traversal, command injection, XXE
  • 8 examples with complete HTTP details, attack vectors, payloads, and detection indicators
  • JSON schema for validation and programmatic access
  • Index file with metadata and statistics

Usage

Load and analyze the dataset:

import json
from pathlib import Path

def load_dataset(dataset_path='dataset'):
    examples = []
    for category_dir in Path(dataset_path).iterdir():
        if category_dir.is_dir():
            for example_file in category_dir.glob('*.json'):
                try:
                    with open(example_file, 'r') as f:
                        examples.append(json.load(f))
                except json.JSONDecodeError as e:
                    print(f"Error parsing {example_file}: {e}")
    return examples

dataset = load_dataset()
# Access attack details: method, URL, headers, body, payload, indicators

Example Entry

Each attack includes:

  • HTTP request/response (method, URL, headers, body, status)
  • Attack vector explanation
  • Malicious payload extraction
  • Detection indicators for security tools

JavaScript examples also provided in examples/load_dataset.js.

Original prompt

this is repository to store a dataset of examples of http requests and responses of malicious attacks in several categories


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits October 28, 2025 13:52
Co-authored-by: rodolfovalentim <3588086+rodolfovalentim@users.noreply.github.com>
Co-authored-by: rodolfovalentim <3588086+rodolfovalentim@users.noreply.github.com>
Copilot AI changed the title [WIP] Add dataset of HTTP requests and responses for malicious attacks Add synthetic HTTP attack dataset with structured examples and tooling Oct 28, 2025
Copilot AI requested a review from rodolfovalentim October 28, 2025 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants