Skip to main content

Civic Transparency CWE Types

Docs PyPI Python 3.12+ CI Status License: MIT security: bandit

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.typed marker
  • 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

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)

Source distribution for civic-transparency-cwe-types 0.0.12
File Size Uploaded Provenance
civic_transparency_cwe_types-0.0.12.tar.gz 781.2 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for civic-transparency-cwe-types 0.0.12
File Interpreter ABI Platform
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 log

Release 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 log

Security 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.

Select from 2 files

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 log

A 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.

Release history Release notifications | RSS feed

This release

0.0.12 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page