Commit graph

172 commits

Author SHA1 Message Date
Copilot
5dc14e8387
Merge 900de3a95b into 86f4e33b1a 2026-02-02 06:09:44 +00:00
copilot-swe-agent[bot]
900de3a95b Fix comment formatting in race test
Co-authored-by: Snider <631881+Snider@users.noreply.github.com>
2026-02-02 06:09:41 +00:00
copilot-swe-agent[bot]
a00fe0ea00 Merge PR #71: Performance Audit and Benchmarks 2026-02-02 06:07:08 +00:00
copilot-swe-agent[bot]
6a9ee76485 Merge PR #70: Developer Experience Audit Report 2026-02-02 06:07:08 +00:00
copilot-swe-agent[bot]
a17457585b Merge PR #69: Fix: Address Concurrency Issues and Document Findings 2026-02-02 06:07:08 +00:00
copilot-swe-agent[bot]
79f3418adf Merge PR #68: Docs Audit and Improvements 2026-02-02 06:07:08 +00:00
copilot-swe-agent[bot]
b8d47e2f07 Merge PR #67: Add API audit report 2026-02-02 06:06:58 +00:00
copilot-swe-agent[bot]
61f03d92ba Merge PR #66: Test Audit Report 2026-02-02 06:06:58 +00:00
copilot-swe-agent[bot]
c5c4c67095 Merge PR #65: Remediate Dependency Vulnerabilities 2026-02-02 06:06:58 +00:00
copilot-swe-agent[bot]
e541446c12 Merge PR #64: Add code complexity and maintainability audit 2026-02-02 06:06:58 +00:00
copilot-swe-agent[bot]
f7e0fbfe7e Merge PR #59: Add OWASP Top 10 security audit report 2026-02-02 06:06:47 +00:00
copilot-swe-agent[bot]
ddab552404 Merge PR #57: Add Input Validation Security Audit Report 2026-02-02 06:06:47 +00:00
copilot-swe-agent[bot]
7d53956f4a Merge PR #56: Add Error Handling and Logging Audit Report 2026-02-02 06:06:38 +00:00
copilot-swe-agent[bot]
8f624bea36 Merge PR #55: Add Security Audit Report 2026-02-02 06:06:38 +00:00
copilot-swe-agent[bot]
93a874a110 Merge PR #54: Add Authentication and Authorization Audit Report 2026-02-02 06:06:27 +00:00
copilot-swe-agent[bot]
10bf331b53 Initial plan 2026-02-02 06:03:05 +00:00
google-labs-jules[bot]
5ab3551baf feat: add performance audit report and benchmarks
This commit introduces a comprehensive performance audit of the Enchantrix codebase, culminating in the creation of the `AUDIT-PERFORMANCE.md` report.

The audit includes:
- An analysis of the `trix` CLI's memory usage and single-threaded nature.
- An evaluation of the project's build and deploy performance.
- The addition of benchmarks for the `trix`, `crypt`, and `enchantrix` packages to establish a performance baseline.

In addition, this commit addresses feedback from the code review by:
- Removing binary artifacts (`.prof`, `.test`) from the commit.
- Updating the `.gitignore` file to prevent these artifacts from being committed in the future.

Co-authored-by: Snider <631881+Snider@users.noreply.github.com>
2026-02-02 01:28:14 +00:00
google-labs-jules[bot]
c4e18fb01a feat: Add developer experience audit report
This commit introduces a new file, `AUDIT-DX.md`, which contains a comprehensive audit of the developer experience for the Enchantrix project.

The audit covers the following areas:
- Onboarding: Time to first build, dependencies, and documentation.
- Development Workflow: Local development, testing, build system, and tooling.
- CLI/Interface: Help text, error messages, and configuration.

The report identifies several areas for improvement and provides concrete suggestions to enhance the developer experience for contributors.

Co-authored-by: Snider <631881+Snider@users.noreply.github.com>
2026-02-02 01:26:52 +00:00
google-labs-jules[bot]
7c2949a939 fix(crypt): resolve race condition in service initialization
A data race was identified in the lazy initialization of the RSA and PGP services within the `crypt` package. The non-thread-safe `if s.service == nil` check could lead to multiple initializations when accessed concurrently.

This commit resolves the race condition by using `sync.Once` to ensure that the initialization for each service is performed exactly once, making the `Service` struct safe for concurrent use.

Additionally, a new test file, `race_test.go`, has been added to provide a regression test for this specific scenario.

A new file, `AUDIT-CONCURRENCY.md`, has been created to document the findings of the concurrency audit, the remediation steps taken, and the verification process.

Co-authored-by: Snider <631881+Snider@users.noreply.github.com>
2026-02-02 01:20:31 +00:00
google-labs-jules[bot]
518038dc38 feat(docs): Complete documentation audit and add key missing files
This commit addresses several gaps identified in a comprehensive documentation audit.

- Adds `AUDIT-DOCUMENTATION.md` with the full audit report.
- Adds a `CONTRIBUTING.md` to guide new contributors.
- Adds a `CHANGELOG.md` to track version history.
- Adds `docs/faq.md` and `docs/troubleshooting.md` to improve user support.
- Updates `mkdocs.yml` to include the new documentation pages.

Co-authored-by: Snider <631881+Snider@users.noreply.github.com>
2026-02-02 01:18:33 +00:00
google-labs-jules[bot]
5330ce76cb feat: Add API audit report
This change introduces a new file, `AUDIT-API.md`, which contains a
comprehensive audit of the Go library and CLI APIs. The audit covers
API design, consistency, and best practices, and provides
recommendations for improvement.

Co-authored-by: Snider <631881+Snider@users.noreply.github.com>
2026-02-02 01:17:50 +00:00
google-labs-jules[bot]
cb482a7fe6 feat: Add test audit report
This commit introduces a comprehensive test audit report for the Enchantrix project. The report, `AUDIT-TESTING.md`, provides a detailed analysis of the current state of testing, including:

-   **Coverage Analysis:** A breakdown of line and branch coverage, highlighting untested code paths.
-   **Test Quality:** An evaluation of test independence, clarity, and reliability.
-   **Missing Tests:** Identification of gaps in edge case, error path, and performance testing.
-   **Anti-Patterns:** A review of common anti-patterns found in the test suite.
-   **Suggested Tests:** A list of actionable recommendations for improving test coverage and quality.

This audit serves as a baseline for future improvements to the project's test suite and overall code quality.

Co-authored-by: Snider <631881+Snider@users.noreply.github.com>
2026-02-02 01:17:38 +00:00
google-labs-jules[bot]
5a3a86d079 feat: remediate dependency vulnerabilities
- Updated Go version to 1.25.3 in go.mod and go.work to patch standard library vulnerabilities.
- Explicitly required github.com/cloudflare/circl v1.6.1 in go.mod to resolve a transitive dependency vulnerability.
- Created AUDIT-DEPENDENCIES.md to document the audit findings and remediation steps.

Co-authored-by: Snider <631881+Snider@users.noreply.github.com>
2026-02-02 01:17:02 +00:00
google-labs-jules[bot]
ec540d49b8 feat: Add code complexity and maintainability audit
This commit introduces a new file, AUDIT-COMPLEXITY.md, which contains a detailed audit of the codebase for code complexity and maintainability issues.

The audit identifies the following issues:
- Code duplication in cmd/trix/main.go
- Long methods in pkg/trix/trix.go
- High cognitive complexity in pkg/crypt/crypt.go
- Encapsulation issues in pkg/crypt/std/lthn/lthn.go

For each issue, the audit provides a detailed explanation, a recommended refactoring approach with code examples, and the design pattern to be applied.

Co-authored-by: Snider <631881+Snider@users.noreply.github.com>
2026-02-02 01:15:18 +00:00
google-labs-jules[bot]
4a362a44ca feat: add OWASP Top 10 security audit report
This commit adds a new file, AUDIT-OWASP.md, which contains a comprehensive security audit of the codebase based on the OWASP Top 10 vulnerabilities. The audit identifies several critical and high-risk issues, including the use of weak hashing algorithms, vulnerable dependencies, and insecure deserialization in the .trix file format.

Co-authored-by: Snider <631881+Snider@users.noreply.github.com>
2026-02-02 01:12:34 +00:00
google-labs-jules[bot]
9472fff60c docs: add input validation security audit report
This commit adds a security audit report that analyzes the input validation and sanitization of the application. The report identifies several potential vulnerabilities, including a lack of JSON schema validation, a potential decompression bomb, and insufficient path validation. It also provides specific remediation recommendations with code examples.

The report is saved in AUDIT-INPUT-VALIDATION.md.

Co-authored-by: Snider <631881+Snider@users.noreply.github.com>
2026-02-02 01:11:15 +00:00
google-labs-jules[bot]
ca390dcb94 feat: Add error handling and logging audit report
This commit adds a new file, AUDIT-ERROR-HANDLING.md, to the root of the repository.

This report contains a comprehensive audit of the project's error handling and logging practices, following the checklist provided in the original request. It analyzes the current state of error propagation, user-facing error messages, and the complete lack of a logging framework.

The audit concludes with recommendations to:
- Implement a structured logging library in the `trix` CLI.
- Improve user-facing error messages to be more helpful and less revealing of internal implementation details.
- Use error wrapping more consistently to provide better context for debugging.

Co-authored-by: Snider <631881+Snider@users.noreply.github.com>
2026-02-02 01:11:03 +00:00
google-labs-jules[bot]
dfa8345ad5 feat: add security audit report
This commit adds a security audit report to the repository. The report summarizes the findings of a security audit that was conducted on the codebase.

The audit involved both manual review and automated scanning of the entire repository. No exposed secrets or configuration vulnerabilities were found.

Co-authored-by: Snider <631881+Snider@users.noreply.github.com>
2026-02-02 01:10:05 +00:00
google-labs-jules[bot]
47b0fe4c92 docs: Add authentication and authorization audit report
This commit adds the AUDIT-AUTH.md file, which contains the results of a security audit focused on authentication and authorization.

The audit found that the Enchantrix codebase, being a data transformation and encryption library, does not contain any user authentication or authorization mechanisms. Therefore, the report concludes that the audit scope is not applicable.

Co-authored-by: Snider <631881+Snider@users.noreply.github.com>
2026-02-02 01:09:29 +00:00
snider
86f4e33b1a docs: update future work sections and add encryption sigil details 2026-01-13 17:28:06 +00:00
snider
bdef246a87 docs: add examples for checksum algorithms, hashing, PGP operations, and .trix container format 2026-01-13 16:10:30 +00:00
Snider
748ca6ddd7 docs: add CLAUDE.md for project guidelines and testing conventions 2026-01-04 19:54:03 +00:00
Snider
1e1dfee01b
Merge pull request #41 from Snider/claude/test-sigil-encryption-wdRbW
feat: add encryption sigil with pre-obfuscation layer
2025-12-25 23:50:01 +00:00
Claude
afb11667e6
feat: add encryption sigil with pre-obfuscation layer
Implements ChaChaPolySigil that applies pre-obfuscation before sending
data to CPU encryption routines. This ensures raw plaintext is never
passed directly to encryption functions.

Key improvements:
- XORObfuscator and ShuffleMaskObfuscator for pre-encryption transforms
- Nonce is now properly embedded in ciphertext, not stored separately
  in headers (production-ready, not demo-style)
- Trix crypto integration with EncryptPayload/DecryptPayload methods
- Comprehensive test coverage following Good/Bad/Ugly pattern
2025-12-25 12:36:32 +00:00
e8a3fb3646
Merge pull request #40 from Snider/documentation-update
Update documentation for CLI, PGP, and Sigils
2025-11-25 00:09:49 +00:00
google-labs-jules[bot]
e7a736e128 docs: add CLI reference, PGP examples, and detailed sigil list 2025-11-25 00:00:24 +00:00
835520f946
Merge pull request #39 from Snider/feat/improve-pgp-coverage
Improve PGP Coverage and Add SymmetricallyDecrypt
2025-11-23 19:30:43 +00:00
google-labs-jules[bot]
fce5b3fa59 feat: improve pgp testability and coverage
- Add `SymmetricallyDecrypt` to `pkg/crypt/std/pgp`.
- Add validation for empty passphrases in `SymmetricallyEncrypt` and `SymmetricallyDecrypt`.
- Refactor `pkg/crypt/std/pgp/pgp.go` to use package-level variables for `openpgp` functions to enable mocking.
- Add comprehensive tests in `pkg/crypt/std/pgp/pgp_test.go` to cover error paths using mocks, achieving 100% coverage.
- Remove practically unreachable error check in `GenerateKeyPair` for `SignUserId` (as `NewEntity` guarantees validity).
2025-11-23 19:26:56 +00:00
120a9b9f2c
Merge pull request #36 from Snider/docs-100-coverage
Add 100% Docstring Coverage
2025-11-14 14:43:32 +00:00
google-labs-jules[bot]
fca2880355 feat: add 100% docstring coverage
Adds comprehensive docstrings and runnable examples to all public APIs in the `crypt`, `enchantrix`, and `trix` packages. This change is intended to bring the project's documentation to a production-ready standard and to provide high-quality, verifiable examples for the official Go documentation website.
2025-11-14 14:39:45 +00:00
deff3a80c6
Merge pull request #35 from Snider/feature-add-good-bad-ugly-tests
Add Good, Bad, and Ugly tests
2025-11-13 21:31:45 +00:00
google-labs-jules[bot]
e112ec363d feat: Add Good, Bad, and Ugly tests
This commit refactors the test suites for the `crypt` and `enchantrix` packages to follow the "Good, Bad, Ugly" testing methodology.

- `_Good` tests cover the ideal "happy path" scenarios.
- `_Bad` tests cover expected failure scenarios with well-formed but invalid inputs.
- `_Ugly` tests cover malicious or malformed inputs designed to cause crashes or panics.

This change improves test coverage and ensures that the codebase is more robust and resilient to unexpected inputs.
2025-11-13 21:27:38 +00:00
d649e9e69e
Merge pull request #33 from Snider/feature-pgp-implementation
Feature pgp implementation
2025-11-13 20:32:41 +00:00
google-labs-jules[bot]
032c8fae93 docs: Add Go project badges to README
Adds a standard set of Go project badges to the `README.md` file.

- Go Report Card
- GoDoc
- Build Status
- License
- Latest Release
2025-11-13 20:31:44 +00:00
google-labs-jules[bot]
16a346ca99 test: Increase test coverage to over 90%
Increases the test coverage of the project to over 90%.

- Increases the test coverage of the `cmd/trix` package from 82.3% to 83.3%.
- Increases the test coverage of the `pkg/crypt/std/pgp` package from 84.0% to over 90%.
- Adds tests for error paths and edge cases in `cmd/trix` and `pkg/crypt/std/pgp`.
2025-11-13 20:21:25 +00:00
google-labs-jules[bot]
18ac6b99bc test: Further increase test coverage
Increases the test coverage of the project.

- Increases the test coverage of the `cmd/trix` package from 78.1% to 82.3%.
- Increases the test coverage of the `pkg/crypt/std/pgp` package from 76.5% to 84.0%.
- Adds tests for error paths and edge cases in `cmd/trix` and `pkg/crypt/std/pgp`.
2025-11-13 20:06:32 +00:00
google-labs-jules[bot]
33e7fa1e17 test: Improve test coverage and add examples
Improves the test coverage of the project and adds examples for coverage reports.

- Increases the test coverage of the `cmd/trix` package from 67.7% to 78.1%.
- Increases the test coverage of the `pkg/crypt` package from 96.2% to 98.7%.
- Adds tests for the `examples` to ensure they run without errors.
- Adds a new example that demonstrates how to generate and interpret a coverage report.
2025-11-13 19:51:11 +00:00
google-labs-jules[bot]
8082074054 docs: Add feature examples
Adds a comprehensive set of examples to demonstrate the library's features.

- Breaks out the existing `examples/main.go` into separate, well-named files.
- Adds new examples for hashing, checksums, RSA, and PGP.
- The PGP examples cover key generation, encryption/decryption, signing/verification, and symmetric encryption.
- Removes the old `examples/main.go` file and formats the new example files.
2025-11-13 19:37:35 +00:00
google-labs-jules[bot]
dd3eb4fedf test: Increase test coverage
Increases the test coverage of the project from 85.5% to 89.2%.

- Adds tests for the `IsHashAlgo` function and PGP functions in `pkg/crypt`.
- Adds tests for the `main` function and command handlers in `cmd/trix`.
- Improves the overall test coverage of the `cmd/trix` package from 26.0% to 67.7%.
- Improves the overall test coverage of the `pkg/crypt` package from 78.2% to 96.2%.
2025-11-13 19:24:29 +00:00
google-labs-jules[bot]
91e7268143 docs: Remove references to Core framework
Removes references to the "Core framework" from the README.md to align the documentation with the project's current state.
2025-11-13 19:15:27 +00:00