Skip to content

Latest commit

 

History

History
69 lines (54 loc) · 1.36 KB

File metadata and controls

69 lines (54 loc) · 1.36 KB

ContextShield Architecture

Overview

ContextShield is a defensive scanning tool designed to inspect files and folders before they are shared externally.

Its main responsibilities are:

  • discover files to scan
  • filter unsupported or ignored paths
  • run detectors on file contents
  • score findings
  • redact sensitive output
  • generate terminal, JSON, and HTML reports

Main Components

CLI

Parses command-line arguments and starts the scan workflow.

Config

Loads and validates user configuration such as:

  • ignored paths
  • allowed internal domains
  • max file size
  • enabled detectors
  • severity threshold
  • include/exclude extensions

Scanner

Responsible for:

  • file discovery
  • file loading
  • text-file checks
  • duplicate suppression
  • scan orchestration

Detectors

Each detector focuses on a specific class of risk, such as:

  • secrets
  • prompt injection
  • internal references
  • encoded blobs

Redaction

Sensitive values are masked before being shown in reports.

Reporting

ContextShield supports:

  • terminal output
  • JSON reports
  • HTML reports

Design Goals

  • defensive-only
  • predictable behavior
  • safe output by default
  • clear reporting
  • simple configuration
  • practical performance

Non-Goals

ContextShield does not aim to:

  • exploit systems
  • bypass protections
  • perform offensive actions
  • extract hidden data through intrusive behavior