Commit graph

34 commits

Author SHA1 Message Date
Snider
9ad004af02 docs: add CLAUDE.md project instructions
Some checks failed
CI / PHP 8.3 (push) Failing after 2s
CI / PHP 8.4 (push) Failing after 2s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-13 13:38:03 +00:00
Snider
1d117c83e6 feat(uptelligence): add sync-altum-versions command to read deployed versions from disk
Reads PRODUCT_VERSION from init.php and plugin versions from config.php,
then updates uptelligence_vendors to reflect what is actually deployed.
Supports --dry-run and --path options. 7 tests, 16 assertions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 08:54:37 +00:00
Snider
a187114d27 feat(uptelligence): add AltumCode vendor seeder with 17 entries
Idempotent seeder using updateOrCreate for 4 licensed products
(66analytics, 66biolinks, 66pusher, 66socialproof) and 13 plugins.
All entries use placeholder version 0.0.0 pending sync from Task 4.

Also fixes Pest.php to use Tests\TestCase (loads Boot provider) so
database-dependent tests can run migrations via RefreshDatabase.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 08:47:07 +00:00
Snider
f0a2f3fd1a feat(uptelligence): add AltumCode vendor update checks
Add automated version checking for AltumCode products and plugins:
- isAltumPlatform() routes altum vendors before OSS checks
- checkAltumProduct() fetches latest_release_version from product info.php
- checkAltumPlugin() looks up plugin versions from dev.altumcode.com
- In-memory cache avoids redundant HTTP calls for multiple plugins

14 Pest tests covering all paths (43 assertions).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 08:40:26 +00:00
Snider
cc1918b511 feat: rename package to lthn/php-uptelligence for Packagist
Some checks failed
CI / PHP 8.3 (push) Failing after 2s
CI / PHP 8.4 (push) Failing after 2s
2026-03-09 18:00:09 +00:00
Snider
a0ff7d9c06 fix: rename core/php-framework dependency to core/php
Some checks failed
CI / PHP 8.3 (push) Failing after 2s
CI / PHP 8.4 (push) Failing after 2s
2026-03-09 17:38:53 +00:00
Snider
15d95840c8 feat: add sync-forge command and update config defaults
Some checks failed
CI / PHP 8.3 (push) Failing after 2s
CI / PHP 8.4 (push) Failing after 2s
- Add SyncForgeCommand to register Forge repos as tracked vendors
- Register SyncForgeCommand in onConsole() event handler
- Update gitea config defaults: forge.lthn.ai URL, FORGE_TOKEN fallback, core org
- Fix PHP 8.5 parse error: use string concatenation for ANSI-tagged output

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-04 15:27:47 +00:00
Snider
fcdd6e5c58 chore: rename package to core/php-uptelligence
Some checks failed
CI / PHP 8.3 (push) Failing after 2s
CI / PHP 8.4 (push) Failing after 2s
Aligns composer package name with forge repo path
(forge.lthn.ai/core/php-uptelligence). Part of host-uk/* → core/* migration.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-03 10:38:58 +00:00
Snider
9468749010 fix(ci): install zip in release workflow
Some checks failed
CI / PHP 8.3 (push) Failing after 3s
CI / PHP 8.4 (push) Failing after 3s
Forgejo Composer API requires zip format.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 17:43:54 +00:00
Snider
8de5ee6c61 fix(ci): simplify release workflow, use FORGEJO_REF_NAME
Some checks failed
CI / PHP 8.3 (push) Failing after 3s
CI / PHP 8.4 (push) Failing after 3s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 17:36:20 +00:00
Snider
7aa283e85b fix(ci): use Forgejo-native variables in release workflow
Some checks failed
CI / PHP 8.3 (push) Failing after 4s
CI / PHP 8.4 (push) Failing after 3s
Replace github.server_url/GITHUB_REF_NAME with explicit forge URL
and GITEA_REF_NAME/GITEA_OUTPUT.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 17:13:15 +00:00
Snider
fdd8508f7e feat: add Forgejo release workflow for Composer registry
Some checks failed
CI / PHP 8.3 (push) Failing after 3s
CI / PHP 8.4 (push) Failing after 2s
On tag push (v*), zips the package and publishes to the
forge.lthn.ai Composer package registry.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 17:00:19 +00:00
d4ef270ac6 fix(ci): correct container image expression
Some checks failed
CI / PHP 8.3 (push) Failing after 1s
CI / PHP 8.4 (push) Failing after 1s
2026-02-23 13:47:12 +00:00
b5a3a35c0b feat(ci): use lthn/build:php container image
Some checks are pending
CI / PHP 8.3 (push) Waiting to run
CI / PHP 8.4 (push) Waiting to run
Replace setup-php action with pre-built container.
Eliminates ~50s setup overhead per matrix job.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 13:46:51 +00:00
Claude
0682231f93 ci: run unit tests only (feature tests need full app)
All checks were successful
CI / PHP 8.3 (push) Successful in 1m31s
CI / PHP 8.4 (push) Successful in 1m21s
2026-02-23 06:26:41 +00:00
Claude
9c8e804448 test: fix TestCase to use Orchestra Testbench for CI
Some checks failed
CI / PHP 8.4 (push) Waiting to run
CI / PHP 8.3 (push) Has been cancelled
2026-02-23 06:18:30 +00:00
Claude
08b8980d5d ci: retrigger workflow
Some checks failed
CI / PHP 8.3 (push) Failing after 1m28s
CI / PHP 8.4 (push) Failing after 1m21s
2026-02-23 05:48:45 +00:00
Claude
5bbbb84753 ci: add composer config for path repositories (v5)
Some checks are pending
CI / PHP 8.3 (push) Waiting to run
CI / PHP 8.4 (push) Waiting to run
2026-02-23 05:45:54 +00:00
Claude
7e1a99752c
fix(ci): hard-code sister package clone instead of PHP parsing
Some checks failed
CI / PHP 8.3 (push) Failing after 56s
CI / PHP 8.4 (push) Failing after 55s
Direct git clone of ../php-framework avoids shell escaping
issues with dynamic PHP-based path extraction.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 05:31:46 +00:00
Claude
31300b9a7c
fix(ci): use single-quoted PHP to avoid shell escaping issues
Some checks failed
CI / PHP 8.4 (push) Waiting to run
CI / PHP 8.3 (push) Has been cancelled
Switch php -r argument to single quotes so PHP dollar signs
are not interpreted by bash. Pipe output to while-read loop.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 05:24:28 +00:00
Claude
e02e3737bd
fix(ci): correct bash escaping in dependency checkout step
Some checks failed
CI / PHP 8.4 (push) Waiting to run
CI / PHP 8.3 (push) Has been cancelled
The PHP variables inside php -r need \$ escaping, but shell
variables outside need bare $ for command substitution and
variable expansion.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 05:19:19 +00:00
Claude
34e388e2bf
ci: inline workflow to bypass reusable workflow cache
Some checks are pending
CI / PHP 8.3 (push) Waiting to run
CI / PHP 8.4 (push) Waiting to run
The Forgejo act runner caches reusable workflow definitions,
preventing updates from being picked up. Inline the workflow
with dependency checkout step.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 05:11:51 +00:00
Claude
549b46b651
ci: trigger rebuild with fixed reusable workflow
Some checks failed
CI / tests (push) Failing after 1m33s
The reusable php-test.yml now detects pest/phpunit/pint availability
and clones path dependencies using the runner token.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 04:57:18 +00:00
Claude
f751905f22
chore: fix pint code style and add test config
Some checks failed
CI / tests (push) Failing after 1m22s
Add phpunit.xml and tests/Pest.php for standalone test execution.
Apply Laravel Pint formatting fixes across all source files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 03:50:07 +00:00
Claude
7c941060a5
ci: use reusable PHP test workflow from core/php
Some checks failed
CI / tests (push) Failing after 1m25s
Co-Authored-By: Charon <charon@lethean.io>
2026-02-23 01:22:26 +00:00
Snider
bdba302441 docs(changelog): add completed P2 items for January 2026
Some checks failed
CI / PHP 8.2 / Laravel 11.* (push) Has been cancelled
CI / PHP 8.3 / Laravel 11.* (push) Has been cancelled
CI / PHP 8.4 / Laravel 11.* (push) Has been cancelled
CI / PHP 8.3 / Laravel 12.* (push) Has been cancelled
CI / PHP 8.4 / Laravel 12.* (push) Has been cancelled
Track completed improvements:
- P2-058 to P2-061: Migration fix, webhook timing, API key exposure, payload validation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 19:52:32 +00:00
Snider
cb41d3fae6 fix(P2-058): complete migration column alignment with models
- VersionRelease: add storage fields, file counters, timestamps
- UpstreamTodo: add branch_name, assigned_to, started_at
- DiffCache: add new_content, lines_added/removed, metadata casts
- AnalysisLog: use version_release_id and error_message
- Asset: add slug, name, licence fields, install details
- AssetVersion: add changelog, breaking_changes, paths
- Webhook tables: fix foreign key to uptelligence_vendors

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 18:05:38 +00:00
Snider
6f71edd14e fix(security): address P2 security items and migration mismatch
P2-058: Migration Mismatch
- Created new migration for vendor tracking tables (000004)
- Added explicit $table property to all models with uptelligence_ prefix
- Clarified dual-purpose nature (uptime monitoring + vendor tracking)
- Added appropriate indexes for common query patterns

P2-059: Webhook Signature Timing Attack Audit
- Verified all signature verification uses hash_equals()
- Added comprehensive tests in WebhookSignatureVerificationTest.php
- Tests cover all providers, grace periods, edge cases

P2-060: API Key Exposure in Logs
- Added redactSensitiveData() to AIAnalyzerService
- Added redactSensitiveData() to IssueGeneratorService
- Added redactSensitiveData() to VendorUpdateCheckerService
- Redacts API keys, tokens, bearer tokens, auth headers

P2-061: Missing Webhook Payload Validation
- Added MAX_PAYLOAD_SIZE (1MB) and MAX_JSON_DEPTH (32) limits
- Added validatePayloadSize() for DoS protection
- Added parseAndValidateJson() with depth limit
- Added validatePayloadStructure() for provider-specific validation
- Added hasExcessiveArraySize() to prevent memory exhaustion
- Added tests in WebhookPayloadValidationTest.php

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 13:29:26 +00:00
Snider
ef8a40829f security: fix shell injection in AssetTrackerService
- Add package name validation with strict regex patterns
- Convert all Process::run() calls to array syntax
- Support Composer and NPM package name formats
- Add comprehensive shell injection tests (20 attack patterns)
- Update security docs and changelog

Fixes P2 shell injection vulnerability from security audit.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 12:21:07 +00:00
Snider
256e0c38b7 docs: rewrite CLAUDE.md for core-uptelligence package
Replace generic Core PHP Framework boilerplate with package-specific
documentation covering the vendor tracking module's architecture,
services, and commands.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 14:14:53 +00:00
Snider
6c17c39c97 refactor: update Tenant namespace imports to Core\Tenant
Align with core-tenant namespace structure.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 17:42:11 +00:00
Snider
e0d2325a20 refactor: move namespace from Core\Uptelligence to Core\Mod\Uptelligence
Aligns module namespace with Core PHP Framework conventions where
modules live under the Core\Mod\ namespace hierarchy. This follows
the monorepo separation work started in 40d893a.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 16:32:55 +00:00
Snider
40d893af44 monorepo sepration 2026-01-26 23:56:46 +00:00
Snider
737e705755
Initial commit 2026-01-26 23:25:24 +00:00