Metadata-Version: 2.4
Name: qtara
Version: 0.4.0
Summary: [DEPRECATED: final release] TARA registry and STIX export for neural security. Use https://qinnovate.com/api/stix.json instead.
Author: Qinnovate
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/qinnovates/neurosecurity
Project-URL: Source, https://github.com/qinnovates/neurosecurity/tree/main/datalake/qtara
Project-URL: Bug Tracker, https://github.com/qinnovates/neurosecurity/blob/main/SECURITY.md
Classifier: Development Status :: 7 - Inactive
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Topic :: Security
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pydantic>=2.0.0
Requires-Dist: stix2>=3.0.0
Requires-Dist: rich>=13.0.0
Dynamic: license-file

# qtara

> **Deprecated.** qtara is no longer maintained. **0.4.0 (2026-10-17) is the final release**, and its bundled registry will not be updated.
>
> Use the public data instead, which stays current:
> - STIX 2.1 bundle: <https://qinnovate.com/api/stix.json>
> - Full registry as JSON: <https://qinnovate.com/api/tara.json>
> - Source of truth: [`datalake/qtara-registrar.json`](https://github.com/qinnovates/neurosecurity/blob/main/datalake/qtara-registrar.json)
>
> Why: almost no one installs the package, and every registry change had to be mirrored in it. TARA, NISS and QIF are a proposed framework that has not been independently validated; the package will be reconsidered if outside users ask for a Python client.

**Threat Analysis & Risk Assessment (TARA)** framework for Neural Security.

The `qtara` package provides programmatic access to a snapshot of the TARA registry (176 techniques as of 0.4.0), NISS (Neural Impact Scoring System) scores, physics feasibility tiers, and STIX 2.1 export.

## Installation

```bash
pip install qtara
```

## Features

- **TARA Registry:** Query a snapshot of 176 proposed BCI threat techniques with enrichment data. Most are theoretical; check each technique's evidence tier.
- **Physics Feasibility Tiers:** Filter techniques by physics feasibility (T0: feasible now, T1: mid-term, T2: far-term, T3: no physics gate).
- **NISS Scorer:** Calculate neural impact scores based on physics-derived metrics.
- **CVSS + Neurorights:** Access CVSS 4.0 mappings and neuroright impact data per technique.
- **STIX 2.1:** Export threat data for industry-standard security tools.
- **CLI:** Instant access to threat intelligence from the terminal.

## Quick Start

```python
from qtara.core import TaraLoader

loader = TaraLoader()
loader.load()

# List all techniques
techniques = loader.list_techniques()
print(f"{len(techniques)} techniques loaded")

# Get a specific technique
t = loader.get_technique("QIF-T0001")
print(t.attack, t.severity, t.physics_feasibility.tier_label)

# Filter by physics tier
tier0 = loader.list_by_physics_tier(0)
print(f"{len(tier0)} techniques feasible now")

# Filter by severity
critical = loader.list_by_severity("critical")
print(f"{len(critical)} critical techniques")

# Get statistics
stats = loader.get_statistics()
print(stats)
```

## CLI Usage

```bash
# List all techniques
qtara list

# Filter by physics feasibility tier (0=feasible now, 1=mid-term, 2=far-term, 3=no gate)
qtara list --tier 0

# Filter by severity
qtara list --severity critical

# Filter by neural band
qtara list --band N1

# Get detailed info for a technique
qtara info QIF-T0001

# Show statistics
qtara stats

# Export to STIX 2.1
qtara stix --output threats.json

# Get citation
qtara cite
```

## Physics Feasibility Tiers

Each technique is classified by its physics feasibility:

| Tier | Label | Timeline | Description |
|------|-------|----------|-------------|
| T0 | feasible_now | now | Attack is possible with current technology |
| T1 | mid_term | 5-10 years | Requires technology advances expected within a decade |
| T2 | far_term | 10+ years | Requires fundamental breakthroughs |
| T3 | no_physics_gate | n/a | No physics constraint (software/protocol attacks) |

## Development

```bash
git clone https://github.com/qinnovates/neurosecurity
cd neurosecurity/datalake/qtara
pip install -e .
```

## License

Apache-2.0
