Skip to content

Commit 873690a

Browse files
committed
chore: update changelog and documentation for v0.8.0-alpha
- Updated CHANGELOG.md to reflect breaking changes and new features. - Enhanced README.md to describe AES-256-GCM encryption. - Modified pyproject.toml to set version to 0.8.0-alpha. - Updated todo.md with cleanup tasks.
1 parent a529724 commit 873690a

4 files changed

Lines changed: 39 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,41 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [Unreleased] - 2026-01-06
8+
## [0.8.0-alpha] - 2026-01-10
9+
10+
### BREAKING CHANGES
11+
12+
- **Metadata Schema Update:** Upgraded metadata.json from v1.0 to v2.0 to support integrity verification hashes. Backward compatible - existing v1.0 metadata will be migrated automatically.
13+
- **Encryption Migration:** Migrated from OpenSSL subprocess calls to the `cryptography` library with AES-256-GCM authenticated encryption. This is a breaking change - **old .enc files encrypted with OpenSSL will not be decryptable** with the new version. Users should decrypt any existing encrypted backups before upgrading or keep the old version to decrypt legacy files.
914

1015
### Added
1116

17+
- **SHA256 Integrity Verification:** Added comprehensive file integrity verification system
18+
- Calculate and store SHA256 hash of backup archives (.tar.zst)
19+
- Calculate and store SHA256 hash of encrypted files (.enc)
20+
- Calculate and store SHA256 hash of decrypted files
21+
- Verify decrypted file integrity against original backup archive hash
22+
- All hashes stored in metadata.json v2.0 with appropriate naming
23+
- Added 28 new tests for hash utilities and metadata v2.0
24+
- Pure Python encryption using the `cryptography` library - no more external OpenSSL binary dependency
25+
- AES-256-GCM authenticated encryption provides both confidentiality and integrity verification
26+
- PBKDF2-HMAC-SHA256 key derivation with 600,000 iterations (OWASP recommended)
27+
- Built-in tamper detection - decryption automatically fails if encrypted file has been modified
28+
- Improved error handling with Python exceptions instead of subprocess stderr parsing
29+
- Added comprehensive encryption/decryption tests including tamper detection and round-trip validation
1230
- Implemented progress bar for extraction process using SimpleProgressBar, calculating total archive size for accurate progress updates
1331
- Migrated backup to tarfile library with zstd compression and built-in progress bar, supporting both .tar.zst and .tar.xz formats
1432
- Added global --version option and improved main entry point for consistent package import context
1533

1634
### Changed
1735

36+
- Updated BackupMetadata dataclass to version 2.0 with file_hashes field
37+
- BackupManager now calculates SHA256 hash after backup creation and stores in metadata
38+
- EncryptManager calculates SHA256 hash after encryption and stores in metadata
39+
- DecryptManager calculates SHA256 hash after decryption and verifies against backup hash
40+
- Encryption file format changed from base64-encoded OpenSSL output to binary format: `[salt(16)][nonce(12)][ciphertext][tag(16)]`
41+
- Removed hash embedding - GCM mode provides built-in authentication via authentication tag
42+
- Simplified encryption/decryption managers - removed subprocess complexity
1843
- Enhanced module structure by adding runner.py, removing deprecated files, and consolidating functionality
1944
- Updated documentation including AGENTS.md guidelines, README revisions, and added exclude_patterns.md guide
2045
- Replaced print statements with logging across modules for better traceability
@@ -24,9 +49,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2449
- Simplified zsh completion installation for better portability
2550
- Added installation options for uv tool including development mode and legacy removal
2651

52+
### Removed
53+
54+
- Removed old `save_backup_info()` method in favor of `save_backup_metadata_with_hash()`
55+
- Removed OpenSSL system dependency (previously required `openssl` command)
56+
- Removed `_sanitize_logs()` method (no longer needed without subprocess)
57+
- Removed `_verify_integrity_mandatory()` method (GCM provides automatic integrity verification)
58+
2759
### Fixed
2860

29-
- Fixed ignore pattern matching to properly handle absolute paths and patterns like node_modules, __pycache__, etc.
61+
- Fixed ignore pattern matching to properly handle absolute paths and patterns like node_modules, **pycache**, etc.
3062

3163
## v0.7.1-beta
3264

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ Turkish: [README.tr.md](README.tr.md)
1919

2020
## **✨ Features**
2121

22-
- **Create compressed backups** using tar and xz compression
23-
- **Encrypt/decrypt backups** with GPG encryption
22+
- **Create compressed backups** using tar and zstd compression
23+
- **Encrypt/decrypt backups** with AES-256-GCM authenticated encryption
2424
- **Extract backup archives** to restore files
2525
- **Clean up old backups** with configurable retention policies
2626
- **Backup information display** showing file details and metadata

docs/todo.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
## in-progress
1111

12+
- [ ] cleanup codes; remove unused methods, variables, imports, etc.
1213
- [ ] keep more than one backup info in config file? one for current, one for previous probably better.
1314
- [ ] update last backup date to config file or somewhere else
1415
"last_backup": null

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = 'AutoTarCompress'
3-
version = '0.8.0-beta'
3+
version = '0.8.0-alpha'
44
license = { text = "GPL-3.0-or-later" }
55
description = 'The script compresses specific directories into tar files, and it is able to encrypt them using the OpenSSL Python library. It also allows for decryption and extraction of the created files.'
66
keywords = ["tar", "compress", "backup"]
@@ -51,7 +51,7 @@ markers = [
5151
[tool.ruff]
5252
line-length = 79
5353
indent-width = 4
54-
include = ["pyproject.toml", "src/**/*.py", "scripts/**/*.py"]
54+
include = ["pyproject.toml", "src/**/*.py", "scripts/**/*.py", "autotarcompress/**/*.py", "tests/**/*.py"]
5555

5656
[tool.ruff.format]
5757
# Like Black, use double quotes for strings.

0 commit comments

Comments
 (0)