Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

HTTP client SDK for Itential Platform and Automation Gateway 4.x. Factory-based sync/async clients with auto-authentication, comprehensive logging, and sensitive data filtering. Production-ready despite beta status.

**Current**: v0.7.0 (2025-12-16) | 3.7k LOC | 100% test coverage | Python 3.10-3.13
**Current**: v0.8.0 (2026-02-25) | 3.7k LOC | 100% test coverage | Python 3.10-3.13

## Architecture

Expand All @@ -18,7 +18,9 @@ Factory pattern creates dynamically-typed clients by composing auth mixins with
- `heuristics.py`: Singleton PII scanner with extensible patterns
- `http.py`: HTTPMethod enum + Request/Response wrappers

**New in 0.7.0**: Connection TTL (`ttl` param forces re-auth after N seconds)
**New in 0.8.0**: License header checking with `make license` and `make license-fix` commands

**Previously in 0.7.0**: Connection TTL (`ttl` param forces re-auth after N seconds)

## Stack

Expand Down
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,43 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.8.0] - 2026-02-25

### Added
- License header checking and enforcement with automated script (#102)
- Thread-safe locking to logger cache access (#106)
- `__slots__` to ConnectionBase, Request, Response classes for 40% memory reduction (#106)

### Changed
- Improved tox configuration with new environments and better organization (#101)
- Enhanced Makefile with additional targets and better documentation (#101)
- Renamed LICENSES.md to NOTICE for better clarity (#100)
- Refactored to idiomatic Python boolean comparisons removing 'is True/False' patterns (#106)
- Simplified complex validation logic for better readability (#106)
- Improved resource cleanup patterns and explicit garbage collection in logging.initialize() (#106)

### Fixed
- Critical TTL re-authentication TOCTOU race condition by moving check inside lock (#106)
- Replaced assert statements with proper runtime validation for production safety (#106)
- Added proper None guards to exception properties instead of raising AttributeError (#106)
- Fixed union type syntax errors in type annotations (#106)
- Fixed potential race conditions in concurrent logger access (#106)

### Performance
- Cached TTL enabled flag to eliminate syscall overhead on every request (~100 cycles saved) (#106)
- Optimized regex pattern compilation to class-level with singleton pattern (#106)
- Replaced RLock with Lock for 2x performance improvement on simple flag protection (#106)
- Implemented proper double-check locking pattern for authentication (#106)

### Documentation
- Updated documentation to reflect current state of the project (#107)
- Condensed CLAUDE.md for better maintainability (#105)
- Updated SECURITY.md with improved best practices (#105)

### Testing
- Achieved 100% test coverage across all modules (#104)
- Added comprehensive test cases for logging and platform modules (#104)

## [0.7.0] - 2025-12-16

### Added
Expand Down
47 changes: 26 additions & 21 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ This document lists all third-party dependencies used in the Itential Python SDK

#### httpx Dependencies

**anyio (4.12.0)**
**anyio (4.12.1)**
- **License**: MIT
- **Description**: High level compatibility layer for multiple asynchronous event loop implementations
- **PyPI**: https://pypi.org/project/anyio/

**certifi (2025.11.12)**
**certifi (2026.2.25)**
- **License**: Mozilla Public License 2.0 (MPL 2.0)
- **Description**: Python package for providing Mozilla's CA Bundle
- **PyPI**: https://pypi.org/project/certifi/
Expand Down Expand Up @@ -57,24 +57,24 @@ This document lists all third-party dependencies used in the Itential Python SDK
- **Description**: Pytest plugin for measuring coverage
- **PyPI**: https://pypi.org/project/pytest-cov/

**coverage (7.13.0)**
**coverage (7.13.4)**
- **License**: Apache License 2.0
- **Description**: Code coverage measurement for Python
- **PyPI**: https://pypi.org/project/coverage/

**tox (4.32.0)**
**tox (4.46.2)**
- **License**: MIT
- **Description**: Tox is a generic virtual environment management and test command line tool
- **PyPI**: https://pypi.org/project/tox/

**tox-uv (1.29.0)**
**tox-uv (1.33.0)**
- **License**: MIT
- **Description**: Use uv with tox for faster virtual environment management
- **PyPI**: https://pypi.org/project/tox-uv/

### Code Quality and Linting

**ruff (0.14.9)**
**ruff (0.15.2)**
- **License**: MIT
- **Description**: An extremely fast Python linter and code formatter
- **PyPI**: https://pypi.org/project/ruff/
Expand All @@ -91,7 +91,7 @@ This document lists all third-party dependencies used in the Itential Python SDK

### Security Analysis

**bandit (1.9.2)**
**bandit (1.9.4)**
- **License**: Apache License 2.0
- **Description**: Security oriented static analyser for python code
- **PyPI**: https://pypi.org/project/bandit/
Expand All @@ -103,7 +103,7 @@ This document lists all third-party dependencies used in the Itential Python SDK
- **Description**: A framework for managing and maintaining multi-language pre-commit hooks
- **PyPI**: https://pypi.org/project/pre-commit/

**build (1.3.0)**
**build (1.4.0)**
- **License**: MIT
- **Description**: A simple, correct Python build frontend
- **PyPI**: https://pypi.org/project/build/
Expand All @@ -115,7 +115,7 @@ This document lists all third-party dependencies used in the Itential Python SDK

### Utility Dependencies

**packaging (25.0)**
**packaging (26.0)**
- **License**: Apache License 2.0 or BSD License
- **Description**: Core utilities for Python packages
- **PyPI**: https://pypi.org/project/packaging/
Expand All @@ -130,7 +130,7 @@ This document lists all third-party dependencies used in the Itential Python SDK
- **Description**: API to interact with the python pyproject.toml based projects
- **PyPI**: https://pypi.org/project/pyproject-api/

**pathspec (0.12.1)**
**pathspec (1.0.4)**
- **License**: Mozilla Public License 2.0 (MPL 2.0)
- **Description**: Utility library for gitignore style pattern matching of file paths
- **PyPI**: https://pypi.org/project/pathspec/
Expand All @@ -145,7 +145,7 @@ This document lists all third-party dependencies used in the Itential Python SDK
- **Description**: Brain-dead simple parsing of ini files
- **PyPI**: https://pypi.org/project/iniconfig/

**tomli (2.3.0)**
**tomli (2.4.0)**
- **License**: MIT
- **Description**: A lil' TOML parser for Python
- **PyPI**: https://pypi.org/project/tomli/
Expand All @@ -155,7 +155,7 @@ This document lists all third-party dependencies used in the Itential Python SDK
- **Description**: Backported and Experimental Type Hints for Python
- **PyPI**: https://pypi.org/project/typing-extensions/

**cachetools (6.2.4)**
**cachetools (7.0.1)**
- **License**: MIT
- **Description**: Extensible memoizing collections and decorators
- **PyPI**: https://pypi.org/project/cachetools/
Expand All @@ -165,7 +165,7 @@ This document lists all third-party dependencies used in the Itential Python SDK
- **Description**: Validate configuration and produce human readable error messages
- **PyPI**: https://pypi.org/project/cfgv/

**identify (2.6.15)**
**identify (2.6.16)**
- **License**: MIT
- **Description**: File identification library for Python
- **PyPI**: https://pypi.org/project/identify/
Expand All @@ -190,12 +190,12 @@ This document lists all third-party dependencies used in the Itential Python SDK
- **Description**: Backport of Python 3.11 asyncio.Runner for older Python versions
- **PyPI**: https://pypi.org/project/backports.asyncio.runner/

**nodeenv (1.9.1)**
**nodeenv (1.10.0)**
- **License**: BSD License
- **Description**: Node.js virtual environment builder
- **PyPI**: https://pypi.org/project/nodeenv/

**virtualenv (20.35.4)**
**virtualenv (20.39.0)**
- **License**: MIT
- **Description**: Virtual Python Environment builder
- **PyPI**: https://pypi.org/project/virtualenv/
Expand All @@ -205,24 +205,24 @@ This document lists all third-party dependencies used in the Itential Python SDK
- **Description**: Distribution utilities for Python
- **PyPI**: https://pypi.org/project/distlib/

**filelock (3.20.1)**
**filelock (3.24.3)**
- **License**: The Unlicense (Unlicense)
- **Description**: A platform independent file lock
- **PyPI**: https://pypi.org/project/filelock/

**platformdirs (4.5.1)**
**platformdirs (4.9.2)**
- **License**: MIT
- **Description**: A small Python module for determining appropriate platform-specific dirs
- **PyPI**: https://pypi.org/project/platformdirs/

**librt (0.7.4)**
**librt (0.8.1)**
- **License**: MIT AND PSF-2.0
- **Description**: Mypyc runtime library with C implementations of Python standard library classes
- **PyPI**: https://pypi.org/project/librt/

### Bandit Dependencies

**rich (14.2.0)**
**rich (14.3.3)**
- **License**: MIT
- **Description**: Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal
- **PyPI**: https://pypi.org/project/rich/
Expand All @@ -232,6 +232,11 @@ This document lists all third-party dependencies used in the Itential Python SDK
- **Description**: Python port of markdown-it
- **PyPI**: https://pypi.org/project/markdown-it-py/

**mdurl (0.1.2)**
- **License**: MIT
- **Description**: Markdown URL utilities
- **PyPI**: https://pypi.org/project/mdurl/

**pygments (2.19.2)**
- **License**: BSD License
- **Description**: Pygments is a syntax highlighting package written in Python
Expand All @@ -242,7 +247,7 @@ This document lists all third-party dependencies used in the Itential Python SDK
- **Description**: YAML parser and emitter for Python
- **PyPI**: https://pypi.org/project/pyyaml/

**stevedore (5.6.0)**
**stevedore (5.7.0)**
- **License**: Apache License 2.0
- **Description**: Manage dynamic plugins for Python applications
- **PyPI**: https://pypi.org/project/stevedore/
Expand Down Expand Up @@ -296,7 +301,7 @@ We gratefully acknowledge the contributions of all open source projects that mak

## License Information Updates

This file was last updated on: 2025-12-22
This file was last updated on: 2026-02-25

For the most current license information, please check the individual project pages linked above. License information is subject to change with new versions of dependencies.

Expand Down
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ We provide security updates for the following versions:

| Version | Supported |
| ------- | ------------------ |
| 0.8.x | :white_check_mark: |
| 0.7.x | :white_check_mark: |
| 0.6.x | :white_check_mark: |
| < 0.6 | :x: |
| < 0.7 | :x: |

## Reporting a Vulnerability

Expand Down
8 changes: 4 additions & 4 deletions src/ipsdk/heuristics.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,20 +110,20 @@ def _init_default_patterns(self) -> None:
r"(?i)\b(?:api[_-]?key|apikey)\s*[=:]\s*[\"']?"
r"([a-zA-Z0-9_\-]{16,})[\"']?"
),
"bearer_token": r"(?i)\bbearer\s+([a-zA-Z0-9_\-\.]{20,})",
"jwt_token": (
"bearer_token": r"(?i)\bbearer\s+([a-zA-Z0-9_\-\.]{20,})", # nosec B105
"jwt_token": ( # nosec B105
r"\b(eyJ[a-zA-Z0-9_\-]+\.eyJ[a-zA-Z0-9_\-]+"
r"\.[a-zA-Z0-9_\-]+)\b"
),
"access_token": (
r"(?i)\b(?:access[_-]?token|accesstoken)\s*[=:]\s*[\"']?"
r"([a-zA-Z0-9_\-]{20,})[\"']?"
),
"password": (
"password": ( # nosec B105
r"(?i)\b(?:password|passwd|pwd)\s*[=:]\s*[\"']?"
r"([^\s\"']{6,})[\"']?"
),
"secret": (
"secret": ( # nosec B105
r"(?i)\b(?:secret|client_secret)\s*[=:]\s*[\"']?"
r"([a-zA-Z0-9_\-]{16,})[\"']?"
),
Expand Down
Loading