Civic Transparency CWE Types
Immutable, typed result objects for CWE, Standards, and Schema workflows.
Provides strongly-typed Python models for Common Weakness Enumeration (CWE) analysis, standards framework mappings, and schema validation workflows.
Features
- Zero Dependencies - Pure Python with no external requirements
- Immutable Design - Functional-style helpers return new instances
- Type Safety - Full static typing with
py.typedmarker - Composable - Small building blocks for complex workflows
- Memory Efficient - Frozen dataclasses for better performance
Installation
pip install civic-transparency-py-cwe-types
Requirements: Python 3.12+
Quick Start
from ci.transparency.cwe.types.cwe.results import CweLoadingResult, add_cwe
# Create immutable result objects
result = CweLoadingResult()
result = add_cwe(result, "CWE-79", {
"id": "CWE-79",
"name": "Cross-site Scripting",
"category": "injection"
})
print(f"Loaded CWEs: {result.cwe_count}")
print(f"Has errors: {result.messages.has_errors}")
What's Included
| Domain | Purpose | Key Results |
|---|---|---|
| CWE | Load, validate, analyze CWE data | CweLoadingResult, CweValidationResult, CweRelationshipResult |
| Standards | Framework loading & CWE mappings | StandardsLoadingResult, StandardsMappingResult |
| Schema | Generic schema operations | SchemaLoadingResult, SchemaValidationResult |
| CWE Schema | Domain-specific CWE schema validation | CweSchemaLoadingResult, CweSchemaValidationResult |
Documentation
- Usage Guide - Detailed examples and patterns
- API Reference - Complete module documentation
- Contributing - Development guidelines
Development
git clone https://github.com/civic-interconnect/civic-transparency-py-cwe-types
cd civic-transparency-py-cwe-types
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
uv sync --extra dev --extra docs
Run tests:
uv run pytest
uv run pyright src/
Versioning
This specification follows semantic versioning. See CHANGELOG.md for version history.
License
MIT © Civic Interconnect
Metadata
Release files for civic-transparency-cwe-types 0.0.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| civic_transparency_cwe_types-0.0.12.tar.gz | 781.2 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| civic_transparency_cwe_types-0.0.12-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 834.4 kB
Release files / civic_transparency_cwe_types-0.0.12.tar.gz
| Download URL | civic_transparency_cwe_types-0.0.12.tar.gz |
|---|---|
| Size | 781.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
53fc6eac7d8038ebb08c5ef713218f79a81f18c9dcf30d10e6a28077cb07ebd9
|
|
BLAKE2b-256 checksum How to use checksums |
82d3654835dadcc8834deb35b654bd215f9d9e781edf9a29f07545a8ea254627
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 11, 2025.
Transparency logRelease files / civic_transparency_cwe_types-0.0.12-py3-none-any.whl
| Download URL | civic_transparency_cwe_types-0.0.12-py3-none-any.whl |
|---|---|
| Size | 53.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2e1945ca3335c8c6926bbf32b43042e7a9409f5feae7cdd774c9542658003d18
|
|
BLAKE2b-256 checksum How to use checksums |
22c923496433cb25a5771fedf10e5f8147f21401adb23e6ad286e104c7a517e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 11, 2025.
Transparency logSecurity for civic-transparency-cwe-types 0.0.12
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for civic_transparency_cwe_types-0.0.12.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 11, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.