Skip to content

New: Added source of the request - #225

Merged
KingYes merged 11 commits into
masterfrom
new/request-source
Aug 19, 2026
Merged

New: Added source of the request#225
KingYes merged 11 commits into
masterfrom
new/request-source

Conversation

@KingYes

@KingYes KingYes commented Aug 13, 2026

Copy link
Copy Markdown
Member

✨ PR Description

1. Problem & Context

Plugin now tracks the source channel (REST, CLI, XML-RPC, WP-Cron, WP Abilities) and app password names for each logged action. Replaces IP-only display with richer request source metadata, enabling better audit visibility without conditional logic in list table.

2. What Changed (Where)

  • AAL_API: Added request source resolution (channel + app password detection) via hooks; stores in new request_source DB column with optional meta JSON field
  • AAL_Activity_Log_List_Table: Replaced conditional IP column with permanent source column; added source filter UI and search support
  • AAL_Maintenance: Implements schema v1.1 upgrade with auto/manual migration paths; handles large tables gracefully
  • AAL_Export, AAL_Privacy: Source formatting & display utilities; schema-aware fallbacks
  • Build/test infrastructure: PHPUnit suite (2 new test files), GitHub Actions CI, PHPCS ruleset, npm package scripts

3. How It Works

On log insertion, AAL_API::resolve_request_source() detects active channel (ability stack → REST → XML-RPC → CLI → cron → empty), captures app password name via application_password_did_authenticate hook or REST fallback, encodes as {channel}|app:{name}. List table parses and renders as clickable badges; filters apply prefix/literal matching on stored format. Upgrade runs auto on admin_init for small tables (<50k rows), prompts manual for large ones; schema check gated by version option with static cache.

4. Risks

Large table upgrades: ALTER TABLE on production logs could lock reads. Mitigated by row-count threshold triggering manual pathway with unlimited execution time. Backward compat: Upgrade idempotent but skips if columns exist; old logs lack source (handled via null coalesce). Test coverage: Two new test suites validate parsing, channel resolution, upgrade lifecycle—pass locally before merge.

Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Description using Guidelines Learn how

@wiz-9a149474ff

wiz-9a149474ff Bot commented Aug 17, 2026

Copy link
Copy Markdown

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities -
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations 4 Low
SAST Finding SAST Findings -
Software Management Finding Software Management Findings -
Total 4 Low

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try the Wiz Code extension for VS Code, JetBrains, or Visual Studio.

@KingYes
KingYes merged commit 6382921 into master Aug 19, 2026
54 checks passed
@KingYes
KingYes deleted the new/request-source branch August 19, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants